!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
@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
@arianvp:matrix.orgAriandamit13:44:29
@k900:0upti.meK900Unless you mean, like, LKL, which we already are using13:44:39
@k900:0upti.meK900(and it's still very slow)13:44:44
@elvishjerricco:matrix.org@elvishjerricco:matrix.orghow are we using that?13:45:05
@k900:0upti.meK900In make-disk-image13:45:43
@arianvp:matrix.orgArianand is there not something like a mount namespace? where we can mount a disk image as non-root?13:46:38
@arianvp:matrix.orgArianthat would also work no?13:46:49
@k900:0upti.meK900There is, but that would be wildly impure13:47:02

Show newer messages


Back to Room ListRoom Version: 6