Date: June 2, 2011

Introduction

First, I should warn you that this whole "diskless upgrade" thing fizzled due to terrible bloat in the Fedora 15 installer (Anaconda), and I had to fall back on doing a yum upgrade. The scheme described should be useful though for a system with more ample resources. Here is the story as it played out for me, and there was ultimately a happy ending.

For a long time I have been aware that it is possible to upgrade a fedora system without burning a disk. It is possible to do this via yum, but this is commonly disrecommended (though I have done it without problems). The method I am interested in trying pulls the files from the boot CD in the distribution, then sets up grub on the system being upgraded to boot these files from disk rather than removable media.

Getting ready

The system I want to upgrade is a 32 bit machine running fedora 14. Before I do anything else, I do:
yum update
to insure that I am starting with an up-to-date fedora install.

After this, I follow the steps outlined at this link. (see this link also) The first thing to do is to copy the ISO image for the boot CD onto the system to be updated, namely:

/fedora/releases/15/Fedora/i386/iso/Fedora-15-i386-netinst.iso
This is a 206 Megabyte file, and I just use scp to copy it from our mirror. Then I mount it via the loopback method, and copy all the files from the isolinux directory in the iso image into the directory /boot/isolinux as follows:
mount -ro loop /home/xxx/Fedora-15-i386-netinst.iso /mnt
cd /mnt
tar cf - isolinux | ( cd /boot; tar xvf - )
cd / ; umount /mnt
This copies the following files (about 100M, the bulk of which is in the file initrd.img:
isolinux/boot.cat
isolinux/boot.msg
isolinux/grub.conf
isolinux/initrd.img
isolinux/isolinux.bin
isolinux/isolinux.cfg
isolinux/memtest
isolinux/splash.jpg
isolinux/TRANS.TBL
isolinux/vesamenu.c32
isolinux/vmlinuz
In truth, you don't need all this stuff, but only vmlinuz and initrd.img. (Well, as of fedora 10, you also need images/install.img).

Edit grub.conf

Now we edit the file /boot/grub/grub.conf and add a new entry as follows:

title Network upgrade/install
        root (hd0,1)
	kernel /boot/isolinux/vmlinuz ro root=LABEL=/
	initrd /boot/isolinux/initrd.img

As an aside, if you are wondering why I use (hd0,1) rather than (hd0,0), it is because I have a /boot partition that I set up, but never mount or use, and never needed in the first place.

After this is setup, it will be possible to reboot the computer and select the Network upgrade/install entry from the grub menu, BUT ...

Access to the grub menu is often turned off in current fedora releases. I think this is incredibly stupid (just as I think that the red hat graphical boot is the work of imbeciles), but they don't care or listen, so you just have to nuke these things from orbit yourself, which you can do by editing entries in the grub.conf file as follows:

Not that this is relevant to the current discussion, but to disable the red hat graphical boot, add the boot option norhgb to the kernel line.

To get a grub menu you change two lines as follows:

#hiddenmenu
timeout=10

You may also notice (as I did) that there is a memtest executable in the isolinux directory you just copied. It is trivial to set up a grub entry to run this from the grub menu via:

title memtest
        root (hd0,1)
	kernel /boot/isolinux/memtest

But it doesn't work!

The above setup works fine for the memtest utility, but does not boot the install image, so perhaps some things have changed or the information I am following is just plain wrong. First of all, I am suspicious about the root=LABEL=/ entry, so I remove it (and the ro). That doesn't do it. It takes forever, and finally I get the message:
Trying to unpack rootfs image as initramfs ....
The long and short of it is that my system (an old Pentium II 400) has only 512M of memory and that is not enough! This is a new limitation as of Fedora 15, and they claim it will be fixed as of Fedora 16. Anaconda has just become a pig - they claim that 768M will barely do though, maybe. Installing from a live CD is a recommended workaround. Note that Fedora 14 required only 112 Mb, and now Fedora 15 requires 560 Mb, with no apparent increase of functionality. Starts to make Windows look sleek and efficient.

All this is described in gory detail here as Redhat Bugzilla Bug 682555

A workaround using the Live CD is described under Redhat Bugzilla Bug 708966

On to the live CD

It was a nice idea, but it is good to know when to throw in the towel. I scrounge up a CD rom drive, burn a i686 live CD for fedora 15 and give it a try. It gets into trouble and drops to a "dracut" prompt, with the message:
Can't access tty: job control turned off
I boot it again, and edit the grub line to remove the "rhbg" entry, and now, low and behold it seems to be firing up (but it doesn't give me a firm and confident feeling, especially if I am considering letting it upgrade this system from fedora 14 to 15. I click on the "install to hard drive icon" feeling brave (or maybe just frustrated). It tells me I need 640 Mb of memory to install, and I have only 512 in a cute little "not enough memory" popup.

It turns out a yum upgrade is my only option

See the Yum Upgrade FAQ which has some specific notes for a fedora 14 to 15 upgrade.

First I run package-cleanup --orphans which discovers a couple of old kernel versions which I remove.

Then I do telinit 3 to get out of a graphical environment, in fact for this memory limited system, I decide to edit /etc/inittab and make level 3 the default runlevel for this system.

I import the new Fedora 15 gpg key via:

rpm --import https://fedoraproject.org/static/069C8460.txt

Then I go for broke with:

yum --releasever=15 --disableplugin=presto distro-sync
Actually, better yet:
yum -y --releasever=15 --disableplugin=presto distro-sync
Disabling the presto plugin is recommended as the drpm format has changed.

Fix a broken dependency or two

Now we are on to fussing with broken dependencies.

yum erase libpanelappletmm
This is an old FC12 package, but it also takes gnote (a FC14 package) with it. This is the only dependency issue I have to resolve, and now it is off installing 141 packages and upgrading 1485 others.

I let this run overnight, and in the morning it is happily finished with only one complaint (about python-urwid), as follows:

Error unpacking rpm package python-urwid-0.9.9.1-3.fc15.i686
error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/urwid-0.9.9.1-py2.7.egg-info: cpio: rename
python-urwid-0.9.9.1-2.fc14.i686 was supposed to be removed but is not!

I resolve this via:

yum erase python-urwid
yum install python-urwid
Removing python-urwid takes python-stsci with it, which I will have to remember to reinstall once I get our local repositories set up for fedora 15.

I also do yum install gnote, not that I ever use this package, but it did get inadvertantly removed when I did some dependency resolution.

Do the recommended Groupupdate thing

As recommended I do:

yum groupupdate Base
This pulls in 19 packages, including NetworkManager, which I DO NOT want under any circumstances! So we do:
yum erase NetworkManager
The groupupdate also pulled in Networkmanager-glib, but attempting to remove it wants to take 31 other packages with it, so I let it be.

Try to upgrade grub

As recommended, I also attempt to upgrade grub:

/sbin/grub-install /dev/sdb
But I get the message:
/dev/sdb does not have any corresponding BIOS drive.
This system has /dev/sda an ATAPI 80G drive, and /dev/sdb a SCSI 18G drive. The root partition is on /dev/sdb2, and there is no separate boot partition. So I try:
/sbin/grub-install /dev/sda
And get the message:
/dev/sdb2 does not have any corresponding BIOS drive.
This makes even less sense than the first message, so we just won't worry about updating grub.

Preen a few more things

A final run of package-cleanup --orphans finds a number of packages which are in our local repository (note yet set up for fedora 15) and two others:

eggdbus-0.6-2.fc13.i686
gnome-dvb-daemon-0.2.0-1.fc15.i686
I yum erase both of these, gnome-dvb-daemon takes totem (some kind of TV/movie viewer) with it, which is OK by me.

OK, let's reboot!

The sync command works, but reboot, halt, and telinit give messages like:
Failed to talk to init daemon.
Couldn't find an alternative telinit implementation to spawn.

I resort to the reset button.

The machine boots up, I can ping and ssh to it, which is promising. It is running run level 3, which is what I wanted. yum update wants to install 17 packages, which it does. The reboot command works fine now, looks like this all worked out.

Moral of the story

I should have just done a yum upgrade to begin with, all the fancy upgrades from Live CD or the network install CD are hopeless for an older machine like this with limited memory. This boils down to terrible bloat in Anaconda, fortunately there is more than one way to do things.
Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org