| 24 Mar 2022 |
@janne.hess:helsinki-systems.de | (actually I hope that's correct - I just saw it when using systemctl cat in the initrd) | 10:04:26 |
flokli | Oh lol | 11:06:44 |
flokli | I looked at the vm test logs. It seems we do switch systemd two times?
machine # [ OK ] Finished Cleanup udev Database.
machine # [ OK ] Reached target Switch Root.
machine # Starting Switch Root...
machine # [ 1.881830] systemd-journald[73]: Received SIGTERM from PID 1 (systemd).
machine #
machine # <<< NixOS Stage 2 >>>
machine #
machine # [ 1.967187] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: none.
machine # [ 1.970678] booting system configuration /nix/store/c2birzmvm77j79lh5njrz18z2nrjg50i-nixos-system-machine-22.05.git.82102fc37da
machine # running activation script...
machine # setting up /etc...
machine # starting systemd...
machine # [ 4.579760] systemd[1]: Inserted module 'autofs4'
machine # [ 4.603075] systemd[1]: systemd 249.7 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
| 11:07:46 |
flokli | Hmh, I think initrd-switch-root.service fails. It'd run systemctl --no-block switch-root /sysroot, but we don't use /sysroot inside the initrd, but /mnt-root. | 11:11:23 |
flokli | (I put this back in the issue) | 11:21:50 |
@janne.hess:helsinki-systems.de | Okay so looking at the handover stuff -- it's probably too much for the initial PR. I'll still continue to work on it but I think the currently open PR can go without it. I have the handovering mostly running but there's still stuff to test and figure out (for example why journald doesn't start…). It's not extremely important for the initial MVP and getting the MVP in is important to allow for collaborative development | 13:15:57 |
Arian | Sounds good to me. Could you add a list of caveats; future work? I am only loosely following so hard for me to understand what it means what's missing in the handover | 13:36:52 |
@janne.hess:helsinki-systems.de | I can create an issue and maybe a github project as well for future issues an prs | 15:22:31 |
Arian | Awesome | 15:42:48 |
| @janne.hess:helsinki-systems.de changed the room topic to "systemd in NixOs's stage 1, replacing the current bash tooling
https://github.com/NixOS/nixpkgs/projects/51" from "systemd in NixOs's stage 1, replacing the current bash tooling". | 16:54:02 |
@janne.hess:helsinki-systems.de | In reply to @arianvp:matrix.org Awesome https://github.com/NixOS/nixpkgs/issues/165649 | 16:59:27 |
flokli | Janne Heß: thanks for writing this up | 17:23:46 |
@janne.hess:helsinki-systems.de | ElvishJerricco: have you figured out how mounts are moved to stage 2? | 17:24:42 |
Arian | So it's actually happening this time huh? | 17:24:58 |
Arian | Janne you're going to the sprint right? | 17:25:09 |
Arian | I suppose we can spend the sprint on follow-up PRs :)) | 17:25:23 |
@elvishjerricco:matrix.org | Janne Heß: Moved? | 17:25:59 |
flokli | I'll be sprinting up mountains in Mallorca this time, sorry :-P | 17:26:12 |
@elvishjerricco:matrix.org | systemd just mounts /proc, /dev, etc. automatically when it starts | 17:26:17 |
@elvishjerricco:matrix.org | And the other mounts are just a consequence of switch-root | 17:26:28 |
@janne.hess:helsinki-systems.de | In reply to @arianvp:matrix.org Janne you're going to the sprint right? Yes! | 17:27:53 |
@janne.hess:helsinki-systems.de | In reply to @arianvp:matrix.org I suppose we can spend the sprint on follow-up PRs :)) I'd love to have most of the basics covered so we can just implement stuff like different storage systems, networking,... | 17:28:25 |
@janne.hess:helsinki-systems.de | In reply to @elvishjerricco:matrix.org systemd just mounts /proc, /dev, etc. automatically when it starts Hm. So it mounts a new tmpfs over /run? | 17:29:07 |
@elvishjerricco:matrix.org | Hmm I seem to recall it moving /run correctly now that you mention it, but it's been a while since I played with that | 17:29:41 |
@elvishjerricco:matrix.org | maybe it does move them with switch-root or something? Not sure | 17:29:59 |
flokli | https://www.freedesktop.org/software/systemd/man/bootup.html | 17:30:46 |
@elvishjerricco:matrix.org | The service initrd-parse-etc.service scans /sysroot/etc/fstab for a possible /usr/ mount point and additional entries marked with the x-initrd.mount option. All entries found are mounted below /sysroot, and initrd-fs.target is reached | 17:33:45 |
@elvishjerricco:matrix.org | Ah, we should probably use that | 17:33:48 |
flokli | https://systemd.io/INITRD_INTERFACE/ also mentions also pivoting back to initrd on shutdown, to clean up storage stuff necessary for / | 17:34:10 |
@elvishjerricco:matrix.org | Then we'd only need to have / and /etc in initrd, and the rest can be in the real rootfs's /etc/fstab with x-initrd.mount | 17:34:37 |