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.
EFI or BIOS?
Either way, are you sure that /boot (and /boot/efi if applicable) were mounted when you used pacstrap and grub-install?
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)
So what's in /etc/default/grub and have you customised anything in /etc/grub.d/?
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.
I thought you followed the wiki ?
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?
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?
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);
2a) maintain grub.cfg entirely manually i.e. don't use grub-mkconfig at all;
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.