Two Linuxes fighting to boot

Q I got a new computer with a 40GB hard drive, so I decided to take 13GB and put Linux into it. I did all the partitioning and I installed Linux in three different partitions, as follows: /dev/hda6 /boot 102 MB, /dev/had7 swap 1977 MB (twice the RAM size I have), and /dev/hda8 / 10080 MB. So far so good. I then decided to put in the hard drive from my old computer, which has a Linux installation already. The size of that hard drive is also 13GB and it had two partitions in it: the swap, with size around 700MB, and / partition. This hard drive was the slave in the old computer so I installed it in my new computer as a slave too. The thing is, I want to use the old Linux installation. However, I can't boot because every time I boot my computer, the new installation kicks in.

A Many BIOSes support booting from a slave disk, and this is the simplest way to switch between the two disks without actually changing anything. You can tell the BIOS to boot from the specific disk you want, rather than from the first one it finds. A fancier approach is to set up your boot loader on the first disk to jump to the second disk when you make a specific selection. With LILO, you can add a section to /etc/lilo.conf as follows, then rerun LILO on the system installed on the first disk:

other=/dev/hdb
label=OldLinux

Depending on which bootloader is installed on the slave disk, it will kick in and you can boot from the disk as if it were the only one on the box. As you had two disks in the past, you may have to install LILO on the second disk because it will have been installed on the first disk when you did the initial Linux installation.

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar