Skip to content

Commit

Permalink
contrib/initramfs: add missing conf.d/zfs
Browse files Browse the repository at this point in the history
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 openzfs#7158
  • Loading branch information
loli10K authored and Nasf-Fan committed Feb 13, 2018
1 parent bf2ffd0 commit 16261cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contrib/initramfs/Makefile.am
Original file line number Diff line number Diff line change
@@ -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/; \
Expand Down
8 changes: 8 additions & 0 deletions contrib/initramfs/conf.d/zfs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
for x in $(cat /proc/cmdline)
do
case $x in
root=ZFS=*|root=zfs:*)
BOOT=zfs
;;
esac
done

0 comments on commit 16261cd

Please sign in to comment.