This completes the read only rootfs, all needed writable directories are in the tmpfs. Signed-off-by: Joey Boggs <jboggs at redhat.com> --- common-post.ks | 12 ++++++++++++ ovirt-node-image.ks | 1 + 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/common-post.ks b/common-post.ks index 0c0a3f4..44a0270 100644 --- a/common-post.ks +++ b/common-post.ks @@ -146,3 +146,15 @@ EOF # Remove the default logrotate daily cron job # since we run it every 10 minutes instead. rm -f /etc/cron.daily/logrotate + +# comment out /etc/* entries in rwtab to prevent overlapping mounts +sed -i '/^files \/etc*/ s/^/#/' /etc/rwtab +cat > /etc/rwtab.d/ovirt <<EOF +files /etc +files /var/cache/libvirt +files /var/cache/hald +files /var/empty/sshd/etc/localtime +files /var/lib/dbus +files /var/lib/libvirt +empty /mnt +EOF diff --git a/ovirt-node-image.ks b/ovirt-node-image.ks index 802b6a5..6b9e2ac 100644 --- a/ovirt-node-image.ks +++ b/ovirt-node-image.ks @@ -19,6 +19,7 @@ augtool <<\EOF set /files/etc/sysconfig/readonly-root/TEMPORARY_STATE NOT_OVIRT_FIRSTBOOT set /files/etc/sysconfig/readonly-root/STATE_LABEL CONFIG set /files/etc/sysconfig/readonly-root/STATE_MOUNT /config +set /files/etc/sysconfig/readonly-root/READONLY yes save EOF # use persistent state unless firstboot is forced -- 1.6.2.5
Joey Boggs
2009-Sep-18 16:16 UTC
[Ovirt-devel] Re: [PATCH node-image] readonly rootfs setup
Joey Boggs wrote:> This completes the read only rootfs, all needed writable directories are in the tmpfs. > > Signed-off-by: Joey Boggs <jboggs at redhat.com> > --- > common-post.ks | 12 ++++++++++++ > ovirt-node-image.ks | 1 + > 2 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/common-post.ks b/common-post.ks > index 0c0a3f4..44a0270 100644 > --- a/common-post.ks > +++ b/common-post.ks > @@ -146,3 +146,15 @@ EOF > # Remove the default logrotate daily cron job > # since we run it every 10 minutes instead. > rm -f /etc/cron.daily/logrotate > + > +# comment out /etc/* entries in rwtab to prevent overlapping mounts > +sed -i '/^files \/etc*/ s/^/#/' /etc/rwtab > +cat > /etc/rwtab.d/ovirt <<EOF > +files /etc > +files /var/cache/libvirt > +files /var/cache/hald > +files /var/empty/sshd/etc/localtime > +files /var/lib/dbus > +files /var/lib/libvirt > +empty /mnt > +EOF > diff --git a/ovirt-node-image.ks b/ovirt-node-image.ks > index 802b6a5..6b9e2ac 100644 > --- a/ovirt-node-image.ks > +++ b/ovirt-node-image.ks > @@ -19,6 +19,7 @@ augtool <<\EOF > set /files/etc/sysconfig/readonly-root/TEMPORARY_STATE NOT_OVIRT_FIRSTBOOT > set /files/etc/sysconfig/readonly-root/STATE_LABEL CONFIG > set /files/etc/sysconfig/readonly-root/STATE_MOUNT /config > +set /files/etc/sysconfig/readonly-root/READONLY yes > save > EOF > # use persistent state unless firstboot is forced >pushed per pmyers/apevec
Reasonably Related Threads
- [PATCH node] refactor node image recipe
- [PATCH node-image] update rwtab entries for /live, /boot, and /var/lib/random-seed
- [PATCH node-image] add /var/lib/dnsmasq to rwtab
- Problem with RW_MOUNT in a diskless system
- Refactor ovirt-node-image code base for inclusion in Fedora