target audience

Those of you who want to run a parallel install of new OS so that the old OS is available for boot as well as a source of configuration information. Very safe upgrade method as you can always reboot to the existing OS, this minimises downtime and allows recovery in the case of installation failure for whatever reason.

overview

The hard drive is partitioned to allow two parallel OS installs, in the example case a third 'service' partition is utilised for the install task as the example system has no bootable CDROM.

The new OS installation can be 'test' driven and the system quickly reverted back to the working old OS if there's a major dysfunction. As well, much of the preparation of the new OS install can be performed while the machine is live 'on air' with the old OS. Once the new OS has proven itself under test, the bootloader is switched to boot the new OS by default. This implements the classic parallel install method where either system, old or new, may be run and full information from the old system remains available for cherry-picking into the new OS.

partition table

This is the afterwards view of the partition table and partitions in use.

~# fdisk -l /dev/hda

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System	[Usage]
/dev/hda1               1          32      257008+  83  Linux	service
/dev/hda2   *          33         416     3084480   83  Linux	1/
/dev/hda3             417         672     2056320   83  Linux	2/
/dev/hda4             673        9728    72742320    5  Extended
/dev/hda5             673         704      257008+  83  Linux	1/var
/dev/hda6             705         736      257008+  83  Linux	1/usr/local
/dev/hda7             737         800      514048+  83  Linux	1/home
/dev/hda8             801         832      257008+  82  Linux swap
/dev/hda9             833         864      257008+  83  Linux	2/var
/dev/hda10            865         896      257008+  83  Linux	2/usr/local
/dev/hda11            897        1024     1028128+  83  Linux	2/home
/dev/hda12           1025        1536     4112608+  83  Linux	(spare)
/dev/hda13           1537        2560     8225248+  83  Linux	/home/common
/dev/hda14           2561        4608    16450528+  83  Linux	/opt/backup
/dev/hda15           4609        9728    41126368+  83  Linux	/home/mirror

~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2              3084380   1301004   1783376  43% /
/dev/hda5               256948     44472    212476  18% /var
/dev/hda6               256948     40480    216468  16% /usr/local
/dev/hda7               514028    150876    363152  30% /home
/dev/hda13             8224960    900112   7324848  11% /home/common
/dev/hda14            16449988    547848  15902140   4% /opt/backup
/dev/hda15            41125076  21450364  19674712  53% /home/mirror

installing new OS

Take extreme care NOT to format partitions belonging to the current OS or the system's persistent data!

switching lilo

So far we've been booting the new OS install via the old OS's lilo, now that we are ready to transfer control to the new OS, it is time to switch the new OS's lilo to the MBR.

old os' lilo.conf

# /etc/lilo.conf for slackware on deltree 2005-09-08
#
boot=/dev/hda3				-- was /dev/hda, the old MBR
root=/dev/hda3
read-only
compact
lba32
prompt
timeout=30

default=2.6.19.2a

image=/boot/bzImage-2.6.19.2a
  label=2.6.19.2a
  optional

image=/boot/bzImage-2.4.34
  label=2.4.34
  optional

image=/boot/vmlinuz-ide-2.4.33.3
  label=slack-2.4.33.3

other=/dev/hda1
  label=service

other=/dev/hda2
  label=alt

# end

new os' lilo.conf

# /etc/lilo.conf for slackware-11.0 on deltree 2007-01-30
#
boot=/dev/hda				-- was /dev/hda2, is now MBR
root=/dev/hda2
read-only
compact
lba32
prompt
timeout=30

default=2.6.19.2a

image=/boot/bzImage-2.6.19.2a
  label=2.6.19.2a
  optional

image=/boot/vmlinuz-ide-2.4.33.3
  label=slack-2.4.33.3
  append=""

other=/dev/hda1
  label=service

other=/dev/hda3
  label=alt

# end

run lilo

~# lilo -A /dev/hda 2		# activate /dev/hda2
pt[2] -> 80
pt[3] ->  0
The partition table has been updated.

~# lilo -r /home/alt/		# run lilo for old OS
Warning: Partition 3 on /dev/hda is not marked Active.
Added 2.6.19.2a *
Added 2.4.34
Added slack-2.4.33.3
Added service
Added alt

~# lilo				# run lilo for new OS
Added 2.6.19.2a *
Added slack-2.4.33.3
Added service
Added alt

On reboot, the new OS on /dev/hda2 will get control.

further info