Hi Visali, Am 25.02.2016 20:47 schrieb "Vasiliy Tolstov" <v.tols...@selfip.ru>: > > Hi,i want to build image that mounts readonly /usr and / readwrite.
That is really simple to do: Just edit the kernel command line to include the appropriate flags to mount usr read-only. Documentation for the flags can be found here: https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html > I have dracut , systemd and efi system. > Does somebody have examples of systemd units ? None should be needed for such a simple setup. > Also how /etc filled with systemd? That should not be necessary, if / is persistent. If you want / to be a tmpfs, then it gets a bit tricky. I currently added a unit into the initrd that extracts a tarball with the root filesystem found on the read-only usr partition. The unit doing that can be found here: https://gitlab.com/hunger/cleanroom/blob/master/type-baremetal/units/initrd-sysroot-setup.service That *should* not be necessary starting with systemd 229 (for the machine-id switch on the kernel commandline) and dbus 1.10 (for starting without files in /etc) anymore, but I did not verify that yet. If there is no /etc/machine-id found on the disk, systemd should populate /etc based on the contents of /usr/share/factory. Best Regards, Tobias
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel