From: adrian-bl <adrian-bl@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: ZFS 2.1.5_1 breaks boot on non zfs-on-root systems
Date: Fri, 24 Jun 2022 16:22:24 +0200 [thread overview]
Message-ID: <20220624142224.UhtJWw4p0G9D5OEjaTWg4WyMOWl_QOrIiV2aC09rJes@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37667@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 2228 bytes --]
New comment by adrian-bl on void-packages repository
https://github.com/void-linux/void-packages/issues/37667#issuecomment-1165622712
Comment:
@zdykstra
> What kernel commandline do you boot your system with?
```
[root@abyss adrian]# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.18.4_1 root=UUID=976f527a-5bf9-442c-be36-f57d98cd86d3 ro loglevel=4 rd.debug
```
@ahesford
No, i have `root` specified (see above)
> Also, as zdykstra mentioned, you shouldn't put the ZFS dracut module in your initramfs if you aren't booting a
> ZFS root.
Well, both systems are a pretty vanilla void installation - just with the ZFS package installed (because my /home is on ZFS). I don't think it is expected that i'd have to blocklist ZFS in dracut in such a configuration.
> this function should set root= to whatever the value is that you specified and leave it alone.
The problem here is that dracut already changed this value before:
So my system sets `root=UUID=976...`, let's look at dracut's `parse-block.sh`:
```
case "$root" in
block:LABEL=*|LABEL=*)
root="${root#block:}"
root="$(echo $root | sed 's,/,\\x2f,g')"
root="block:/dev/disk/by-label/${root#LABEL=}"
rootok=1 ;;
block:UUID=*|UUID=*)
root="${root#block:}"
root="${root#UUID=}"
root="$(echo $root | tr "[:upper:]" "[:lower:]")"
root="block:/dev/disk/by-uuid/${root#UUID=}"
rootok=1 ;;
```
Once this has run, `root` is set to `block:/dev/disk/by-uid/976...` (i verified that this is the case by booting with `rd.debug`)
Now later (after parse-block.sh but before the rootfs mount)`zfs-lib.sh` executes
```
root=$(getarg root=)
```
which will reset `root` with the value specified on the kernel command line, undoing whatever `parse-block.sh` did and ultimatively confusing the rest of dracut by having `root` set to a value it doesn't understand/expect.
(Also see here for the rd.debug output on how `root` is set/updated (note that this includes the patch i posted above (with xroot)) https://gist.githubusercontent.com/adrian-bl/49f25982d68b2e9ca4907b19ad4ce57b/raw/f72cbd3eb2d0fa461aa14279cf3b1fcb7c76866c/gistfile1.txt)
next prev parent reply other threads:[~2022-06-24 14:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 10:45 [ISSUE] " adrian-bl
2022-06-24 10:47 ` adrian-bl
2022-06-24 13:53 ` zdykstra
2022-06-24 13:54 ` ahesford
2022-06-24 14:19 ` adrian-bl
2022-06-24 14:22 ` adrian-bl [this message]
2022-06-24 15:31 ` ahesford
2022-06-24 16:25 ` Vaelatern
2022-06-24 16:41 ` Vaelatern
2022-06-30 21:30 ` [ISSUE] [CLOSED] " ahesford
2022-06-30 21:30 ` ahesford
2022-07-01 5:01 ` adrian-bl
2022-07-01 23:49 ` aaFn
2022-07-02 2:33 ` RunningDroid
2022-07-02 10:11 ` aaFn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220624142224.UhtJWw4p0G9D5OEjaTWg4WyMOWl_QOrIiV2aC09rJes@z \
--to=adrian-bl@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).