Dual booting

Table of Contents

Dual Booting using GRUB
Partitioning the hard disk
Creating the partitions
Install Red Hat
Accessing the shared drive /dev/hda4
Installing BootIt
References
Author
Licence

Dual booting

Dual Booting using GRUB

This article describes how I've set up Win2K and Red Hat Linux V 8 on 1 hard disk, and how I use GRUB, the Linux boot loader, to choose an OS at boot time.

Partitioning the hard disk

References for partitioning are at the end of the document.

The aim is to have 4 partitions on a 30 Gb hard disk:

  • Windows

    Size: 14 Gb.

    Of course, choose your own sizes here.

  • Linux swap space

    Size: 800 Mb.

    Recommended size: A bit over 2 times RAM size, and I have 320 Mb of RAM.

  • Linux

    Size: 13 Gb.

  • A scratchpad

    Size: 1.5 Gb.

    Room enough for 2 CDs worth of data.

    This allows files to be easily moved back and forth between Windows and Linux.

Creating the partitions

I used BootIt NG V 1.60e from http://www.terabyteunlimited.com/ to do the partitioning.

BootIt is a superb shareware program.

I will not go into the details of driving BootIt here.

The steps are:

  • Install Windows
  • Download BootIt
  • Defrag the hard disk
  • Run chkdsk /f (or scandisk)

    This is necessary - BootIt will check for errors and stop if it finds any.

  • Unzip BootIt and run it

    It will create a bootable floppy or CD. It never installs itself directly.

    I used a floppy.

  • Edit the BIOS to boot from floppy

    I normally have the BIOS set to boot from CD, then C:, then A:. I needed to force a floppy boot, so I changed this to A:, then C:, then SCSI (as it happens with my BIOS).

  • Boot from floppy to run BootIt

    Now here's the trick - there is no need to actually install BootIt. Just use it to create the partitions.

    See the section below if you wish to actually install BootIt.

  • Shrink the Windows partition

    I shrank it down from 30 Gb to 14 Gb.

    It's not at all clear from the manual, but you do this by clicking and dragging on the right hand end of the partition in the display.

    Red Hat will know this partition as /dev/hda1.

    Other varieties of Linux will have similar but different names for the partitions.

  • Split the resultant free space into 3 partitions

    Details:

    • Linux swap partition

      Type: Linux swap, from BootIt's menu.

      Size: 800 Mb.

      Red Hat name: /dev/hda2.

    • Linux partition

      Type: Linux native, from BootIt's menu

      Size: 13 Gb.

      Red Hat name: /dev/hda3.

    • g (since it's g: under Windows for me)

      Type: Fat-32

      Size: 1.5 Gb.

      Red Hat name: /dev/hda4.

      Red Hat alias: /g

      Lastly, BootIt offers you the option to format this partition at this time. Do it.

Install Red Hat

There are of course many steps here. I'll just mention the relevant ones:

  • Put in the 1st Red Hat CD
  • Reboot

    Take this opportunity to edit the BIOS to boot again from CD. I set the order to CD, then C:, then A:.

  • Install Red Hat

    The installer will recognize the Linux swap partition, and offer to format it. Do it.

    You'll also need to click on the Linux partition, and in the pop-up window, select /.

    Warning: Read the next point now!

  • Check Advanced Configuration (or whatever!)

    At the bottom of the screen, there is a check box and text to the effect that an advanced configuration option is available.

    Check that box!

  • Install GRUB in the MBR

    Since there is no need to install BootIt, you must install a menuing system in the MBR, which lists the OSes.

    It is at this point that you install GRUB to do the menuing.

    In one test, I did install BootIt, and then I put GRUB elsewhere, i.e. not in the MBR. Then, upon booting, BootIt offered its menu, and when I choose Red Hat, GRUB fired up and offered its menu. So it can be done that way, but is pointless.

Accessing the shared drive /dev/hda4

Under Red Hat, open a terminal window, and type:

	mount -t msdos /dev/hda4 /g

This 'g' is the 'g' I mentioned above as the alias of /dev/hda4.

Copy a file to /g now and retrieve it later from Windows. Try something like:

	cp /root/install.log /g
	ls -aFl /g

Unmount (note the 'n') the partition in preparation for exiting and booting Windows.

	umount /g

Note the lack of an 'n' in there.

To make the mount command permanent, i.e. executed every time Red Hat boots, edit /etc/fstab and add:

	/dev/hda4 /g msdos defaults 0 0

Now, reboot and choose Windows. Do:

	dir g:

and you should be able to see INSTALL.LOG.

I can't tell you why Windows insists the file name is in upper case.

Installing BootIt

BootIt prefers to be installed in it's own partition. Since you probably start off with the hard disk being 1 partition dedicated to Windows, you must decide either to install BootIt in the MBR (Master Boot Record), or to shrink the partition to make room for other partitions.

I suggest you shrink first. Then, when BootIt asks if it can find for itself a partition to install into, say yes, and it will create a 5 Mb partition for itself at the end of the disk.

The problem with this is you'll end up with 5 partitions, and while BootIt is clever enough to manage more than the normal 4 partitions, other software probably won't cope.

References

http://aumha.org/a/parts.htm

http://www.blackviper.com/Articles/OS/Multiboot/multiboot1.htm

http://www.everythingcomputers.com/reformat.htm

http://www.labmice.net/Windows2000/install/dualboot.htm

http://www.terabyteunlimited.com/

Author

Ron Savage.

Home page: http://savage.net.au/index.html

This POD was converted to HTML by /Perl.html#fancy-pom2.pl

  • Version: 1.01 01-Jun-2006

    This version disguises my email address.

  • Version: 1.00 22-Dec-2003

    Original version.

Licence

Australian Copyright © 2002 Ron Savage. All rights reserved.

	All Programs of mine are 'OSI Certified Open Source Software';
	you can redistribute them and/or modify them under the terms of
	The Artistic License, a copy of which is available at:
	http://www.opensource.org/licenses/index.html
 
Top of page