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 tonyhutter committed Mar 8, 2018
1 parent 519bb86 commit b9e918e
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,16 +1,18 @@
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

EXTRA_DIST = \
$(top_srcdir)/contrib/initramfs/conf.d/zfs \
$(top_srcdir)/contrib/initramfs/conf-hooks.d/zfs \
$(top_srcdir)/contrib/initramfs/hooks/zfs \
$(top_srcdir)/contrib/initramfs/scripts/zfs \
$(top_srcdir)/contrib/initramfs/scripts/local-top/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 b9e918e

Please sign in to comment.