-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Script zfs-functions missing from generated .deb packages, causes kernel panic #7904
Comments
@ColinIanKing This seems like something you fix distro side. Is there something that can be done here in the upstream that can help everyone? |
Could this bug be added back to the 0.8.0 milestone? This breaks updating to 0.8.0 via the -rc tarballs here if you run Debian/Ubuntu and use ZFS as root filesystem. This comes totally as a surprive as the zfs-initramfs package is installed and update-initramfs works fine. Most users of the packages are likely building dkms packages and some are also using initramfs - even if it's not officially recommend/supported - including this script avoiding breakage would be nice :) |
For what it's worth, I'm currently building some functional packages for my personal use on all of my systems, so I'll post a link here when I'm done with that. |
If anyone has this problem and access to serial console or something similiar: Add Adding the file to |
How does this work on rpm based systems? A quick build and inspection of the generated |
@cwedgwood rpm-based systems use dracut - that is probably completly different? In this case the file is missing from the zfs-initramfs package and is not included in the initramfs - but there is a dedicated dracut package that might work different - so maybe the problem is debian only? Also the contents of the rpm do not matter, it's only the initrd contents that need to work correctly. |
@mtippmann yeah, that makes sense ... i did a very quick hack to show some thoughts on what might make sense so people can comment, it almost certainly needs some tweaks/fixes before it's ready |
@cwedgwood thanks for taking care of this! |
Yep... This made my zfs boot install unbootable today. While trying to upgrade from ubuntu's inbuilt Tried booting back to the previous kernel but same issue. |
OK, to be clear, zfs-functions should be copied to /etc/zfs is the fix? I can add that to the ubuntu zfs packaging now. |
Yes, @ColinIanKing, having |
FYI: The Ubuntu packaging for zfsutls-linux 0.8.1 already copies this file to /etc/zfs, the debian/zfsutils-linux.install performs this at the installation stage. |
@ColinIanKing: Ubuntu's packaging never had this issue, as far as I know. The issue is with the |
Ah, apologies for my misunderstanding. Sorry for the noise. |
This should be fixed by #9089. @ReimuHakurei could you test that, please? |
That looks like it would probably fix it, but it's been a while since I built packages so I'll have to double-check. I'll give it a whirl tomorrow. |
That PR actually throws a compilation error when I run 'make deb' on my system, saying zfs-functions and etc/default/zfs can't be found. |
@ReimuHakurei Unfortunately I lost my crystal ball... scnr Can you share your build log, please? What debian release? |
The full log is quite large, but here's the relevant part:
|
Also likely related: the zfs-function script doesn't seem to actually get built. It's compiled from a file named zfs-functions.in, which has some paths that get filled in to it. I just compiled 0.8.1 stock from source to update my .debs I install on my systems, and had to do that manually because that file wasn't ever built during compilation. |
I really need the full log to check this. You can upload text files to Github, so please do ;)
My PR fixes that. |
Try that. |
@ReimuHakurei thanks, I'll have a look at this |
@ReimuHakurei I can't reproduce this. Even the tests are all fine, see #9089. this line confuses me....
There is no commit hash... just to be sure... you tried to build this one #9089, right? Which are your configure flags? |
Yeah, I did it from that PR. No configure flags. I'll nuke the directory tree and try it on a clean tree again. |
Alright, I nuked the entire tree and restarted from scratch. This time it built DEBs but zfs-functions is not in the zfs DEB it builds. I used the commands from this build guide, just like I always do when building ZFS: https://github.com/zfsonlinux/zfs/wiki/Building-ZFS Exact sequence of build commands that I ran:
So either I'm an idiot (which is quite possible), or there's still something broken there. Also, the files it generates are labeled 0.8.0-1 still, not 0.8.1-1. |
Hmm... I will check this again later on a fresh Ubuntu Server instance. Maybe that makes a difference |
@ReimuHakurei I just reworked the rpm spec again. Could you do another test, please? |
I just built DEBs and did a test install with ZFS root in a virtual machine, and it did boot and appear to function. The generated packages still have the dependencies being broken, but I'm not sure anything can be done about that as long as they're being translated from RPMs with alien. |
Great, thanks for testing! |
* contrib/initramfs: include /etc/default/zfs and /etc/zfs/zfs-functions At least debian needs /etc/default/zfs and /etc/zfs/zfs-functions for its initramfs. Include both in build when initramfs is configured. * contrib/initramfs: include 60-zvol.rules and zvol_id Include 60-zvol.rules and zvol_id and set udev as predependency instead of debians zdev. This makes debians additional zdev hook unneeded. * Correct initconfdir substitution for some distros Not every Linux distro is using @sysconfdir@/default but @initconfdir@ which is already determined by configure. Let's use it. * systemd: prevent possible conflict between systemd and sysvinit Systemd will not load a sysvinit service if a unit exists with the same name. This prevents conflicts between sysvinit and systemd. In ZFS there is one sysvinit service that does not have a systemd service but a target counterpart, zfs-import.target. Usually it does not make any sense to install both but it is possisble. Let's prevent any conflict by masking zfs-import.service by default. This does not harm even if init.d/zfs-import does not exist. Reviewed-by: Chris Wedgwood <cw@f00f.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Tested-by: Alex Ingram <reimu@reimuhakurei.net> Tested-by: Dreamcat4 <dreamcat4@gmail.com> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Closes #7904 Closes #9089
* contrib/initramfs: include /etc/default/zfs and /etc/zfs/zfs-functions At least debian needs /etc/default/zfs and /etc/zfs/zfs-functions for its initramfs. Include both in build when initramfs is configured. * contrib/initramfs: include 60-zvol.rules and zvol_id Include 60-zvol.rules and zvol_id and set udev as predependency instead of debians zdev. This makes debians additional zdev hook unneeded. * Correct initconfdir substitution for some distros Not every Linux distro is using @sysconfdir@/default but @initconfdir@ which is already determined by configure. Let's use it. * systemd: prevent possible conflict between systemd and sysvinit Systemd will not load a sysvinit service if a unit exists with the same name. This prevents conflicts between sysvinit and systemd. In ZFS there is one sysvinit service that does not have a systemd service but a target counterpart, zfs-import.target. Usually it does not make any sense to install both but it is possisble. Let's prevent any conflict by masking zfs-import.service by default. This does not harm even if init.d/zfs-import does not exist. Reviewed-by: Chris Wedgwood <cw@f00f.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Tested-by: Alex Ingram <reimu@reimuhakurei.net> Tested-by: Dreamcat4 <dreamcat4@gmail.com> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Closes openzfs#7904 Closes openzfs#9089
* contrib/initramfs: include /etc/default/zfs and /etc/zfs/zfs-functions At least debian needs /etc/default/zfs and /etc/zfs/zfs-functions for its initramfs. Include both in build when initramfs is configured. * contrib/initramfs: include 60-zvol.rules and zvol_id Include 60-zvol.rules and zvol_id and set udev as predependency instead of debians zdev. This makes debians additional zdev hook unneeded. * Correct initconfdir substitution for some distros Not every Linux distro is using @sysconfdir@/default but @initconfdir@ which is already determined by configure. Let's use it. * systemd: prevent possible conflict between systemd and sysvinit Systemd will not load a sysvinit service if a unit exists with the same name. This prevents conflicts between sysvinit and systemd. In ZFS there is one sysvinit service that does not have a systemd service but a target counterpart, zfs-import.target. Usually it does not make any sense to install both but it is possisble. Let's prevent any conflict by masking zfs-import.service by default. This does not harm even if init.d/zfs-import does not exist. Reviewed-by: Chris Wedgwood <cw@f00f.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Tested-by: Alex Ingram <reimu@reimuhakurei.net> Tested-by: Dreamcat4 <dreamcat4@gmail.com> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Closes openzfs#7904 Closes openzfs#9089
* contrib/initramfs: include /etc/default/zfs and /etc/zfs/zfs-functions At least debian needs /etc/default/zfs and /etc/zfs/zfs-functions for its initramfs. Include both in build when initramfs is configured. * contrib/initramfs: include 60-zvol.rules and zvol_id Include 60-zvol.rules and zvol_id and set udev as predependency instead of debians zdev. This makes debians additional zdev hook unneeded. * Correct initconfdir substitution for some distros Not every Linux distro is using @sysconfdir@/default but @initconfdir@ which is already determined by configure. Let's use it. * systemd: prevent possible conflict between systemd and sysvinit Systemd will not load a sysvinit service if a unit exists with the same name. This prevents conflicts between sysvinit and systemd. In ZFS there is one sysvinit service that does not have a systemd service but a target counterpart, zfs-import.target. Usually it does not make any sense to install both but it is possisble. Let's prevent any conflict by masking zfs-import.service by default. This does not harm even if init.d/zfs-import does not exist. Reviewed-by: Chris Wedgwood <cw@f00f.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Tested-by: Alex Ingram <reimu@reimuhakurei.net> Tested-by: Dreamcat4 <dreamcat4@gmail.com> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Closes #7904 Closes #9089
System information
Describe the problem you're observing
When building DEB packages of ZFSonLinux with 'make deb', the script 'zfs-functions' does not end up in any of the generated DEB files.
At the very least, this results in a kernel panic when attempting to boot, if you are using a ZFS root filesystem. I would imagine it probably breaks other stuff too, but have not tested this.
The file does get generated in the source tree at ./etc/init.d/zfs-functions. Manually copying this to /etc/zfs/ (which is where Ubuntu expects it) allows the system to boot and function normally.
Modifying the DEB file to manually place this file in /etc/zfs/ also results in a package that installs and works correctly.
Describe how to reproduce the problem
Compile ZFS, then run 'make deb'. Attempt to use the generated packages.
Include any warning/errors/backtraces from the system logs
N/A
The text was updated successfully, but these errors were encountered: