Another World Headline Animator

Another World

Photography

http://www.flickr.com/photos/sroyc/

I am a "Photographic artist" and take suitable assignments.

Leave your comment with contact details.

Google Ads

Saturday, December 30, 2006

Dual Booting Linux: A Pictorial Guide


The credit of the original guide and the images goes to Bertender of TSF. I am thankful to him for allowing me to post it in my blog. I have done some editing only, but the original flavour is retained.
_____________________________________________________

This example used two Linux Distros: PCLOS and Ubuntu 6.01. But this method can be used to Dual Boot any two Linux Distros.
____________________________________________________

This guide describes dual-booting PCLOS on a computer that already has Ubuntu 6.10 installed and has been partitioned beforehand to accept another Linux OS. Partitioning was already described in first part [the preceding post in this Blog].

Restart PC, drop PCLOS CD in tray, “Welcome to PCLinuxOS”

  • Sign in as - Username: root, Password: root, move mouse to 'Login', Left-click
  • When you get to the PCLOS desktop, double-click on 'Install PCLinuxOS'
  • “This wizard will help you install...” Next
  • “Normal Hard Drive (ide, sata) Next
  • Choose 'Custom disk partitioning' Next
  • “Please make a backup of your data first” OK
You get the Draklive – Install Enhanced partition map. I left-clicked on the second ext3 partition, (hda2) then left-clicked on “mount point”.

New window pops up, with “/” showing in the 'Mount point' line. I clicked “OK” and get this



Notice how the map shows two “Journalised FS: ext3” partitions, denoted in the dark red, and one bright green swap. It's saying the same thing as Gparted once you understand the language. Notice also that we have “/” showing in the second partition, /dev/hda2. That's where we want it to go.

Since the HDD already has a swap partition I don't need to make one. If I wanted to make a separate 'home' partition I'd click on hda2, then click on the “resize” button, then go through those steps, which seem fairly straightforward. We're keeping this simple so I'm just building one partition for PCLOS.

Click on “Done”

'Choose the partitions you want to format' – hda2 is checked off already so I just click on “Next” even though it's already in the proper format for PCLOS to just go ahead and install.

Big warning sign that you're about to format...Click "Next"

'Please wait Formatting hda2' 'Press Next to Install or Cancel to Quit'....."Next"

'Copying in progress' Long wait, then 'Please wait...Creating mount points and preparing bootloader' .


Pay attention.. You want to make 2 changes – change 'Bootloader to use' from 'LILO' to 'GRUB with text' and you want to install the boot device to /dev/hda2. What you're doing is telling PCLOS to use GRUB instead of LILO and install it in the same partition with the rest of the OS.

Click "Next"

Now I get a window that says,

“You decided to install the bootloader on a partition. This implies you already have a bootloader on the hard drive you boot (eg: System Commander). On which drive are you booting?”

hda is checked, I click......"Next"

Note: It's interesting that PCLOS pops up a warning at this point. What we're doing is not typical and that's why you get a cautionary message. For the average Joe who's installing one Linux distro the bootloader will install at the front of the HDD.


New window that lists four entires in boot menu. I chose to leave this alone. Why? Because I didn't know what the heck it meant.

****This screen gives you the list operating system as recorded in the grub.conf file of PCLOS. The first two lines tells you that there are two Linux OSes installed in the HDD, one Fail-Safe option available in case some system changes makes the Linux unbootable. The last line tells you that Windows is installed in the PC in the 2nd HDD's first partition and the 2nd HDD is SATA.

Though it appears to be a weakness of PCLOS' GRUB that it does not tell you which line belongs to which Linux Distro. Personally Ubuntu's GRUB I found to be better as it recognises other OSes present in the machine, adds those automatically to GRUB's OS choice menu and tells you the location of every available OS in the HDD with respective Distro name.

At this PCLOS screen user can manually input locations of other OSes present in the PC and not recognised by the PC, that is editing the grub.conf file; though I also feel that one should stay out of that at least at this stage.****

Click......"Finish"



Set administrator (root) password. Type something in twice, or choose no password at all,....."Next"

Enter a user

Real name:
Login name: (it auto-entered my first name after I finished the above line)
Password:
Password (again):

I just used the same password for root and user since I don't have any security issues at home...

****If you are going to surf internet and use it for general purpose, it is always advisable to have a non-root user account used, for sheer security issues. It is not Windows, and so you are allowed to change anything and everything. Sometimes those changes will simply make your computer unbootable with Linux. Moreover you can do almost everything as a non root user using 'sudo -i' or 'sudo' commands in the terminal window.****

Change your icon if you wish........"Next"

'Please halt your computer, remove the CD, restart...'

I clicked on the PCLOS icon in lower left, chose 'Log out', clicked on 'Restart Computer'

PCLOS looks like it's going to shut down, but opens optical tray and waits for you to remove CD, then hit Enter before it does so. PC restarts, and Ubuntu boots. As far as I could tell there was no PCLOS on the machine. Have faith.

In Ubuntu, open terminal, type in sudo gedit /boot/grub/menu.lst

Find the timeout line, about 17 lines down from the top, and increase that to 10 or 15 seconds at least.

Right after the Ubuntu memtest section, towards the bottom of menu.lst, add these three lines

title PCLinuxOS
rootnoverify (hd0,1)
chainloader +1

Here's what the lower part of my menu.lst looked like after the additions...

title Ubuntu, kernel 2.6.17-10-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.17-10-generic
boot

title Ubuntu, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
boot

title PCLinuxOS
rootnoverify (hd0,1)
chainloader +1

### END DEBIAN AUTOMAGIC KERNELS LIST

Make sure to put a blank line above and below the new entries.

I tapped the Tab button to separate 'title' from 'PCLinuxOS', same for the other 2 lines. Worked out fine.

Save the changes, close out of terminal. Restart the PC.

On the next boot, Ubuntu's GRUB waits the amount of time that you just set in /boot/grub/menu.lst. I find 15 seconds to be a comfortable minimum. During the timeout you hit 'Esc' to enter GRUB list, scroll down to PCLinuxOS, hit Enter and you get an odd DOS-looking screen with some PCLOS boot options. Don't touch anything and PCLOS will boot in a few seconds.

****To avoid this editing and directly boot in the Linux, just remember to install the PCLOS' GRUB in the (hd0), that is the boot partition at the beginning of your primary HDD. But remember this will simply wipe your previously installed Ubuntu's GRUB and make the GRUB of PCLOS as the default. This happens that because by default BIOS always looks for the Boot information in the Primary HDD's boot partition [that is the first partition]. If you are still interested to use Ubuntu's GRUB [which I would prefer personally], you just need to reinstall Ubuntu's GRUB, and voila! You have your old Ubuntu boot loader back and with PCLOS listed there automatically.****

Unless you want to log in as root, use the username and password that you created under the 'user' window several steps back. The username is on the screen, up in the left hand corner, so all you have to remember is the password.

OK, some explanation of the 3 menu.lst entires are in order.

For those of you who think the command line is an unforgiving disciplinarian, you might get a kick out of this. If you type in:

title Toasted Cheese Sandwich

then 'Toasted Cheese Sandwich' is what will show up in the GRUB menu during startup. You can type whatever you want as your title. Don't worry, it'll still successfully go to your Linux install.

The next line is not so forgiving. It MUST specify the correct partition, and that's expressed in GRUB-speak. For our model Linux says, “PCLOS is in hda2” but GRUB says, “PCLOS is in hd0,1”

That's still not very clear, is it? Let's say you wanted to make a triple-boot Linux PC. You made a third primary partition, then installed Mint Linux (and its bootloader!) to that partition. You would add three more entries to menu.lst, and they'd go like this:

title Mint Linux
rootnoverify (hd0,2)
chainloader +1

Note: I wasn't just winging it when I wrote this guide. I took a HDD with Ubuntu on it, made a second partition, and went thru all of the above steps. I mistakenly typed (hd0,2) into menu.lst. Saved, rebooted, toggled down to 'PCLinuxOS' and GRUB followed my directions. Since hd0,2 was the extended partition, and there was no bootloader to be found, the screen set at “Starting up...” until I held down the power button and went looking for my mistake.


****So in a nutshell the most important thing is the location of the Linux Distro on your HDD. Boot loader does not give a damn what you write in the 'title' line, it always goes to the 2nd line and looks for the root partition location of that distro.****

You now have most of the info you'd need to do a triple-boot, because the third line is always the same.

The only trick would be making sure to install GRUB to the distro's partition. That's because each one is different. Ubuntu gives you a little tiny box on the very last page of the installer for changing GRUB. It's easy to miss.

2 comments:

Anonymous said...

Would like to thank Mr. Choudhury for the article. Not sure if it will work yet but believe you're on the right track.

Tried for many moons to install ubuntu emc & debian bdi emc to separate HDDs. Unable to come up with the formula for listing the distros at boot.

Usually get one on the master HDD but when the other distro is installed on slave HDD The MBR - Grub does not recognize both.

It late here but looking forward tomorrow to see if I can figure this out. Looks promising.

I've had even less success when using a single boot system. AS one distro will wipe out the other & vice versa.

There are many articles on dual booting but few on Linux distros. Thanks again for taking the time to put this together.

Pete

Unknown said...

Happy to be of some assistance Pete