!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

78 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5126 Servers

Load older messages


SenderMessageTime
20 May 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthe systemd folks tend to think of this in terms of an installation process that just creates an ESP and a /usr partition, and then everything else is set up by the boot process00:02:11
@uep:matrix.org@uep:matrix.orgoh, on the same disk.. so a partially-constructed partition table and set of filesystems vs something like disk when building the disk image, all at once.00:18:17
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThere's sort of a lot you can do with it00:18:57
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt's pretty flexible00:19:02
@uep:matrix.org@uep:matrix.orghm. It seems to me like shuffling the deck chairs of when things get done, compared to (say) resizing partitions on first boot00:20:29
@uep:matrix.org@uep:matrix.orgbut it is a more general version of that idea, so I suppose allows for more options00:20:55
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI don't really understand that analogy but ok :P00:21:31
@uep:matrix.org@uep:matrix.orgold and not-really-busted: make a disk image with relevant partitions, as small as you can. Clone that, boot it, and expand the root fs to fill free space on first boot. new systemd hotness: make a disk image with fewer relevant partitions, and free space. Clone that, boot it, and mkfs the root fs on first boot.00:24:55
@uep:matrix.org@uep:matrix.orgI was assuming kernel and initrd came from somewhere other than ESP (e.g. netboot) so the disk was blank00:25:57
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThat's another option, like the NixOS test example00:29:29
@uep:matrix.org@uep:matrix.orgthat's what I mean about a more general version00:29:53
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgAh yea00:30:01
@uep:matrix.org@uep:matrix.orgI jumped straight to "the disk can be blank" as the goal, whereas your comment about "systemd folks thinking about this as ..." seemed like less interesting/ambitious00:33:54
@aloisw:kde.org@aloisw:kde.org joined the room.05:10:14
@nikstur:matrix.org@nikstur:matrix.org
In reply to @uep:matrix.org
old and not-really-busted: make a disk image with relevant partitions, as small as you can. Clone that, boot it, and expand the root fs to fill free space on first boot.
new systemd hotness: make a disk image with fewer relevant partitions, and free space. Clone that, boot it, and mkfs the root fs on first boot.
This is still the basic idea: create a disk image and make the installation of a systemd as simple as dding this image onto a disk. In the systemd world your disk image really only needs an ESP and a /usr but we can do a very similar thing in NixOS: ESP and the nix store. systemd-repart is also cool for A/B update schemes where you create a second partition and then write the update to this second partition. This gives you atomicity on the partition level. systemd-repart is really one of the basic buildings blocks of a vision of an image-based Linux which systemd is really pushing.
22:22:31
@nikstur:matrix.org@nikstur:matrix.org
In reply to @uep:matrix.org
old and not-really-busted: make a disk image with relevant partitions, as small as you can. Clone that, boot it, and expand the root fs to fill free space on first boot.
new systemd hotness: make a disk image with fewer relevant partitions, and free space. Clone that, boot it, and mkfs the root fs on first boot.
* This is still the basic idea: create a disk image and make the installation of a system as simple as dding this image onto a disk. In the systemd world your disk image really only needs an ESP and a /usr but we can do a very similar thing in NixOS: ESP and the nix store. systemd-repart is also cool for A/B update schemes where you create a second partition and then write the update to this second partition. This gives you atomicity on the partition level. systemd-repart is really one of the basic buildings blocks of a vision of an image-based Linux which systemd is really pushing.
22:22:39
21 May 2023
@uep:matrix.org@uep:matrix.orgOk, yeah, the A/B thing makes sense.. even more partitions :)02:45:49
22 May 2023
@arianvp:matrix.orgArianWhy does NixOS's image builder use Qemu again?13:39:56
@arianvp:matrix.orgArianit's spending almost 70 seconds in QEMU :/13:40:04
@arianvp:matrix.orgArianshouldn't we be able to build an image without booting a VM?13:40:17
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Don't we just run nixos-install in a VM to make an image or something? 13:40:30
@k900:0upti.meK900It's surprisingly difficult, actually13:40:36
@k900:0upti.meK900Turns out it's pretty hard to create a filesystem that is only implemented in the kernel without the kernel13:41:11
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgbut also we definitely make too many images now13:41:38
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthere's a lot of nixos tests that previously didn't need an image that do now13:41:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgbecause of some much-needed changes to qemu-vm.nix13:41:59
@arianvp:matrix.orgArianI'm pretty sure all the filesystems the kernel implements are now exposed as userspace libraries13:44:08
@k900:0upti.meK900They are absolutely not13:44:19
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea wut13:44:24
@arianvp:matrix.orgArian:(13:44:25

Show newer messages


Back to Room ListRoom Version: 6