Specialized Search & eDiscovery - WombatTechnology - Web Wombat

Specialized Search & eDiscovery

Fedora PreUpgrade RAID workaround

WombatTechnology

Imagine being able to see all your information from a single vantage point ...

Fedora PreUpgrade RAID workround

Summary

This guide describes a workaround for an issue of PreUpgrade not working on a Fedora 12 system where /boot is on a RAID and you are doing the upgrade (to Fedora 14) remotely and want to watch the progress with VNC. I expect you have read the PreUpgrade how to.

Normally PreUpgrade saves the stage2 installer image on the hard drive unless /boot is on a RAID, in which case it says something like:

Error: /boot is on RAID device md0

The main installer image could not be saved to your hard drive. The installer can download this file once it starts, but this requires a wired network connection during installation.

Click here for more info.

However in my case there was an additional problem. The kickstart script which sets-up the network (and much more) was also put on the RAID and was not read in, leaving the stage1 installer with no network to download stage2. The way I got around this was to set up the network using kernel boot options in GRUB, and then copy the kickstart script from the RAID to somewhere the stage1 installer could read it (in my case another computer's webserver) (anaconda boot options). Once the stage2 installer downloaded and ran, the upgrade was able to complete.

Procedure

These are the steps I followed to successfully upgrade a remote Fedora 12 computer to Fedora 14. /boot was on a Linux software RAID 1 partition.

1) Login to the remote computer using SSH.

$ ssh RemoteComputer

2) Become the root user.

$ su -

3) Make sure all the latest updates are installed.

# yum update

4) Install PreUpgrade.

# yum install preupgrade

5) List available upgrades.

# preupgrade-cli
please give a release to try to pre-upgrade to
valid entries include:
"Fedora 13 (Goddard)"
"Fedora 14 (Laughlin)"

6) Run PreUpgrade with settings to start the network during the upgrade, also start a VNC server, and of course tell it our upgrade target. Replace the network addresses and other values with your own.

# preupgrade-cli --vnc=password --ip=10.1.1.42 --netmask=255.255.255.0 --gateway=10.1.1.4 --dns=10.1.1.21 "Fedora 14 (Laughlin)"

--- snip ---
Error: /boot is on a RAID device md0

The main installer image could not be saved to your hard drive. The installer can download this file once it starts, but this requires a wired network connection during installation.
--- snip ---
All finished. The upgrade will begin when you reboot.

Once the upgrade starts, a VNC server will open on port 5901.
Use it to moitor progress or fix problems that may arise.

7) Copy /boot/upgrade/ks.cfg to another computer's webserver and make a note of the URL to the ks.cfg file.

8) Test the ks.cfg URL is accessible to the computer being upgraded.

# cd /tmp
# wget http://your-webserver/ks.cfg
# ls -l ks.cfg
# rm ks.cfg

9) Edit the upgrade entry in the GRUB config (/boot/grub/menu.lst) and add the following kernel options to start the network and get the kickstart script (Replace the network addresses and other values with your own).

ip=10.1.1.42 netmask=255.255.255.0 gateway=10.1.1.4 dns=10.1.1.21 ks=http://your-webserver/ks.cfg

It should change from something like this

title Upgrade to Fedora 14 (Laughlin)
kernel /boot/upgrade/vmlinuz preupgrade repo=hd::/var/cache/yum/preupgrade stage2=http://mirror.aarnet.edu.au/pub/fedora/linux/releases/14/Fedora/x86_64/os/images/install.img ksdevice=link
initrd /boot/upgrade/initrd.img

to something like this

title Upgrade to Fedora 14 (Laughlin)
kernel /boot/upgrade/vmlinuz preupgrade repo=hd::/var/cache/yum/preupgrade stage2=http://mirror.aarnet.edu.au/pub/fedora/linux/releases/14/Fedora/x86_64/os/images/install.img ksdevice=link ip=10.1.1.42 netmask=255.255.255.0 gateway=10.1.1.4 dns=10.1.1.21 ks=http://your-webserver/ks.cfg
initrd /boot/upgrade/initrd.img

10) Reboot the computer to start the upgrade installation. When the computer boots up it automatically starts the upgrade and once stage2 is running it will start the VNC server.

11) Connect a VNC client so you can watch the progress. (After sending the reboot command, it took a few minutes before the VNC client could connect.)

12) When the upgrade installation is finished the computer will reboot.

13) Once the computer has booted up again it should be running Fedora 14 and you should be able to login to it via SSH.

$ ssh RemoteComputer
$ uname -a
Linux RemoteComputer 2.6.35.6-48.fc14.x86_64 #1 SMP Fri Oct 22 15:36:08 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

14) Lastly a bit of clean-up. Delete the ks.cfg file off the other computer's webserver.

Fedora PreUpgrade RAID workaround

Cloning Linux to VMs

XenTop column too wide

Qemu Asus eee PC 701

Update tzdata on old servers

eee 901 SSD nilfs2 fedora

FC12 Qt Lazarus

Fedora PreUpgrade RAID workaround

flvrec.py broken audio recording fixed

Zen Cart Virus

MP3735 ends in tears

Login

Username:
Password:
Forgot Details?