[Vmdebootstrap-devel] [PATCH] support btrfs root
Jan Gerber
j at mailb.org
Tue Apr 7 11:08:31 UTC 2015
dont set errors=remount-ro in fstab, btrfs remounts
readonly on errors by default and does not support
errors=remount-ro
---
vmdebootstrap | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/vmdebootstrap b/vmdebootstrap
index a9127ae..43fd4f9 100755
--- a/vmdebootstrap
+++ b/vmdebootstrap
@@ -499,7 +499,11 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
fstab = os.path.join(rootdir, 'etc', 'fstab')
with open(fstab, 'w') as f:
f.write('proc /proc proc defaults 0 0\n')
- f.write('%s / %s errors=remount-ro 0 1\n' % (rootdevstr, roottype))
+ if roottype == 'btrfs':
+ options = 'defaults'
+ else:
+ options = 'errors=remount-ro'
+ f.write('%s / %s %s 0 1\n' % (rootdevstr, roottype, options))
if bootdevstr:
f.write('%s /boot %s errors=remount-ro 0 2\n' % (bootdevstr, boottype))
if self.settings['swap'] > 0:
--
2.1.4
More information about the Vmdebootstrap-devel
mailing list