| 14 Aug 2022 |
@elvishjerricco:matrix.org | Thank you systemd-fstab-generator for not sanity checking if it makes sense to look at /sysroot/etc/fstab yet... | 05:41:04 |
Winter (she/her) | is it safe to rely on that though | 06:01:24 |
@elvishjerricco:matrix.org | I think so | 06:23:09 |
@elvishjerricco:matrix.org | fstab-generator.c just has a bit of code that basically says "if we're in initrd then go ahead and parse /sysroot/etc/fstab too, with the whole /sysroot thing added in" | 06:25:04 |
Winter (she/her) | yeah, but what do you mean by the sanity check comment? | 06:25:35 |
Winter (she/her) | if that behavior is explicit | 06:25:38 |
@elvishjerricco:matrix.org | more of a joke | 06:25:43 |
@elvishjerricco:matrix.org | If you think about it for longer than 2 millisecond, it doesn't really make sense to check /sysroot/etc/fstab when /sysroot hasn't been mounted yet | 06:26:06 |
@elvishjerricco:matrix.org | * If you think about it for longer than 2 milliseconds, it doesn't really make sense to check /sysroot/etc/fstab when /sysroot hasn't been mounted yet | 06:26:12 |
@elvishjerricco:matrix.org | but it's also harmless and writing code against it would be pointless | 06:26:28 |
Winter (she/her) | but if the /sysroot behavior is explicit, why wouldn't they mount it before | 06:26:55 |
Winter (she/her) | i guess i should look at the code | 06:27:04 |
@elvishjerricco:matrix.org | Winter (she/her): Oh they do | 06:27:06 |
@elvishjerricco:matrix.org | generators are run twice in initrd | 06:27:13 |
@elvishjerricco:matrix.org | once before /sysroot is mounted just to get the ball rolling, i.e. parsing /etc/fstab and /proc/cmdline (for root=) | 06:27:37 |
@elvishjerricco:matrix.org | and once after to check the real root's /etc/fstab for mounts with x-initrd.mount | 06:27:51 |
@elvishjerricco:matrix.org | (really they don't expect you to use /etc/fstab in initrd; they expect you to tell it where root and /usr are with the cmdline; then they expect all other initrd file systems to come from /sysroot/etc/fstab with x-initrd.mount) | 06:28:52 |
@elvishjerricco:matrix.org | (which, btw, means systemd technically doesn't want you to have /etc on a file system other than your rootfs) | 06:29:16 |
K900 | Arguably they don't want you to have an fstab at all\ | 06:29:50 |
K900 | * Arguably they don't want you to have an fstab at all | 06:29:52 |
@elvishjerricco:matrix.org | yea well that's a whole other thing :P | 06:30:02 |
K900 | They just want to rely on the discoverable partitions spec | 06:30:04 |
@elvishjerricco:matrix.org | I wonder... currently failed mounts don't fail the initrd boot. i wonder if using this sysroot change would cause it to fail the way I had expected it to | 06:33:09 |
@elvishjerricco:matrix.org | Yea, that actually fails way better | 06:35:15 |
@elvishjerricco:matrix.org | Instead of attempting the boot, it just tries 3 times and then fails rather than attempting to move on to other stuff like nixos activation and switch-root | 06:35:52 |
@elvishjerricco:matrix.org | oh, wait, no, it did still try to switch-root... I'll look more at that later | 06:36:34 |
colemickens | So are current "linux semantics" such that mount.nfs is meant to be in /sbin? | 23:12:43 |
@elvishjerricco:matrix.org | I don't remember the details on that one... | 23:13:06 |
colemickens | We set sbindir=$(out)/bin for nfs-utils, and there's a new flag that will cause mount.nfs to actually respect that and land into the /bin dir... but I can't even tell if that's actually good to do. | 23:13:21 |
colemickens | * We set sbindir=$(out)/bin for nfs-utils, and there's a new flag that will cause the generated makefile to respect that when installing mount.nfs and thusland into the /bin dir... but I can't even tell if that's actually good to do. | 23:13:53 |