openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.52k stars 1.74k forks source link

Unable to mount / at boot with Dracut, zfs-dracut 0.6.4-20 under Debian Stretch #3605

Closed amitie10g closed 8 years ago

amitie10g commented 9 years ago

I noticed that recet versions of zfs-dracut renders the initramfs images (3.19.8, 4.0.5 and 4.1.2) unable to mount the root «/» filesystem, with the error unable to mount /sysroot, leaving a Busybox rescue shell; using zpool import -R / poolname and even zpool import -R /sysroot poolname will import the pool and mount its datasets successfully, but when exit the shell, the system hangs and still unable to boot. This ocurrs in the both my desktop and laptop (both with Debian Stertch and zfs related packages 0.6.4-20).

This problem does not ocurr using initramfs-tools and zfs-initramfs, when the root pool is imported, and then root and descendant filesystems are mounted correctly and the system boots successfully.

I use Dracut because I have better control on the generated initramfs images and smaller size is beter when using with EFI Stub in small EFI partition.

img_20150716_172559 img_20150716_172613

behlendorf commented 8 years ago

While the automated test coverage is improving we don't have anything which tests the dracut changes. That's the main reason this code doesn't see many updates, I'm very reluctant to touch it and risk breaking things for a different platforms/version.

If it's possible to write at least some basic test cases which could be added to the ZFS Test Suite that would at least get us some test coverage.

This same issue is true for the init scripts and systemd code which is why they see minimal updates.

Sen-Dion commented 8 years ago

In reply to @behlendorf.

  1. Is it possible to add the patch to Fedora package? If yes, I volunteer to test in on the host with Fedora, assuming the testing doesn't burn more than 3 hr of my personal time. Just send me the step-by-step instructions.
  2. Does it make sense to report a different problem which is related to the boot sequence (search backwards for permafrost/os/fedora-23/var)? I am concerned that any activity to debug/fix it may not make into mainstream due to the lack of

    basic test cases which could be added to the ZFS Test Suite that would at least get us some test coverage

behlendorf commented 8 years ago

@Sen-Dion yes, @Rudd-O posted a description of the testing needed in the pull request and how to build. Any additional testing you can offer would be appreciated.

If you uncover additional different issues I'd suggest opening new issues in the tracker for them.

prometheanfire commented 8 years ago

now that we have something 'working' I think it'd be easy to fix (hopefully)

Rudd-O commented 8 years ago

@sen-dion you can create Fedora packages using https://github.com/Rudd-O/zfs-fedora-installer deploy-zfs script -- it has a side effect of creating ZFS RPMs (plus the grub-zfs-fixer RPM you need in order to get GRUB to boot from a ZFS root) that you can then deploy. I also welcome patches to make it just create RPMs and nothing else (same for the install-fedora-on-zfs which could conceivably spin RPMs for any sort of Fedora or CentOS within a proper environment).