danboid / ALEZ

Arch Linux Easy ZFS installer
GNU General Public License v3.0
145 stars 25 forks source link

Grub-probe - Failed to get canonical path of 'zroot/ROOT/default' #25

Closed ikidd closed 5 years ago

ikidd commented 5 years ago

I've tried the latest ISO as well as the first ISO from 03-18 and both throw this error. I did see you had an export that supposedly fixes this, but I can't see why that would help, I'm not really sure what the root cause is.

I'm guessing this:

https://askubuntu.com/questions/827126/zfs-grub-probe-error-failed-to-get-canonical-path-of-dev-disk-name/943425

is the rational for that export in the script? If so, I can't say I particularly understand how to fix this manually if that export isn't working.

danboid commented 5 years ago

Hi ikidd

What type of machine are you installing to, VM or physical? Did you try more than once and get the same error?

This section of the README relates to that exact error:

Running ALEZ under virt-manager / qemu

GRUB fails to install under VMs created using the virt-manager defaults because it defaults to using an IDE disk bus. Change your VM disk bus to SATA before running the installer.

Sometimes, if you try again with the same settings it will work. GRUBs ZFS support is a bit flakey and so it is mainly there for people without UEFI who can't use the systemd bootloader and those wanting to use mirrored disks,

danboid commented 5 years ago

grub is failing to install under both qemu and virtualbox for me now too actually.

You'll have to install with the systemd bootloader if you can (if you have a UEFI machine) until this is fixed.

ikidd commented 5 years ago

This is a physical machine, no UEFI as it's an older MB. GA-H55M-UD2H board. I tried a few times, and with different ISOs (though I see the script just updates from git afresh). SATA SSD is the target disk. I'll wait to hear back if I don't figure it out. Thanks for keeping on top of the issues and let me know if I can help.

ikidd commented 5 years ago

So I'm a complete nub here, so this could be completely unhelpful, but I mounted the zpool using

zpool import -a -R /mnt

Then arch-chrooted in. I poked around but when I tried to check the version of ZFS installed in the chroot, it returned nothing for pacman -Qi zfs-linux or zfs-linux-lts.

I manually installed zfs-linux, enabled the systemd target, exported ZPOOL_VDEV_NAME_PATH=1, generated the grub-mkconfig without error, and then grub-install /dev/sda went fine.

Frankly I'm kinda lost from there as to how to wrap it up, but maybe that helps get it going from your end and I can just run the script again if you find fixes?

Edit: Derp, just had to unmount everything and export after that point and it boots fine. I didn't add a manual entry in grub.cfg as your script does because the one that was there seemed very similiar. Now to install stuff.

Thanks for your script!

danboid commented 5 years ago

Thanks for the feedback/update @ikidd, good to hear you got it fixed up and booting. Strange that ZFS wasn't getting installed in the chroot.

I hope to get this fixed ASAP but I likely won't have any more time to look at this today.

danboid commented 5 years ago

@ikidd

This has been fixed.

It was only a few weeks ago that ALEZ gained the ability to automatically fetch older kernels when the ZFS kernel modules in the archzfs repo are older than the current Arch kernel. It turns out you were the first person to properly test this new code which wasn't quite working yesterday but now it does work.

Thanks for reporting it!