imgcreate/fs.py   |   15 ++++++++++-----
 imgcreate/live.py |    2 +-
 2 files changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 0875dc51726a7ca28f8d5d38543073ab462f9fda
Author: Bill Nottingham <[email protected]>
Date:   Thu Nov 14 09:39:42 2013 -0500

    Ensure filesystem modules end up in the live image initramfs.

diff --git a/imgcreate/live.py b/imgcreate/live.py
index 4fe1ea4..4977703 100755
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -262,7 +262,7 @@ class LiveImageCreatorBase(LoopImageCreator):
         return env
 
     def __extra_filesystems(self):
-        return "vfat msdos isofs ";
+        return "vfat msdos isofs ext4 xfs btrfs";
 
     def __extra_drivers(self):
         retval = "sr_mod sd_mod ide-cd cdrom "


commit f9f941e9ed7c3d6db014259a77283716a0b3716e
Author: Bill Nottingham <[email protected]>
Date:   Thu Nov 14 09:39:41 2013 -0500

    Don't use mkfs.extN options for any filesystem types.
    
    btrfs, xfs, ext4 tested - filesystem is made correctly. Note that filesystem
    shrinking is still extN specific.

diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index e3be9a8..37ff9d8 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -453,11 +453,16 @@ class ExtDiskMount(DiskMount):
 
     def __format_filesystem(self):
         logging.info("Formating %s filesystem on %s" % (self.fstype, 
self.disk.device))
-        rc = call(["/sbin/mkfs." + self.fstype,
-                   "-F", "-L", self.fslabel,
-                   "-m", "1", "-b", str(self.blocksize),
-                   self.disk.device])
-        #          str(self.disk.size / self.blocksize)])
+        args = [ "/sbin/mkfs." + self.fstype ]
+        if self.fstype.startswith("ext"):
+            args = args + [ "-F", "-L", self.fslabel, "-m", "1", "-b", 
str(self.blocksize) ]
+        elif self.fstype == "xfs":
+            args = args + [ "-L", self.fslabel[0:10], "-b", "size=%s" % 
str(self.blocksize) ]
+        elif self.fstype == "btrfs":
+            args = args + [ "-L", self.fslabel ]
+        args = args + [self.disk.device]
+        print args
+        rc = call(args)
 
         if rc != 0:
             raise MountError("Error creating %s filesystem" % (self.fstype,))


--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to