Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remake_initrd needs to be yes #849

Closed
Rudd-O opened this issue Jul 24, 2012 · 9 comments
Closed

remake_initrd needs to be yes #849

Rudd-O opened this issue Jul 24, 2012 · 9 comments
Labels
Type: Building Indicates an issue related to building binaries

Comments

@Rudd-O
Copy link
Contributor

Rudd-O commented Jul 24, 2012

In the DKMS branch, the code in dkms.conf that says

REMAKE_INITRD="no"

needs to be yes. The reason it needs to be yes is because ZFS support needs to be included into the initial RAM disk after compilation. Otherwise, ZFS fails to load upon boot, rendering ZFS-on-root setups unbootable.

Same goes for spl's dkms.conf.

Thanks in advance :-)

@Rudd-O
Copy link
Contributor Author

Rudd-O commented Jul 24, 2012

This is the workaround I am using ATM:


/etc/kernel/postinst.d@karen.dragonfear α:                                                                                                                                  
ls                                                                                                                                                                          
dkms  zfs_dkms_workaround                                                                                                                                                   

0 <- ls
/etc/kernel/postinst.d@karen.dragonfear α:
cat zfs_dkms_workaround 
#!/bin/bash

set -e

# We're passed the version of the kernel being installed
inst_kern=$1

/usr/lib/dkms/dkms_autoinstaller start $inst_kern

dracut -f /boot/initramfs-$inst_kern.img $inst_kern

@ghost ghost assigned prakashsurya Jul 24, 2012
@behlendorf
Copy link
Contributor

Good tip, I've assigned the issue to Prakash to follow up with an updated patch when he gets the time.

@FransUrbo
Copy link
Contributor

But if we're not booting from ZFS, we don't need zfs in the initrd and therefor don't need to remake the initrd... So setting this to yes globaly (for everyone), might be a bad thing...

@FransUrbo
Copy link
Contributor

@behlendorf Should we close this as 'wont-fix' (considering it might be a bad thing to globally for everyone)? Or should we retag it as 'Documentation' and document it somewhere (where in such case - people don't read documentation :)?

@Rudd-O
Copy link
Contributor Author

Rudd-O commented Jun 8, 2014

Turbo, Frans, @behlendorf , if you are not booting from ZFS, then the initrd won't contain ZFS, so remaking the initrd is an entirely harmless no-op. NOT remaking the initrd, on the other hand, renders the system unbootable, if you were installing these packages to a ZFS-based chroot you intend to boot from during next boot.

@FransUrbo
Copy link
Contributor

I'm not sure it's kosher to remake a/the initrd if there's no need for it.

@behlendorf behlendorf modified the milestones: 0.6.4, 0.7.0 Jun 10, 2014
@behlendorf
Copy link
Contributor

@Rudd-O I agree this should default to 'yes' assuming all the required dependencies are installed. But since the zfs-dracut package is optional we're going to need to do something slightly more complicated. If you look at the Ubuntu DKMS package @dajhorn does the following which looks like a nice clean way to handle this.

REMAKE_INITRD="$(
  if [ -e /usr/share/initramfs-tools/hooks/zfs \
       -o -e /usr/share/dracut/modules.d/90zfs ]
  then
    echo -n yes
  else
    echo -n no
  fi
)"

If we could get a similar solution tested I have no objection to merging it.

@behlendorf behlendorf removed this from the 0.6.4 milestone Oct 6, 2014
@behlendorf
Copy link
Contributor

Closing. This is an issue for the distribution packaging.

@Rudd-O
Copy link
Contributor Author

Rudd-O commented Aug 12, 2016

What about the same thing in the case of ZFS DKMS on Fedora and Red Hat? In these cases, clearly this repo is the source of the packaging. Over here, whenever I upgrade the ZFS DKMS packages, I end up having to remake the initrd right after the RPM install, because the initrds will contain either no ZFS or the prior ZFS version.

pcd1193182 pushed a commit to pcd1193182/zfs that referenced this issue Sep 26, 2023
Addresses a small conflict in zil.c during the last automated merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

No branches or pull requests

4 participants