Dual Booting to Linux
Edubuntu was my distro of choice because I wanted to install it on the kids' PC and show my, teacher, wife what the OS is capable of.
Step 1 - preparing the ground
I installed an old hard disk from a a defunct Win98 PC from which I could salvage all useful components and discard the remainder. Once I had added the jumper necessary to set up the disk as a slave drive I put it into the second slot on the same ribbon cable as the main disk. With this done I had a second disk that showed up readily under XP. From here I cleared the disk of anything useful and onto step 2.
Step 2 - testing Linux
A workstation Edubuntu system needs at least:
- 500 MHz processor
- 128 MB of RAM
- 2.1 GB of hard disk space
I knew the machine met the above requirements but the peripherals are a different matter.
With the relevant Live CD in the machine and the BIOS set-up to boot from the CD drive I checked the hardware could support my proposed installation. No problems, it wasn't exactly speedy (but we are talking about an old Packard Bell machine that came with Windows 98). I could see both disks, the floppy drive and both CD drives too. Sound was working and the monitor had obviously coped. There was some error about the ACPI interface I think but Ubuntu had found a way around this small issue. So Ubuntu ran and my plan could work, onto step 3.
Step 3 - installing Linux
Here, in hindsight I should have checked out what the installation would entail but I just trusted in Ubuntu and went for it. There were five steps asking for details of your location, keyboard set-up, what users to set-up including migrating stuff from any known Windows installations, and the disk partitioning.
It was the latter that required special attention because most people install as a second partition on the main disk. I was installing to a second HDD. I selected the second disk (hd1) and the install continued. This installation took a couple of hours I think, I wasn't sitting at the machine all the time so it may have been quicker.
NB: Make sure you note down the user details as you cannot get anywhere without them when the system is up and running.
So installed successfully, I removed the Live CD and tried a reboot!
Result, a GRUB boot error 21. I was stuck, the machine was not booting to either OS! Oh, dear.
Step 4 - fixing the Kids' PC
So how to get the second OS to boot? I checked out the net for advice. It seemed GRUB error 21 was disk not recognised and Ubuntu's version of GRUB wasn't the best. It was also clear that I had two options and given the primary role of the PC in question is for the kids my choice was clear - I must get XP working first and then address the Linux issue second. I booted from the Ubuntu Live CD to check the disks were okay and both looked fine - so the problem was in the booting only, I presumed.
I fetched out the XP CD and booted the PC from this and into the recovery console to fix the boot information on the main disk. That done it booted into XP okay. Phew, no damage done and some progress. Now to fix the new OS installed. I needed to know how to dual boot with Windows XP in charge of the booting.
Step 5 - Dual boot from XP
I searched the web for some help on what I needed to do on XP to set-up for dual booting to Linux. I came across this article from Phillip Hollenback that told how he did what I wanted to do but from step 1. It was clear what steps I needed to follow to set-up XP. I used Bootpart, run under Windows, to add the entry to Windows' boot.ini file and create the file Linux needs on the Windows disk (c:\bootsect.lnx) to then boot up that OS.
When I rebooted this time the PC asked which OS I wanted to start. I tried both. Windows started no problem but Linux whinged that it could not find the boot stuff so still one problem to go.
More research on GRUB and I found some good and simple guidance on using a Live CD and GRUB to fix the boot stuff on the second disk.
As follows:
With Ubuntu running from the Live CD get a terminal running and then:
sudo grub
grub> find /boot/grub/stage1
(hd1,0)
(hd1,1)
grub> root (hd1,0)
Filesystem type is ext3fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e3fs_stage1_5" exists... yes
Running "embed /boot/grub/e3fs_stage1_5 (hd1)"... failed (this is not fatal)
Running "embed /boot/grub/e3fs_stage1_5 (hd1,0)"... failed (this is not fatal)
Running "install /boot/grub/stage1 d (hd1) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
The disk/partition references above are not necessarily accurate (I have edited them in from memory) but the steps are correct. What the above does is start GRUB as superuser; ask what the current situation is and then, using the correct disk partition refences, fixes the disk booting stuff.
This done I rebooted (CD removed) and selected the Ubuntu option and hey presto! I had booted from my second disk into Edubuntu! Magic.
Conclusions
I am happy that there is very little change to the XP installation and I could remove the second disk and move it to another machine, and then do the same again. If I have any XP problems it is very little work to add back the dual booting. It is clear from Hollenback's article that I could have used a different Linux Distro and just the install options would have allowed me to set up the system with a dual booting two disk configuration I wanted but with GRUB in charge of both boots. I like what I've got now.
