3

I installed (sudo apt install dracut, did not change any configuration files) dracut on my Ubuntu 22.04 and rebooted. Now I get the message

dracut: FATAL: Don't know hot to handle 'root=ZFS=rpool/ROOT/ubuntu_m6r2ku'
dracut: Refuses to continue
reboot: System halted

How can I fix this problem? I already tried to change the line root=ZFS=rpool/ROOT/ubuntu_m6r2ku to root=ZFS:auto in grub by pressing 'e' in grub menu and booting, but that didn't help.

1 Answers1

1

This occurs because somehow your grub2-mkconfig ran with an unmodified 10_linux script. The line dracut complains ought to work, but the current version of zfs-dracut plus various complex issues with grub don't allow it to work.

For a quick test, just interrupt the boot process, edit the menu selection, and remove the root= clause. Your system should boot normally.


If the above works, you can try this for a permanent fix:

  1. Carefully review your modifications to /etc/grub.d/10_linux.
  2. Run blkid to show the UUID of your EFI boot partition.
  3. Make sure that UUID is configured in /etc/fstab to mount /boot/efi.
  4. Run mount to confirm that /boot/efi is in fact mounted there.
  5. Re-run grub2-mkconfig.

I'm also running Ubuntu Server with ZFS and I had some issues with zfs-dracut myself, so I decided to not install it the second time I set it up. Haven't had any issues since.

telometto
  • 1,825
  • 2
  • 8
  • 29
  • Hi. I tried to do so. It doesn't boots successfully, but at least I got a command prompt. `[FAILED] Failed to start Switch Root. Generating "run/initramfs/rdsosreport.txt" Entering emergency mode. Exit the shell to continue etc` And then I got :/root# invitation. My SDD are not actually mounted, most commands are not available, no /boot. – ubuntulinuxxuser987 Sep 03 '22 at 08:52
  • I tried to #blkid, and then #mount /dev/sdc3, but received `unknown filesystem type 'zfs_member'` – ubuntulinuxxuser987 Sep 03 '22 at 09:14
  • @ubuntulinuxxuser987 For the first part, what's the output of `journalctl -x --no-pager --catalog`? For the second part, I'll have to update my answer. – telometto Sep 03 '22 at 10:21
  • @ubuntulinuxxuser987 Is it a wholly fresh installation of Ubuntu + ZFS? Like, do you have any data you have to recover from the drive you're trying to mount? If not, it may be just as good to nuke the whole thing and start from scratch... if you have to recover data, let me know and I'll try to help you. – telometto Sep 03 '22 at 10:29
  • Installation is about 2 month old, I have separate /home folder, luckily. journalctl says something like "Failed to switch root: Specified switch root path 'sysroot' does not seem to be an OS tree. os-release file is missing. Failed to start Switch Root". – ubuntulinuxxuser987 Sep 03 '22 at 10:46
  • Also I cannot mount vfat with efi in this shell, it complains about IO charset iso8859-1 not found. depmod does nothing – ubuntulinuxxuser987 Sep 03 '22 at 10:52
  • I don't have any important data except in /home, so I guess I'll just reinstall, if no one suggests a solution. Thanks. – ubuntulinuxxuser987 Sep 03 '22 at 10:57
  • So it worked before you installed `dracut`? Have you tried just uninstalling `dracut`? (Just as a reminder/side note: Debian based distros, which includes Ubuntu, use `initramfs` and not `dracut`) – telometto Sep 03 '22 at 16:36
  • I don't know how to uninstall dracut :) Because I cannot mount neither / neither /boot partitions in emergency mode. Maybe, I can use Live usb somehow? – ubuntulinuxxuser987 Sep 04 '22 at 01:26