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.
yum updateto 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.isoThis 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 /mntThis 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/vmlinuzIn 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).
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
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
Can't access tty: job control turned offI 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.
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-syncActually, better yet:
yum -y --releasever=15 --disableplugin=presto distro-syncDisabling the presto plugin is recommended as the drpm format has changed.
Now we are on to fussing with broken dependencies.
yum erase libpanelappletmmThis 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-urwidRemoving 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.
As recommended I do:
yum groupupdate BaseThis pulls in 19 packages, including NetworkManager, which I DO NOT want under any circumstances! So we do:
yum erase NetworkManagerThe groupupdate also pulled in Networkmanager-glib, but attempting to remove it wants to take 31 other packages with it, so I let it be.
As recommended, I also attempt to upgrade grub:
/sbin/grub-install /dev/sdbBut 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/sdaAnd 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.
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.i686I yum erase both of these, gnome-dvb-daemon takes totem (some kind of TV/movie viewer) with it, which is OK by me.
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.
Adventures in Computing / tom@mmto.org