[systemd-devel] So how am I supposed to put together my Linux system?

Tobias Hunger tobias.hunger at gmail.com
Fri Sep 5 07:19:40 PDT 2014


Hi

I have read http://0pointer.net/blog/revisiting-how-we-put-together-linux-systems.html
with interest and since I am using a home-grown image based
installation scheme anyway, I would like to try and move that closer
to the proposal from the systemd cabal. It is pretty easy to create
the suggested subvolumes, but I how to proceed from that point still
is a bit unclear to me:-)

How should I install kernels/initramfs though?

I understood the plan to be to copy the kernel/initramfs into the EFI
boot partion and to create boot loader entries linking the
kernel/initramfs combo with the root file system.

But where do those kernels come from? I would think the usr-subvolume
is the best place for that. Did you recommend a place for the
kernel/initramfs yet (E.g. <usr-subvolume>/boot) or do you expect the
distributions to decide that?

Do you consider a tool that will copy the kernel/initramfs from the
usr-subvolumes into the EFI boot partition in scope for systemd or
should the distributions handle that instead? I think the following
steps are pretty generic and could be handled by a small tool shipped
as part of systemd:

* iterate over the usr-snapshots and get the kernel(s) and initramfs
file(s) from all the snapshots boot directory (assuming you expect the
distributions to put the kernels into /usr/boot).

* copy those into the EFI boot partition. De-duplicate them while
doing that. EFI boot partitions are FAT-based, so that will most
likely require a bit of hashing as FS-based deduplication and
hard-/softlinks are out:-)

* create the necessary boot loader entry files according to the
http://freedesktop.org/wiki/Specifications/BootLoaderSpec/

I need to give the root filesystem/subvolume with the usual kernel
command line arguments, so that is not a problem. But how should the
usr-subvolume be specified? Setting that in the root-subvolume makes
little sense and the initramfs needs to mount /usr anyway, so I guess
that will require more kernel command line arguments. Did you define
those yet? I would suggest just using usrfs, usrflags and usrfstype
(where the usrfs should default to rootfs and usrfstype to btrfs).

Best Regards,
Tobias


More information about the systemd-devel mailing list