View previous topic :: View next topic |
Author |
Message |
johnklug n00b
Joined: 17 Jun 2013 Posts: 31
|
Posted: Fri May 13, 2016 5:11 am Post subject: UEFI/grub2 boot prompts for root device |
|
|
I tried to follow the Gentoo handbook, and used parted, GPT and put root in the 4th partition.
So when I boot the new system, I am prompted (taken from the screen):Determining root device
Could not find the root device in 231c1cb6-a4e3-494d-97cc-7837d8452dd2.
Please specify another value or:
Please press Enter for the same
Or type "Shell" for shell
Or type "q" to skip
If I hit enter, then it mounts root and boots.
Here is blkid output:/dev/sdb4: UUID="231c1cb6-a4e3-494d-97cc-7837d8452dd2" TYPE="ext3" PARTLABEL="rootfs" PARTUUID="7d95de0c-5b61-4d91-ab9b-199b84f1e5f7"
This is some of what is in grub:submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-231c1cb6-a4e3-494d-97cc-7837d8452dd2' {
menuentry 'Gentoo GNU/Linux, with Linux 4.4.6-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.6-gentoo-advanced-231c1cb6-a4e3-494d-97cc-7837d8452dd2' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_gpt
insmod fat
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2 5215-084B
else
search --no-floppy --fs-uuid --set=root 5215-084B
fi
echo 'Loading Linux 4.4.6-gentoo ...'
linux /vmlinuz-4.4.6-gentoo root=UUID=231c1cb6-a4e3-494d-97cc-7837d8452dd2 ro
The uuid also appears in /dev/disk/by-uuid after booting. The uuid value was entered by grub2-mkconfig from here:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
Root is ext3, and ext3 is selected in the kernel and root mounts fine. From /proc/mounts:/dev/sdb4 / ext3 rw,noatime,data=ordered 0 0
So what is missing? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri May 13, 2016 11:29 am Post subject: |
|
|
Do a manual edit on /boot/grub/grub.cfg to change to linux /vmlinuz-4.4.6-gentoo root=PARTUUID=7d95de0c-5b61-4d91-ab9b-199b84f1e5f7 ro see if it works (check for typos)
UUID=231c1cb6-a4e3-494d-97cc-7837d8452dd2 points to file system not partition _________________ Defund the FCC. |
|
Back to top |
|
|
johnklug n00b
Joined: 17 Jun 2013 Posts: 31
|
Posted: Fri May 13, 2016 3:23 pm Post subject: |
|
|
Looks like using PARTUUID does not work. I think I need to know how the code evaluates a root disk. I assume this is coming from grub2?
In the new response (slightly changed), hitting enter no longer works. I have to give it a device name:Determining root device
Block device PARTUUID=7d95de0c-5b61-4d91-ab9b-199b84f1e5f7 is not a valid root device ...
Could not find the root device in .
Please specify another value or:
Please press Enter for the same
Or type "Shell" for shell
Or type "q" to skip
Enter then did not work. /dev/sdb4 worked. Here are the relevent grub lines compared to blkid output:localhost grub # blkid /dev/sdb4
/dev/sdb4: UUID="231c1cb6-a4e3-494d-97cc-7837d8452dd2" TYPE="ext3" PARTLABEL="rootfs" PARTUUID="7d95de0c-5b61-4d91-ab9b-199b84f1e5f7"
localhost grub # grep 7d95de0c-5b61-4d91-ab9b-199b84f1e5f7 grub.cfg
linux /vmlinuz-4.4.6-gentoo root=PARTUUID=7d95de0c-5b61-4d91-ab9b-199b84f1e5f7 ro rootfstype=ext3
linux /vmlinuz-4.4.6-gentoo root=PARTUUID=7d95de0c-5b61-4d91-ab9b-199b84f1e5f7 ro rootfstype=ext3
|
|
Back to top |
|
|
johnklug n00b
Joined: 17 Jun 2013 Posts: 31
|
Posted: Fri May 13, 2016 9:32 pm Post subject: |
|
|
Found the issue. The problem is the genkernel file called init, that winds up in the initramfs file.
On my system, the disks are not ready when the disk queries are made in the init script.
I fixed it by putting busybox sleep 5 in the script called init in initrd.
Seems like this code needs to be written in a loop. It should not give up so soon.
I guess I will write a patch, and then a bug report. |
|
Back to top |
|
|
johnklug n00b
Joined: 17 Jun 2013 Posts: 31
|
Posted: Sat May 14, 2016 3:36 am Post subject: |
|
|
This problem is documented in genkernel bug https://bugs.gentoo.org/show_bug.cgi?id=232733 (not started by me).
I wrote a patch for /usr/share/genkernel/defaults/linuxrc and put it in the bug report, but it is a simple minded loop for 3 seconds waiting for root. Something like this is already done for CD. |
|
Back to top |
|
|
|