Page 1 of 1

writing a program to expand fedora boot partition

Posted: Thu May 03, 2012 10:07 am
by rknox
I started on fedora 12. Took system defaults. Resulting boot partition is too small for later versions. Am writing a program to expand the boot partition. Fedora has an upgrade feature that keeps all your installed stuff, but the upgrade requires a larger boot partition than I have.

The boot partition has an ext3 file system.

After I have expanded the partition I need to let the file system in the partition know that it has more space.

Is there a utility that lets me tell the ext3 filesystem that it now has more space, or do I need to modify the super block and/or other data structuresetc myself?

****

Re: writing a program to expand fedora boot partition

Posted: Thu May 03, 2012 10:38 am
by bubach
why not save yourself the trouble and use existing software?
http://www.simplehelp.net/2008/11/04/ho ... g-gparted/

Re: writing a program to expand fedora boot partition

Posted: Thu May 03, 2012 11:26 am
by rknox
bubach
thanks - I'll check it out - I sure am glad I asked. :D
****
I need to
1 - move partition 2 back to make space to
2 - expand partition 1 (boot partition) and also its ext3 file system

Not enough space in partition 1 file system

Re: writing a program to expand fedora boot partition

Posted: Sat May 05, 2012 6:35 pm
by rknox
gparted doesnt work with fedora lvm partions - all the actions are greyed out and it displays a triangle with an exclamation mark.

but i am making progress. have used dd to move to a bigger disk - now need to move partition 2 back to make room to expand partition 1, and then tell filesys in partiition 1 that it has more space.

Question. -- is there a standard structure the i would expect to find as the first record in a partition - like the MBR on the disk? When I follow the links in the partition table in the MBR to what I believe to be the start of the partitions, I dont see someting that looks like a MBR. should I? partition 1 has an ext3 file system and my next step is to see if the second block looks like an ext3 superblocksector.

thnks all for you help

****

Re: writing a program to expand fedora boot partition

Posted: Sun May 06, 2012 10:24 pm
by rknox
For what its worth - I would never have used FVM if I knew what it was. Probably would not have used Fedora either.

I naively assumed that the defaults were desogned to protect new comers from gtting in trouble. I now realize that the defuaults for Fedora are set so as to put newcomers into the new features so that the new featuyres get beta tested.

I have a lot of stuff on this computer and a lot of material installed - but little by little i'll gt control of the situation.

First I'll get the partition sizes I want. Then I'll upgrade to Fedora 16. Then I'll probably add a partition somewhere with a regular file system and copy the LVM files to it - but that comes later.

I believe I can make more space for the first partition by copying it and everything before it to larger disk, then copying the second partition to a location 300mb behind the first and patching the entries in partition table. Then either with a utility or something I write, tell the file system in the first that it has more space. Alternatively I can create a new filesystem in the larger first partition and then copy the comtents of the old disk first partition.

Its a better way to spend my time than many other things I could do.