Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-12-2012, 09:45 AM   #1
Registered: May 2010
Posts: 354

Rep: Reputation: 34
Expanded boot partition to upgrade from Fedora 14 to Fedora 16 using preupgrade.

Once upon a time I installed Fedora 12 - took the defaults - got a 200MB boot partition and the rest of the disk was allocated to one LVM partition. I have used preupgrade to move to newer versions. When I try to go from Fedora 14 to 16 it fails because boot partition is not big enough. There are various suggestions on how to free space in boot partition but these are small potatoes compared to what is needed. The boot partition must be larger for preupgrade to run.

How I enlarged the boot partition given that the rest of the disk was full. Two options - (1)understand the LVM utilities sufficiently to shrink partition 2 or (2)move from my 40GB Maxtor to a larger disk. For $22 delivered I could get a used 80GB Maxtor disk from eBay so I got it.

Various people suggested perhaps 10 programs that would help. None of them is ready to deal with an ext4 partition backed by a LVM partition were resizing and moving is involved. Some claim they deal with the situation but when you try you find they do not.

But it was easy using utilities plus a small throw away program.

It took 3 steps.

Old drive is on sdb new drive on sda Fedora 16 live CD on CD drive.

1. Clone old drive to new
Booted from live CD: dd if=/dev/sdb of=/dev/sda

2. Calculate new values for the Partition table in the Master Boot Record. - booted from old drive

2.1 Copy MBR to disk: DD if=/dev/sda count=1

2.2 Wrote a throw away c program to calculate new partition table values - print a report - write a new file named sda_mbr.out. The format of the MBR is available everywhere including the format of the partition table. I doubled the size of partition 1.

let SZ1 be size of partition 1
let ST2 be start of partition 2
let III be a 4 byte integer
read file
print a formatted copy of the MBR before the change
ST2 += III
print a formatted copy of the MBR after the change
create a new file sda_mbr.out and write modified MBR to it.

For my particular situation the values of interest for later steps were:
start of partition 2 on old disk = 409663
start of partition 2 on new disk = 819263
size of partition 2 = 79883207

2.3 Put this new MBR on the new drive
DD if=sda_mbr.out of=/dev/sda count=1

3. Booted from live CD
Expand the file system in partition 1 on new drive to use the space now allotted to it in the partition table -

e2fsck -f /dev/sda1
resize2fs /dev/sda1

copy partition 2 from old drive to its new location on new drive
DD if=/dev/sdb of=/dev/sda skip=409662 seek=819263 count=79883207

Done! boot /dev/sda - everything is ok, Fedora 14 runs fine and I have a big boot partition and a large unallocated space on the disk.

Step 2 (boo!): I ran preupgrade on the 80MB drive and installed Fedora 16 and after all this trouble I don't like Fedora 16. Maybe I donít "get it" but it uses almost twice the memory - runs slower - does not seem to have a "stay on top" option. My defaults for opening a downloaded file are all messed up and suggest gedit for all file types. I will ask about all that in a later post. I am back on my 40GB Fedora 14 disk. Maybe I'll redo the above (but not upgrade to Fedora 16) and then I'll be running Fedora 14 on the 80 GB disk.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Fedora preupgrade - boot partition too small rmknox Linux - Software 2 05-02-2012 11:06 AM
LXer: PreUpgrade: Upgrade Fedora From One Version To Another LXer Syndicated Linux News 0 12-01-2011 12:11 AM
[SOLVED] Upgrade fedora 1 to fedora 8; problem with dual boot mounting partition. alan sherwood Linux - Newbie 6 05-19-2010 06:31 PM
upgrade to Fedora 11 on my PS3 via preupgrade Dr_Death_UAE Linux - General 2 06-18-2009 05:28 PM
LXer: Upgrade Your Desktop From Fedora 8 To Fedora 9 With PreUpgrade LXer Syndicated Linux News 0 05-20-2008 09:41 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration