]> granicus.if.org Git - zfs/commitdiff
contrib/initramfs: add missing conf.d/zfs
authorLOLi <loli10K@users.noreply.github.com>
Mon, 12 Feb 2018 19:40:00 +0000 (20:40 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 12 Feb 2018 19:40:00 +0000 (11:40 -0800)
When upgrading from the distribution-provided zfs-initramfs package on
root-on-zfs Ubuntu and Debian the system may fail to boot: this change
adds the missing initramfs configuration file.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7158

contrib/initramfs/Makefile.am
contrib/initramfs/conf.d/zfs [new file with mode: 0644]

index b1ab0c951ead05848e4ebbf53d1edda9d99d108c..87ec7a86f5acbd34e3dc2e9e0de4f3224c42049d 100644 (file)
@@ -1,15 +1,17 @@
 initrddir = $(datarootdir)/initramfs-tools
 
-initrd_SCRIPTS = conf-hooks.d/zfs hooks/zfs scripts/zfs scripts/local-top/zfs
+initrd_SCRIPTS = \
+       conf.d/zfs conf-hooks.d/zfs hooks/zfs scripts/zfs scripts/local-top/zfs
 
 SUBDIRS = hooks scripts
 
 EXTRA_DIST = \
+       $(top_srcdir)/contrib/initramfs/conf.d/zfs \
        $(top_srcdir)/contrib/initramfs/conf-hooks.d/zfs \
        $(top_srcdir)/contrib/initramfs/README.initramfs.markdown
 
 install-initrdSCRIPTS: $(EXTRA_DIST)
-       for d in conf-hooks.d hooks scripts scripts/local-top; do \
+       for d in conf.d conf-hooks.d hooks scripts scripts/local-top; do \
          $(MKDIR_P) $(DESTDIR)$(initrddir)/$$d; \
          cp $(top_srcdir)/contrib/initramfs/$$d/zfs \
            $(DESTDIR)$(initrddir)/$$d/; \
diff --git a/contrib/initramfs/conf.d/zfs b/contrib/initramfs/conf.d/zfs
new file mode 100644 (file)
index 0000000..c67d75b
--- /dev/null
@@ -0,0 +1,8 @@
+for x in $(cat /proc/cmdline)
+do
+       case $x in
+               root=ZFS=*|root=zfs:*)
+                       BOOT=zfs
+                       ;;
+       esac
+done