summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-06-25 12:59:06 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-06-25 13:20:43 +0000
commit1fa75fc9e4d0dc54fb6b250137f4ff39f0deb8fa (patch)
treec565894dce8af22d434c43f1b45141286729fe5e /morphlib/builder2.py
parent73e8bed080a2f5e19266646f306296c68637e8d0 (diff)
downloadmorph-1fa75fc9e4d0dc54fb6b250137f4ff39f0deb8fa.tar.gz
SystemBuilder: fix mounting options
fstab had errors=remount-ro, this is an ext option, btrfs doesn't support it. However it should be mounted noatime, to prevent the metadata trees being duplicated because they were read. extlinux.conf also has its mounting options changed so that the rootfs is mounted read-only initially. This should prevent the metadata trees being updated by reading them until it is remounted with noatime.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r--morphlib/builder2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index d11ba97b..3139d619 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -584,7 +584,7 @@ class SystemBuilder(BuilderBase): # pragma: no cover
with open(fstab, 'w') as f:
f.write('proc /proc proc defaults 0 0\n')
f.write('sysfs /sys sysfs defaults 0 0\n')
- f.write('/dev/sda1 / btrfs errors=remount-ro 0 1\n')
+ f.write('/dev/sda1 / btrfs defaults,rw,noatime 0 1\n')
def _create_extlinux_config(self, path):
logging.debug('Creating extlinux.conf in %s' % path)
@@ -596,7 +596,7 @@ class SystemBuilder(BuilderBase): # pragma: no cover
f.write('label linux\n')
f.write('kernel /boot/vmlinuz\n')
f.write('append root=/dev/sda1 rootflags=subvol=factory-run '
- 'init=/sbin/init rw\n')
+ 'init=/sbin/init ro\n')
def _create_subvolume_snapshot(self, path, source, target):
logging.debug('Creating subvolume snapshot %s to %s' %