Closed amitie10g closed 8 years ago
What's your kernel command boot line? I may suggest that this would/might be fixed by #3560. It's especially the following section: https://github.com/FransUrbo/zfs/commit/5aa94f1afde5f0b2bc4a0b4f01b1fb7fade1a30b#diff-75bd80e7c2dde2371c1ed2e0864b92c6R43
This was removed, for some reason or other, in commit https://github.com/FransUrbo/zfs/commit/eda3d4e1de94cd3a9247bb90a64413a89e736847.
The kernel command line (set up in efivar):
root=ZFS=davod-notebook/ROOT/debian-1 ro boot=zfs quiet splash pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 initrd=\\EFI\\debian\\initrd
With this command line I booted up my laptop successfully using efistub and initramfs-tools, but changing again to Dracut, the error persists.
For now I'll use initramfs-tools. I'll test Dracut again when next commit fix that.
Yes, that's what I thought. The part where root=ZFS=
is used was removed. It ONLY accepts root=zfs:AUTO
now.
So yes, your only option is to use initramfs-tools or add the PR mentioned.
I think this bug report is related.
Specfically, this change made it into version 220 of systemd. The fstab-generator now creates a sysroot.mount unit that fails and prevents the boot from continuing, where before it would just exit and let the dracut mount hook for zfs mount the root filesystem.
This cannot be disabled, so I think a systemd generator needs to be created for zfs, instead of using the dracut hooks.
it looks like it still supports root=zfs:poolname/dataset
Not sure if this is related or should be a separate bug, but root on ZFS with zfs-dracut on fedora 23 (with systemd 222) is broken. It fails exactly as one would expect according to: https://bugs.freedesktop.org/show_bug.cgi?id=90913.
So, after looking into the dracut modules it seems that evolarium is right that zfs-dracut with systemd 220 or newer is broken and a generator script for the sysmount is required to make root on zfs work with dracut and systemd >=220.
does anyone have a generator script?
Have been discussing the symptom here http://list.zfsonlinux.org/pipermail/zfs-discuss/2016-January/024355.html.
Anyone have anything started for testing? Or shall I attempt to fix myself from scratch?
I looked into this a couple of weeks ago but did not pursue it further due to time constraints. Imho this needs to be fixed by rewriting the zfs dracut module from scratch.
I first attempted to re purpose the current zfs dracut parse and mount scripts to generate a sysroot.mount unit. It turns out that the generator scripts are run very early during boot so the current scripts will not work. If I remember it correctly the pool cannot be imported at the time the generator scripts are executed.
Together with a couple of other constraints on how dracut / systemd I only see one viable solution. A generator script which creates a unit for importing the pool and sysroot.mount which depends/runs after the import unit. Seems to me that the current zfs-import-scan and zfs-mount units can be partially reused for that.
As a user of Fedora on my personal systems, I think I've also run into this problem. I've not spent any substantial time trying to figure out what's happening, however, the issue seems to be that systemd (in the initramfs environment) doesn't run the dracut-mount service if a "root=" is specified on the kernel command line (at least if a "root=ZFS=..." is specified). If the "root=..." is completely removed and the pool has the bootfs property set, everything works just fine and that's the way I'm booting my systems now.
I definitely don't have time to work on this. However, I think it would be great is someone, or better yet a few people, could tackle the outstanding dracut issues.
Just tried the workaround mentioned by dweeezil and after upgrading my fedora 23 test setup to the most recent kernel / zfs packages things work, i.e. when omitting root= on the kernel command line rootfs is correctly mounted based on the bootfs property. However, this was not working before (with packages as of late December) so this begs the question of whether or not support for this is intentional.
@behlendorf: since fixing this issue will likely result in writing new generator scripts from scratch it would probably lead to completely new issues ;)
I have pushed a couple of PRs month and month ago that should solve much, if not all, of this but there is no interest in dealing with them so... :(
@FransUrbo can you link them?
Here are the two open PRs. They need reviewers and testers.
I imagine phase 1 was merged? if so I'll test these tonight
and... both patches don't apply :|
I've force-pushed both of them now. I HAVE NOT BEEN ABLE TO VERIFY THIS, so be prepared that there might be merge issues lingering…
Once it have been reviewed and checked, I'll might cleanup everything and make sure I haven't removed something that should be there and vise-versa...
Also, do note that "Phase 3" contains the patches from "Phase 2"! So take that into account when/if you review them both. Only the last three commits in "Phase 3" is unique to that PR.
so, do I apply phase2 then phase3 or just phase3? also, I'll test later today
Doesn't really matters, but since you're interested in the Dracut stuff and to save time, just use "Phase 3" (only).
Remember to place the note/comment you come up with at the right commit and line (or just summerise them here)..
@prometheanfire, did the patch work for you? I'm having an issue and am trying to track down where it occurs.
no, it didn't apply, even after the rebase
Patch applied for me on Void Linux, but didn't quite work with dracut.
@Vaelatern This (the 'Phase 3' PR) works now, right?
Yes, when applied to the 0.6.4 release.
@prometheanfire This is the generator I am using with dracut 44 and systemd 229 on fedora 24. I'm using the stock dracut sysroot generator with root=tankette/ROOT/fedora/os rootfstype=zfs rootflags=zfsutil
as the kernel options.
I didn't have time to test out the Phase 3 PR as I just needed to get boot working, and didn't have access to git from the rescue env I was using.
That didn't work for me, I have to have root=zfs: to do anything, and that messes the rest up (including the fstab generator it seems) zfs: isn't stripped and root=pool/dataset doesn't work either.
It looks like my linux box has failed a victim of this issue too. The box stops with the following message:
mount: special device ZFS=permafrost/os/fedora-23 does not exist
sysroot.mount: Mount process exited, code =exited status=32.
Failed to mount /sysroot.
As a workaround, I tried to replace the kernel parameter root=ZFS=permafrost/os/fedora-23
by
a) root=zfs:AUTO
b) root=zfs:permafrost/os/fedora-23
c) root=permafrost/os/fedora-23
d) rpool=permafrost
e) bootfs=permafrost/os/fedora-23
Kernel parameters a)-c) didn't make significant difference, while d) or e) worked like a charm: the box booted without any problem. I decided to use e) as a permanent workaround. For that purpose, I modified /etc/grub.d/10_linux
. After the modification, grub2-mkconfig
generates grub.cfg
, where the kernel is loaded with the said parameter e).
Let me know if you are interested in this workaround.
System Details
$ cat /etc/redhat-release
Fedora release 23
$ systemctl --version | head -n 1
systemd 222
$ dnf list installed dracut-tools
drucut-tools-043-63
spl-0.6.5.4.tar.gz
and zfs-0.6.5.4.tar.gz
. The tar balls were downloaded from ZoL.ext4
to zfs
filesystem closely resembles the one described by Rudd-O.Funny when one arrives at a bug that one experiences, only to discover that the folks experiencing the bug are in fact using some of my work. Hehehe.
Okay, this bit me too, but I have it fixed now. My tree at https://github.com/Rudd-O/zfs now contains the necessary bits to fix the Fedora not booting issue. Relevant files are contrib/90zfs/module-setup.sh.in
and contrib/90zfs/zfs-generator.sh.in
(of course, together with that directory's Makefile.am
).
The technique: if ZFS is detected as the root file system, then it modifies the sysroot.mount
generated unit via a drop-in, so that sysroot.mount
does its job properly. Note that you do not need to specify rootflags
or rootfstype
-- a simple root=ZFS=yadda/yadda/yadda
does the job. Also supported: root=zfs:yadda/yadda/yadda
and root=yadda/yadda/yadda rootfstype=zfs
.
I welcome pull requests to add support for options (a) (d) (e). In particular, the automatic detection of the boot file system is NOT supported in this iteration of the generator, because at the time of the generator being executed, none of the pools are inspectable. Of course, I welcome fixes to this.
Note this work will probably only work with host-only initial RAM disks. I haven't tested generic ones.
My tree also contains code that will correctly deploy bootable ZFS with LUKS encryption. Relevant files are in contrib/02zfsexpandknowledge/
.
For those of you who want a patch:
diff --git a/Makefile.am b/Makefile.am
index ca8c8a0..334955c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,7 @@ AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = autogen.sh copy-builtin
EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am
EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown OPENSOLARIS.LICENSE
+EXTRA_DIST += grub2/README
distclean-local::
-$(RM) -R autom4te*.cache
diff --git a/configure.ac b/configure.ac
index 41cd007..5037ccb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,6 +114,7 @@ AC_CONFIG_FILES([
contrib/Makefile
contrib/bash_completion.d/Makefile
contrib/dracut/Makefile
+ contrib/dracut/02zfsexpandknowledge/Makefile
contrib/dracut/90zfs/Makefile
contrib/initramfs/Makefile
module/Makefile
diff --git a/contrib/dracut/02zfsexpandknowledge/Makefile.am b/contrib/dracut/02zfsexpandknowledge/Makefile.am
new file mode 100644
index 0000000..0a2170b
--- /dev/null
+++ b/contrib/dracut/02zfsexpandknowledge/Makefile.am
@@ -0,0 +1,22 @@
+pkgdracutdir = $(dracutdir)/modules.d/02zfsexpandknowledge
+pkgdracut_SCRIPTS = \
+ module-setup.sh
+
+EXTRA_DIST = \
+ $(top_srcdir)/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in
+
+$(pkgdracut_SCRIPTS):
+ -$(SED) -e 's,@bindir\@,$(bindir),g' \
+ -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@datadir\@,$(datadir),g' \
+ -e 's,@dracutdir\@,$(dracutdir),g' \
+ -e 's,@udevdir\@,$(udevdir),g' \
+ -e 's,@udevruledir\@,$(udevruledir),g' \
+ -e 's,@sysconfdir\@,$(sysconfdir),g' \
+ "$(top_srcdir)/contrib/dracut/02zfsexpandknowledge/$@.in" >'$@'
+
+clean-local::
+ -$(RM) $(pkgdracut_SCRIPTS)
+
+distclean-local::
+ -$(RM) $(pkgdracut_SCRIPTS)
diff --git a/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in
new file mode 100755
index 0000000..830ee42
--- /dev/null
+++ b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in
@@ -0,0 +1,132 @@
+#!/bin/sh
+
+get_devtype() {
+ local typ
+ typ=$(udevadm info --query=property --name="$1" | grep "^ID_FS_TYPE=" | sed 's|^ID_FS_TYPE=||')
+ if [ "$typ" = "" ] ; then
+ typ=$(blkid -c /dev/null "$1" -o value -s TYPE)
+ fi
+ echo "$typ"
+}
+
+get_pool_devices() {
+ # also present in 99zfssystemd
+ local poolconfigtemp
+ local poolconfigoutput
+ local pooldev
+ local prefix
+ poolconfigtemp=`mktemp`
+ @sbindir@/zpool list -v -H "$1" > "$poolconfigtemp" 2>&1
+ if [ "$?" != "0" ] ; then
+ poolconfigoutput=$(cat "$poolconfigtemp")
+ dinfo "zfsexpandknowledge: pool $1 cannot be listed: $poolconfigoutput"
+ else
+ while read pooldev ; do
+ for prefix in /dev/disk/* /dev/mapper ; do
+ if [ -e "$prefix"/"$pooldev" ] ; then
+ dinfo "zfsexpandknowledge: pool $1 has device $prefix/$pooldev"
+ echo `readlink -f "$prefix"/"$pooldev"`
+ break
+ fi
+ done
+ done < <(cat "$poolconfigtemp" | awk -F '\t' 'NR>1 { print $2 }')
+ fi
+ rm -f "$poolconfigtemp"
+}
+
+find_zfs_block_devices() {
+ local dev
+ local blockdev
+ local mp
+ local fstype
+ local pool
+ local key
+ local n
+ local poolconfigoutput
+ numfields=`head -1 /proc/self/mountinfo | awk '{print NF}'`
+ if [ "$numfields" == "10" ] ; then
+ fields="n n n n mp n n fstype dev n"
+ else
+ fields="n n n n mp n n n fstype dev n"
+ fi
+ while read $fields ; do
+ if [ "$fstype" != "zfs" ]; then continue ; fi
+ if [ "$mp" == "$1" ]; then
+ pool=$(echo "$dev" | cut -d / -f 1)
+ get_pool_devices "$pool"
+ fi
+ done < /proc/self/mountinfo
+}
+
+array_contains () {
+ local e
+ for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
+ return 1
+}
+
+check() {
+ local mp
+ local dev
+ local blockdevs
+ local fstype
+ local majmin
+ local _slavedev
+ local _slavedevname
+ local _slavedevtype
+ local _slavemajmin
+ local _dev
+
+if [[ $hostonly ]]; then
+
+ for mp in \
+ "/" \
+ "/etc" \
+ "/bin" \
+ "/sbin" \
+ "/lib" \
+ "/lib64" \
+ "/usr" \
+ "/usr/bin" \
+ "/usr/sbin" \
+ "/usr/lib" \
+ "/usr/lib64" \
+ "/boot";
+ do
+ mp=$(readlink -f "$mp")
+ mountpoint "$mp" >/dev/null 2>&1 || continue
+ blockdevs=$(find_zfs_block_devices "$mp")
+ if [ -z "$blockdevs" ] ; then continue ; fi
+ dinfo "zfsexpandknowledge: block devices backing ZFS dataset $mp: $blockdevs"
+ for dev in $blockdevs
+ do
+ array_contains "$dev" "${host_devs[@]}" || host_devs+=("$dev")
+ fstype=$(get_devtype "$dev")
+ host_fs_types["$dev"]="$fstype"
+ majmin=$(get_maj_min "$dev")
+ if [[ -d /sys/dev/block/$majmin/slaves ]] ; then
+ for _slavedev in /sys/dev/block/$majmin/slaves/*; do
+ [[ -f $_slavedev/dev ]] || continue
+ _slavedev=/dev/$(basename "$_slavedev")
+ _slavedevname=$(udevadm info --query=property --name="$_slavedev" | grep "^DEVNAME=" | sed 's|^DEVNAME=||')
+ _slavedevtype=$(get_devtype "$_slavedevname")
+ _slavemajmin=$(get_maj_min "$_slavedevname")
+ dinfo "zfsexpandknowledge: slave block device backing ZFS dataset $mp: $_slavedevname"
+ array_contains "$_slavedevname" "${host_devs[@]}" || host_devs+=("$_slavedevname")
+ host_fs_types["$_slavedevname"]="$_slavedevtype"
+ done
+ fi
+ done
+ done
+ for a in "${host_devs[@]}"
+ do
+ dinfo "zfsexpandknowledge: host device $a"
+ done
+ for a in "${!host_fs_types[@]}"
+ do
+ dinfo "zfsexpandknowledge: device $a of type ${host_fs_types[$a]}"
+ done
+
+fi
+
+return 1
+}
diff --git a/contrib/dracut/90zfs/Makefile.am b/contrib/dracut/90zfs/Makefile.am
index b778a27..f81d6c3 100644
--- a/contrib/dracut/90zfs/Makefile.am
+++ b/contrib/dracut/90zfs/Makefile.am
@@ -4,6 +4,7 @@ pkgdracut_SCRIPTS = \
module-setup.sh \
mount-zfs.sh \
parse-zfs.sh \
+ zfs-generator.sh \
zfs-lib.sh
EXTRA_DIST = \
@@ -11,6 +12,7 @@ EXTRA_DIST = \
$(top_srcdir)/contrib/dracut/90zfs/module-setup.sh.in \
$(top_srcdir)/contrib/dracut/90zfs/mount-zfs.sh.in \
$(top_srcdir)/contrib/dracut/90zfs/parse-zfs.sh.in \
+ $(top_srcdir)/contrib/dracut/90zfs/zfs-generator.sh.in \
$(top_srcdir)/contrib/dracut/90zfs/zfs-lib.sh.in
$(pkgdracut_SCRIPTS):
@@ -19,6 +21,7 @@ $(pkgdracut_SCRIPTS):
-e 's,@udevdir\@,$(udevdir),g' \
-e 's,@udevruledir\@,$(udevruledir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
+ -e 's,@systemdunitdir\@,$(systemdunitdir),g' \
"$(top_srcdir)/contrib/dracut/90zfs/$@.in" >'$@'
distclean-local::
diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in
index 9eb9f57..301375a 100755
--- a/contrib/dracut/90zfs/module-setup.sh.in
+++ b/contrib/dracut/90zfs/module-setup.sh.in
@@ -40,16 +40,22 @@ install() {
dracut_install awk
dracut_install head
inst_hook cmdline 95 "${moddir}/parse-zfs.sh"
- inst_hook mount 98 "${moddir}/mount-zfs.sh"
+ if [ -n "$systemdutildir" ] ; then
+ inst_script "${moddir}/zfs-generator.sh" "$systemdutildir"/system-generators/dracut-zfs-generator
+ else
+ inst_hook mount 98 "${moddir}/mount-zfs.sh"
+ fi
inst_hook shutdown 30 "${moddir}/export-zfs.sh"
inst_simple "${moddir}/zfs-lib.sh" "/lib/dracut-zfs-lib.sh"
if [ -e @sysconfdir@/zfs/zpool.cache ]; then
inst @sysconfdir@/zfs/zpool.cache
+ type mark_hostonly >/dev/null 2>&1 && mark_hostonly @sysconfdir@/zfs/zpool.cache
fi
if [ -e @sysconfdir@/zfs/vdev_id.conf ]; then
inst @sysconfdir@/zfs/vdev_id.conf
+ type mark_hostonly >/dev/null 2>&1 && mark_hostonly @sysconfdir@/zfs/vdev_id.conf
fi
# Synchronize initramfs and system hostid
@@ -58,4 +64,15 @@ install() {
CC=`hostid | cut -b 5,6`
DD=`hostid | cut -b 7,8`
printf "\x${DD}\x${CC}\x${BB}\x${AA}" > "${initdir}/etc/hostid"
+
+ if dracut_module_included "systemd"; then
+ mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants"
+ for _item in scan cache ; do
+ dracut_install @systemdunitdir@/zfs-import-$_item.service
+ if ! [ -L "${initdir}/$systemdsystemunitdir/initrd.target.wants"/zfs-import-$_item.service ]; then
+ ln -s ../zfs-import-$_item.service "${initdir}/$systemdsystemunitdir/initrd.target.wants"/zfs-import-$_item.service
+ type mark_hostonly >/dev/null 2>&1 && mark_hostonly @systemdunitdir@/zfs-import-$_item.service
+ fi
+ done
+ fi
}
diff --git a/contrib/dracut/90zfs/zfs-generator.sh.in b/contrib/dracut/90zfs/zfs-generator.sh.in
new file mode 100644
index 0000000..0e0664d
--- /dev/null
+++ b/contrib/dracut/90zfs/zfs-generator.sh.in
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+GENERATOR_DIR="$1"
+[ -z "$GENERATOR_DIR" ] && exit 1
+
+[ -f /lib/dracut-lib.sh ] && dracutlib=/lib/dracut-lib.sh
+[ -f /usr/lib/dracut/modules.d/99base/dracut-lib.sh ] && dracutlib=/usr/lib/dracut/modules.d/99base/dracut-lib.sh
+
+type getarg >/dev/null 2>&1 || . "$dracutlib"
+
+[ -z "$root" ] && root=$(getarg root=)
+[ -z "$rootfstype" ] && rootfstype=$(getarg rootfstype=)
+[ -z "$rootflags" ] && rootflags=$(getarg rootflags=)
+
+[ "${root##zfs:}" = "${root}" -a "${root##ZFS=}" = "${root}" -a "$rootfstype" != "zfs" ] && exit 0
+
+rootfstype=zfs
+if echo "${rootflags}" | grep -q zfsutil ; then
+ true
+else
+ rootflags=zfsutil
+fi
+
+root="${root##zfs:}"
+root="${root##ZFS=}"
+
+[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR"
+[ -d "$GENERATOR_DIR/sysroot.mount.d" ] || mkdir "$GENERATOR_DIR/sysroot.mount.d"
+
+{
+ echo "[Unit]"
+ echo "After=zfs-import-scan.service"
+ echo "After=zfs-import-cache.service"
+ echo ""
+ echo "[Mount]"
+ echo "What=${root}"
+ echo "Type=${rootfstype}"
+ echo "Options=${rootflags}"
+} > "$GENERATOR_DIR/sysroot.mount.d/zfs-enhancement.conf"
diff --git a/contrib/dracut/Makefile.am b/contrib/dracut/Makefile.am
index 35b88c3..1065e5e 100644
--- a/contrib/dracut/Makefile.am
+++ b/contrib/dracut/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = 90zfs
+SUBDIRS = 02zfsexpandknowledge 90zfs
EXTRA_DIST = README.dracut.markdown
diff --git a/grub2/README b/grub2/README
new file mode 100644
index 0000000..3ae86c3
--- /dev/null
+++ b/grub2/README
@@ -0,0 +1,10 @@
+ATTENTION
+=========
+
+The patches in this directory were obsoleted by:
+
+https://github.com/Rudd-O/zfs-fedora-installer/tree/master/grub-zfs-fixer
+
+Build and install that RPM on your system to avoid the need to rebuild GRUB for ZFS.
+
+Instructions on how to build and install that RPM are available there.
\ No newline at end of file
diff --git a/tests/zfs-tests/include/Makefile.am b/tests/zfs-tests/include/Makefile.am
index d9e6f47..a10d6a3 100644
--- a/tests/zfs-tests/include/Makefile.am
+++ b/tests/zfs-tests/include/Makefile.am
@@ -5,6 +5,3 @@ dist_pkgdata_SCRIPTS = \
libtest.shlib \
math.shlib \
properties.shlib
-
-EXTRA_DIST = \
- zfs_commands.cfg
diff --git a/tests/zfs-tests/include/zfs_commands.cfg b/tests/zfs-tests/include/zfs_commands.cfg
deleted file mode 120000
index 222b038..0000000
--- a/tests/zfs-tests/include/zfs_commands.cfg
+++ /dev/null
@@ -1 +0,0 @@
-../../../zfs-script-config.sh
\ No newline at end of file
In reply to @Rudd-O comment
For those of you who want a patch
what version the patch is good for: zfs-0.6.5.4.tar.gz
, zfs-0.6.5.5.tar.gz
, or zfs-0.6.5.6.tar.gz
?
The patch is meant for the latest HEAD from master. It is literally the diff between zfsonlinux/master and Rudd-O/master.
It may also apply to the latest stable release.
Rudd-O
http://rudd-o.com/
zfs-0.6.5.6.tar.gz
. It would be nice to know whether there is any effort underway to merge this patch into the mainstream. Please forgive me for posting a question, which might be too trivial for this forum.permafrost/os/fedora-23/var
in permafrost
pool. Its mountpoint is inherited from permafrost/os/fedora-23
. During boot, the permafrost/os/fedora-23
is mounted as /
. So far, so good.
Then, some process creates files in /var
(the aforesaid dataset has not been mounted yet). Later in the boot sequence, permafrost
is exported, and then imported. At this point, the boot sequence complains that /var
is not an empty directory. That is why, it refuses to mount permafrost/os/fedora-23/var
at /var
.Another issue I'd say. I'm going to test this diff again tonight and see how it goes.
@Rudd-O github messed up your paste, mind making it a gist so tabs are preserved?
@Rudd-O also...
configure.ac:59: error: required file 'contrib/dracut/02zfsexpandknowledge/Makefile.in' not found
for some reason the patches aren't creating it
had to remove the leading b from the diff for some reason
--- /dev/null
+++ contrib/dracut/02zfsexpandknowledge/Makefile.am
ok, this patch works
If someone could open a PR with the proposed patch it could at least be considered and maybe we could round up some reviewers and testers.
Now that is ZFS appearing in more distributions it might be a good time to revisit working with the upstream dracut developers and ask them to include ZFS support. Any volunteers?
@behlendorf The only reason I've avoided opening a patch is because it's not my code, I will though if @Rudd-O agrees.
The easiest way to generate a patch is to add my own repo as a remote, then fetch it, then git diff v0.6.5...ruddo/master.
I am absolutely ecstatic to have this merged into mainline because I am frigging tired of carrying the patch myself :-) So this is official authorization to do whatever it takes to merge it.
any reason you can't submit a pr?
also, your commits seem a bit too much :p
https://github.com/zfsonlinux/zfs/compare/master...Rudd-O:master
diff, don't log.
I could submit PRs but I am short on time these days.
@Rudd-O if you are fine with this I'll submit it https://gist.github.com/1321ac579366bc153362
This looks good for PR submission (which should certainly be reviewed as my code can be a bit shit). Make a note that they came from my repo, and remove all changes that touch zfs-tests because those are bug fixes from master that should go in or have gone in already.
Teamwork!
BTW, in THEORY (as opposed to in practice) how do we test that these changes work across all dracut-using distros? Do we have a test farm?
I don't think we do :(
I'll submit the PR tonight though
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 errorunable to mount /sysroot
, leaving a Busybox rescue shell; usingzpool import -R / poolname
and evenzpool 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
andzfs-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.