8. Twin Boot Upgrade

This is the easiest way to upgrade an operating system. If you buy an extra disk to install an upgrade, here is where you use it. If you don't plan for an additional hard disk (one per year), consider earmarking a 300 MB partition, for this or for other experiments.

8.1 boot old, boot new
8.2 Test it ...
8.3 Add a new disk
8.4 shared disks

8.1

boot old, boot new

Basically you have two independent Linux installations on one machine. At boot time you can select either the old or the new system.

When you are confident that you can do anything with the NEW system, you can put it into daily use, then eventually delete the old installation, (ready for the next experiment).

8.2

Test it ...

You know it works because you tested it.

8.3

Add a new disk

If you have a 2 GB disk, split it into 3 sections (bigger than 660 MB size of a CDROM), and a 10 MB boot partition. You put the swap onto a physically seperate disk. You can use extended partitions if you choose (ie more than 4 areas).

fdisk /dev/hdb

Try to arrange it so that opposite ends of the disk won't be used at the same time, and put a SWAP partition just next to the linux main partition.

If you create swap partitions, edit /etc/fstab. If you create swap files, edit /etc/rc.d/rc.swap_files and call it from rc.local (or earlier).

For the really curious, the ext2 fs splits it's partition into compartments or cylinder groups. Files created under a directory in group 34 will PROBABLY also be in group 34. This makes it quite difficult to compare performence of different machine, unless you can set them up to be exactly the same. It also makes it difficult to create swap files near the programs that will need them. In general, just forget about the problem, and put the swap space on an otherwise unused disk. As long as you have enough space, you will be OK.

You setup /hda4/boot and /etc/lilo.conf as described in Raven-SysBuild.

You (will) have two independent Linux systems, housed in one box. Only one is active. You can boot the 'old' system, much as you did yesterday, and do some work, or you can boot the 'new' system and get it working.

8.4

shared disks

The only thing shared by the two systems are the swap partitions, the lilo boot configuration, /dos/c and your HOME directory (maybe). They run different kernels (eg 1.2.13 and 2.0.29) and use different binaries (eg a.out and elf). You build up the new system, service by service, until it can do everything that the old system could do. If you are careful, you can also share other partitions (eg /usr/local -> /hdc2/local), but beware.

Initially use only use new test data, you don't run the new system on your old data files. You BACKUP your $HOME directory before running with the new system. Or better still you start a new user, without all those .x-res-rc files. Beware! the new version of an app might clobber the old versions file!

Even after switching to the new system for daily use, you keep the old version available, for when the new system can't do what the old one could.

Some of you will be doing this from the boot+root disk(s), installing Linux for the first time. Others will be doing an upgrade, using their 'old' system to install their 'new' system, so that it can boot OK.

To be sure that the new system isn't using the old system's files (eg /etc/ld.so.conf), edit /etc/fstab so that the partitions aren't loaded. If they're not loaded, your not using them, use df to see.