[Fedora-livecd-list] [PATCH] Run e2fsck before resize2fs

Mark McLoughlin markmc at redhat.com
Thu Dec 20 10:48:11 UTC 2007


resize2fs barfs if you haven't run e2fsck on the filesystem
beforehand, so do this in the case of resizing an existing
image. We already do this when minimising an image.

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 imgcreate/fs.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index 3efddcb..fa83c2c 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -225,6 +225,8 @@ class SparseExtLoopbackMount(SparseLoopbackMount):
         if size > current_size:
             self.expand(size)
 
+        self.__fsck()
+
         resize2fs(self.lofile, size)
 
         if size < current_size:
-- 
1.5.3.3




More information about the Fedora-livecd-list mailing list