-
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
initramfs on Debian broken with respect to kernel cmdline option root=zfs:auto #11278
Comments
I ran some Debian updates yesterday on a production server with ZFS from buster-backports (ZFS package version 0.8.6-1~bpo10+1 on kernel package version 4.19.0-13-amd64 now) installed and it seems I have now run into this issue as well with the fallback to initramfs shell. Currently working around this by manually selecting an older initramfs/kernel to boot with. |
IFS= would break loops in import_pool(), which would fault any automatic import Additionally $ZFS_BOOTFS from cmdline would interfere with find_rootfs() If many pools were present, same thing could happen across multiple find_rootfs() runs, so bail out early and clean up in error path Suggested-by: @nachtgeist Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11278
@nachtgeist thanks for this! I couldn't get my head around this when I was fixing both initrd subsystems initially. Can you try this on your configuration(s) with the changes from #11838? Worked for me (and should in general), but you never know. |
Worked fine here as well. Thanks! |
IFS= would break loops in import_pool(), which would fault any automatic import Additionally $ZFS_BOOTFS from cmdline would interfere with find_rootfs() If many pools were present, same thing could happen across multiple find_rootfs() runs, so bail out early and clean up in error path Suggested-by: @nachtgeist Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11278 Closes #11838
IFS= would break loops in import_pool(), which would fault any automatic import Additionally $ZFS_BOOTFS from cmdline would interfere with find_rootfs() If many pools were present, same thing could happen across multiple find_rootfs() runs, so bail out early and clean up in error path Suggested-by: @nachtgeist Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11278 Closes openzfs#11838
IFS= would break loops in import_pool(), which would fault any automatic import Additionally $ZFS_BOOTFS from cmdline would interfere with find_rootfs() If many pools were present, same thing could happen across multiple find_rootfs() runs, so bail out early and clean up in error path Suggested-by: @nachtgeist Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11278 Closes openzfs#11838
IFS= would break loops in import_pool(), which would fault any automatic import Additionally $ZFS_BOOTFS from cmdline would interfere with find_rootfs() If many pools were present, same thing could happen across multiple find_rootfs() runs, so bail out early and clean up in error path Suggested-by: @nachtgeist Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11278 Closes openzfs#11838
IFS= would break loops in import_pool(), which would fault any automatic import Additionally $ZFS_BOOTFS from cmdline would interfere with find_rootfs() If many pools were present, same thing could happen across multiple find_rootfs() runs, so bail out early and clean up in error path Suggested-by: @nachtgeist Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11278 Closes openzfs#11838
System information
Describe the problem you're observing
Describe how to reproduce the problem
Include any warning/errors/backtraces from the system logs
(Please note the extra single ticks around '/sbin/zpool import -N ' in this case which do NOT occur in 1.)
In-depth analysis and proposed fix
mountroot()
, branching off from 814 to 841. Nothing special happening here, the calls toimport_pool
andfind_rootfs
from 857/858 work fine.mountroot()
, branching off from 814 to 816. In 830, IFS gets manipulated for a for-loop. The functionsimport_pool
andfind_rootfs
get called from within that for-loop, with the manipulated IFS in place.As a fix, I suggest to prefix the calls to import_pool… and find_rootfs… in 835/836 for the to read:
That way, the functions show the expected behaviour and IFS is not manipulated while the for-loop is active and thus not affecting the iteration of the for-loop itself.
The text was updated successfully, but these errors were encountered: