resize /boot partition

Mike McCarty mike.mccarty at sbcglobal.net
Wed Oct 12 02:58:27 UTC 2005


Marcin Struzak wrote:
>>At 12:03 PM -0700 10/10/05, Marcin Struzak wrote:
>>
>>>I am using Fedora Core 3 and Grub, and need to resize my /boot partition.
>>>
>>>1) Can it be done "on-the-fly", i.e., without destroying the fs?  What
> 
> tool
> 
>>>can be used for that (parted complains about incompatible feature
> 
> enabled)?
> 
>> ...
>>
>>I would boot from something else (rescue CD, installer CD; others will say
>>Knoppix) and do the work there.  I have enough free space on my /
> 
> partition
> 
>>to copy all of /boot's 100 MB onto it and copy it back.  I have never done
>>this.
> 
> 
> Resizing on the fly will (presumably) leave the bootstrap intact; if I copy
> everything out, blow away the partition, and recreate it to my liking, just
> copying the files back into it would not make the new partition bootable.
> In LILO days you would just rerun lilo.  Anyone knows what needs to be done
> if using Grub?

One possibility is to copy out the portion of the MBR which contains
the code, leaving out the PT. Then re-partition, and recopy.

Something like:

# dd -if=/dev/hda -of=/media/floppy/mbr.bin bs=1 count=448
# fdisk ...
# dd -if=/media/floppy/mbr.bin -of=/dev/hda bs=1 count=448

But as you say, the MBR should be basically intact.
The files which control GRUB boot are normally /boot/grub/grub.conf
etc.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list