You are not logged in.

#1 2013-08-01 22:04:40

labiculum
Member
Registered: 2012-04-21
Posts: 7

grub-probe error while installing to ZFS root with separate boot

Hello everybody!

I tried to set up Arch Linux on a ZFS root following the wiki guide. Except, to avoid some partitioning, I outsourced boot to an ext4-formatted USB stick. Maybe this change has implications I am not aware of?

Pool creation and pacstrap install worked fine, then I changed root into the destination mount and, after the usual configuring, installed grub:

# grub-install --recheck /dev/sdg
Installation finished. No error reported.
# grub-mkconfig -o /boot/grub/grub.cfg
/usr/bin/grub-probe: error: failed to get canonical path of /dev/ata-Hitachi_[MODEL]_[SERIAL]

What happened here? I have created the ZFS pool using a Hitachi drive 'by-id' but why does grub complain about this when I try installing it to the USB stick?

What I noticed so far:
1. The failed path is missing the 'disk/by-id/' portion.
2. 'grub-probe /' gives the same path error as above.

Any input appreciated, thanks.

Offline

#2 2013-08-02 01:29:48

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: grub-probe error while installing to ZFS root with separate boot

EFI or BIOS?

Either way, are you sure that /boot (and /boot/efi if applicable) were mounted when you used pacstrap and grub-install?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#3 2013-08-02 08:53:46

labiculum
Member
Registered: 2012-04-21
Posts: 7

Re: grub-probe error while installing to ZFS root with separate boot

BIOS only. Not to be too convinced of myself, but I am sure :-)

Went through the whole process 3 times in search of any pointers. First created the pool, then temporarily mounted it to /mnt, then mounted boot partition to /mnt/boot, then did pacstrap and grub. The usual contents of /boot are there, including ZFS module files in /boot/grub/i386-pc.

As you can see above, grub-install worked fine. The problem is with grub-mkconfig.

I read in another ZFS guide that grub does not understand these /dev/disk/by-id symlinks, but I did not use such a link for the boot stick, simply /dev/sdg (in this case).

Last edited by labiculum (2013-08-02 08:56:08)

Offline

#4 2013-08-02 21:24:14

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: grub-probe error while installing to ZFS root with separate boot

So what's in /etc/default/grub and have you customised anything in /etc/grub.d/?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#5 2013-08-03 11:30:12

labiculum
Member
Registered: 2012-04-21
Posts: 7

Re: grub-probe error while installing to ZFS root with separate boot

No changes to /etc/grub/default (http://pastebin.com/TkfpGfT3) or /etc/grub.d/.

I wonder if there is a manual way to do what grub-mkconfig does. If grub-mkconfig doesn't work, the information inside grub.cfg never got updated to reflect the current setup, right? Of course I did not touch grub.cfg, its entries are beyond me.

Offline

#6 2013-08-03 20:57:45

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: grub-probe error while installing to ZFS root with separate boot

I thought you followed the wiki wink?

I'm really not sure that you have done grub-install correctly. Shouldn't you install it to the hard drive your machine expects to boot from?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#7 2013-08-05 11:24:15

labiculum
Member
Registered: 2012-04-21
Posts: 7

Re: grub-probe error while installing to ZFS root with separate boot

You are quite right, cfr, I did not. Thank you for pointing this out.

I also tried the whole setup process again, this time choosing the layout given in the wiki:

GPT Part  Size   Type
========  =====  =============
 2        1007K  BIOS Boot Partition (ef02)
 1        1024G  Ext4 (8300) # This is the boot partition.
 3        XXXG   Solaris Root (bf00) # This is the root pool partition.

My problem, however, remains:

# grub-install --recheck /dev/sdb
OR:
# grub-install --recheck /dev/disk/by-id/ata-Hitachi_[MODEL]_[SERIAL]
Installation finished. No error reported.
# grub-mkconfig -o /boot/grub/grub.cfg
/usr/bin/grub-probe: error: failed to get canonical path of /dev/ata-Hitachi_[MODEL]_[SERIAL]-part3 # This is the root pool partition.

The wiki itself says "grub-mkconfig fails for me, so I edited grub.cfg manually." If I post my current grub.cfg and a blkid output, can someone help me piece together the right changes to grub.cfg?

Offline

#8 2013-08-05 21:18:19

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: grub-probe error while installing to ZFS root with separate boot

It might be easier to just add an entry in /etc/grub.d/40_custom for example. Unless you plan to maintain grub.cfg entirely manually which is perfectly doable. The reason for this is that the autogenerated grub.cfg tends to be difficult to read and edit. Also, it will get overwritten any time you need to run grub-mkconfig. Personally, I would recommend:
1) editing /etc/default/grub to get the autogeneration working if possible (first choice unless you prefer hand editing);
2) either
2a) maintain grub.cfg entirely manually i.e. don't use grub-mkconfig at all;
    or
2b) just use a custom entry in /etc/grub.d/40_custom

I actually use 2a but I'm unusual and most people prefer not to. So probably try 1 as a first option and 2b if that fails.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

Board footer

Powered by FluxBB