[systemd-devel] moving from SysV to systemd - issue with / being ro
Warpme
warpme at o2.pl
Wed Oct 16 09:18:12 PDT 2013
Hi,
I want to switch init system from SysV to systemd-196.
Sys is PXE booted disk-less appliance with rootfs based on overlayfs.
Currently I can PXEboot, successfully switch root from initrd to
overlayfs based root, systemd starts and executes many of it's units.
Unfortunately user units are failing due / is read-only.
When I issue "mount -o remount,rw /" - root becomes rw - so it looks
like systemd for some reason isn't remounting root to rw.
Interesting is that exactly the same initrd->overlayfs script (see
below) works OK for SysV - so I think issue isn't in my pivot_root
procedure but rather systemd receives / in rw but leaves in ro (as
"mount -o remount,rw /" allows to write to /).
Script switching initrd to overlayfs root looks following:
/bin/mount -n -t tmpfs none /rw
/bin/mkdir -p /rw/rootfs
/bin/mount -n -t overlayfs -o lowerdir=/rootfs-ro,upperdir=/rw/rootfs
none /rootfs
cd /rootfs
/bin/mkdir -p initrd proc sys
/sbin/pivot_root . initrd
exec /usr/sbin/chroot . /usr/lib/systemd/systemd
Where issue might be?
More information about the systemd-devel
mailing list