Hi,

   We are using the release version livecd tools we installed using the yum tool. The version the package says is python-imgcreate-17.11-1.fc17.i686. I am new to the mailing list and so may not be exact about the terminologies you normally use. Pardon me for that.

We normally create custom fedora spins on top of Fedora Electronic labs (FEL) using the base-on option. The ext partition size in the FEL used to be 8gb and we had enough space to install over packages. But now we wanted to create our custom spin over standard fedora core image. But the partition size of the fedora core was 4GB and there was not enough space in the partition to install our packages. 

  So we wanted to increase the partition size by 8gb and so we specified the following in the kickstart file

part / --size=8192 --fstype ext4

The ext3.mg file size changed from 4Gb to 8Gb but the problem was the partition size remained as 4 Gb only. So we tried to debug the issue.

After the ext3.img is copied from the base-on image, the following code is executed.

in fs.py, the method _mount_instroot of class LoopImageCreator, the following line (Line no:930)

    self.__instloop.mount()

calls the ExtDiskMount.mount() method (file: fs.py Line no: 494). This method calls self.__create() [ExtDiskMount.__create() file: fs.py line: 482] which calls self.disk.create() (file: fs.py, line no:487). This function [SparseLoopbackDisk.create() file: fs.py, line : 358] calls self.expand(create=True) [SparseLoopbackDisk.expand(), file: fs.py, line:331 ] and it changes the size of the file and does not change the partition size. Now it should be noted that the size of the file has already increased to the given size but not the partition. Later in ExtDiskMount.__create() [file: fs.py line: 482], the self.__resize_filesystem() is called to resize the file system. In __resize_filesystem() [ExtDiskMount.__resize_filesystem() file: fs.py line: 467], the following logic checks [file: fs.py, line: 473]

if size == current_size:

    return 

if the current size of the file (not the partition size) is equal to the size asked to resize (which at this stage will always be true) then return from the function.

So the logic for resize2fs is never reached. So we commented out the above if condition and tested the livecd and at this time the partition got increased to 8gb and the custom spin was created successfully.

I am not very sure of the exact fix for the bug as I am not sure about the reason behind calling expand [SparseLoopbackDisk.expand(), file: fs.py, line:331 ] method. 

It would be helpful for us if you rectify the bug and let us know if our approach was right.

--
Thanks & Regards,
Karthikeyan G A