User talk:Sakaki/Sakaki's EFI Install Guide/Configuring and Building the Kernel

Buildkernel fails to identify disks by uuid if they are configured without partitions, eg. Solid State Disks.

This is because buildkernel looks for uuids from /dev/disk/by-partuuid rather than /dev/disk/by-uuid, presumably to prevent users with traditional disks from shooting at their feet. K2t0f12d (talk) 01:36, 1 October 2014 (UTC)

Worse yet, changing $PARTUUIDDEVDIR to /dev/disk/by-uuid instead also fails, because vfat disks have uppercase characters in their uuid and we are arbitrarily downcasing user definintions read from the config! K2t0f12d (talk) 02:36, 1 October 2014 (UTC)


 * Hi K2t0f12d - as you point out, buildkernel is targeted specifically at the case of partitioned GPT drives (whether SSD or not) - as will be the case for the EFI dual-boot scenario (on standard Ultrabooks etc.), where the user has followed the boot USB key prep instructions in the earlier chapter (or where overwriting a standard Win 8 system, with a GPT drive containing the EFI system partition and a LUKS / LVM partition).
 * Could you please let me know the full details of the use case you would like to facilitate, and I'll see what can be done? Many thanks, sakaki Wed 1 Oct 10:01:08 UTC 2014


 * Hi Sakaki, same isuse here, let me explain:
 * Linux livecd 3.14.14-gentoo #1 SMP Thu Oct 23 06:24:17 UTC 2014 x86_64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz GenuineIntel GNU/Linux
 * when ending up at the point to run buildkernel with EFIPARTUUID="7ecaf269-b104-4817-9342-d2f1840d0d85" and CRYPTPARTUUID="cb74f32d-01" I got:


 * (chroot) livecd / # buildkernel --ask --verbose
 * * Secure-bootable EFI kernel build script
 * * buildkernel: Error: Partition with UUID 'cb74f32d-01' does not exist - exiting


 * This is because the CRYPTPARTUUID ist't listed anywhere beneath /dev/disk, especially not in /dev/disk/by-partuuid
 * instead, I have the following (sda=HDD, sdc=USB with EFIPART):
 * (chroot:2) livecd / # blkid /dev/sda1 /dev/sdc1
 * /dev/sda1: UUID="5172cadb-d229-47ba-95bc-fbb6ebf3f9d9" TYPE="crypto_LUKS" PARTUUID="cb74f32d-01"
 * /dev/sdc1: UUID="7987-E0A0" TYPE="vfat" PARTLABEL="primary" PARTUUID="7ecaf269-b104-4817-9342-d2f1840d0d85"
 * (chroot:2) livecd / # ls -l /dev/disk/by-partuuid/
 * lrwxrwxrwx 1 root root 10 29. Okt 12:57 7ecaf269-b104-4817-9342-d2f1840d0d85 -> ../../sdc1
 * (chroot:2) livecd / # cryptsetup isLuks /dev/disk/by-uuid/5172cadb-d229-47ba-95bc-fbb6ebf3f9d9; echo $?
 * 0
 * (chroot:2) livecd / # cryptsetup isLuks /dev/sda1 ; echo $?
 * 0
 * For some reason the PARTUUID="cb74f32d-01" disappeared from the /dev/disk/by-partuuid or was never there. Charly531 (talk) 14:13, 29 October 2014 (UTC)
 * For some reason the PARTUUID="cb74f32d-01" disappeared from the /dev/disk/by-partuuid or was never there. Charly531 (talk) 14:13, 29 October 2014 (UTC)


 * Hi Charly531 - sorry to hear you are having problems with this. Could you please post the output of blkid /dev/sda and blkid /dev/sdc as well please? Thx sakaki Wed 29 Oct 14:45:06 UTC 2014
 * (chroot:2) livecd / # blkid /dev/sda /dev/sdc
 * /dev/sda: PTUUID="cb74f32d" PTTYPE="dos"
 * /dev/sdc: PTUUID="ce6c1c27-7946-4000-8cf9-6011f7ccd69d" PTTYPE="gpt"
 * oh, well I guess partition type "DOS" is the problem, I need to review the process from the beginning...
 * Charly531 (talk) 15:46, 29 October 2014 (UTC)


 * Ok, thanks for that. I think I understand the problem now (and perhaps this is what K2t0f12d was referring to as well). Essentially, the tutorial assumes that your crypt partition lives on a GPT-partitioned disk, which it will if you have placed it on space freed up from Windows 8 (since the disk must be GPT to boot under UEFI in the first place). Ditto for your EFI boot key (which it looks like you have set up fine incidentially, based on the above). However, if you are adapting the tutorial to a single-OS (or multi-hard-drive) boot, and put the crypt partition on a drive that is MBR-partitioned, then no entries are created for it (since the partition identifier is not of the appropriate format). Instead, such MBR partitions should show up in  (which I think is what K2t0f12d was alluding to).


 * Would you mind just checking if your 's UUID (i.e., 5172cadb-d229-47ba-95bc-fbb6ebf3f9d9) shows up if you ls -l /dev/disk/by-uuid ?
 * If this is the case, I will look to see if buildkernel can easily be adapted to check for crypto partitions on MBR drives too, via the route.


 * In the meantime, you may be able to use gdisk to convert your MBR /dev/sda to GPT (see this Arch Linux wiki item), but please read the warnings there before proceeding.
 * Thank you for taking the time to provide details about this issue btw, it's only through detailed bug reports like yours that I can get a chance to improve the tools. Best, sakaki Wed 29 Oct 17:21:13 UTC 2014