Updating From Fedora 12 To Fedora 13

Step by step guide on how I went about updating Fedora 12 to 13

Photo of Greg Harvey
Tue, 2011-01-04 22:31By greg

Fedora 12 "end of life" just came around, so I decided to update to Fedora 13 while things were quiet over Christmas. Fedora ships with a preupgrade app which manages the update process, so in theory this should do it:

su -c "preupgrade"

Follow the GUI steps, reboot and Fedora will update itself. I did this, and Fedora went through all the motions but did nothing on reboot. Some Googling indicated this was because there was a change in default boot partition size between Fedora 12 (and earlier) and Fedora 13 (and later). If you opted for Fedora 12 install defaults, you will have a 200MB boot partition. Unfortunately this is too small for Fedora versions 13 and upwards, which need a 500MB boot partition (or at least, preupgrade does to function correctly).

Here's how I went about resolving that issue. This is *a* solution - it might not even be the best solution, but it worked for me - twice. [Edit: I subsequently found this person with a similar issue who pointed out this resource with some alternative approaches.] Hope it helps some folk:

1. Use Unetbootin (it's in the Fedora repository, yum install unetbootin) to create two separate bootable USB sticks (or create CDs using other tools if you prefer):

A. Fedora 12 CD1 (for rescue mode)


B. Parted Magic (we'll need this later!)


2. Back up /boot to a removable drive.

3. Back up anything you care about!

4. Install gparted and run it.

5. Make a note of the device partition mounted at /boot (in my case /dev/sda3) and unmount that device partition.

6. Resize the partition to 500MB (note, this will almost certainly destroy the partition).

7. Reboot -> if your computer boots in to the grub command line and does not boot Fedora then the partition was indeed destroyed, but if Fedora boots you were lucky! Nothing more to do except skip to step 18.

Read on if, like me, you were not lucky!

8. Reboot again from the USB stick/CD with Parted Magic on it.

9. Open gparted and format the old boot partition as ext2 (you can identify it as the 500MB partition with file system of 'unknown').

10. Make a note of the device (e.g. /dev/sda3).

11. Mount it using Parted Magic's available tools and copy your back-up of /boot to this newly formated ext2 partition.

12. Open a terminal window and type blkid, then make a note of the UUID against the same device, e.g. /dev/sda3: UUID=”1c9e4ae2-0ddc-4e3c-8758-4cdd6c90407a” TYPE=”ext2″

13. Back in gparted, look at the 'File system' column against your main Fedora drive - if it is ext4, you are in luck and can jump to step 18. However, if it is lvm2 (most likely) you are unlucky and Parted Magic can't read this partition.

14. If, once again, you are unlucky you'll need to reboot, this time starting up off the Fedora CD1 disk/stick, at the boot options selecting Rescue.

15. Go through the rescue wizard and when asked where the Fedora install image is select the memory stick/disk (if memory stick, probably /dev/sdb1).

16. Stick to defaults for the other stuff and sooner or later you'll be taken back to shell in rescue mode. Then type:

chroot /mnt/sysimage

nano /etc/fstab

17. There will be an entry in fstab for /boot, identified by UUID. This UUID will be incorrect. Replace it with the UUID you made a note of earlier in step 12, save and reboot.

18. Now Fedora *should* come up as normal and now Fedora 12 has a large enough boot partition to update to Fedora 13 using 'preupgrade'. Open a terminal window, type su -c "preupgrade" and follow the GUI steps.

Good luck!