Linux Guide/Installing (dual-boot)

Dual-boot systems - Run Linux and MS Windows

edit

You need to run both MS Windows and Linux on your PC and you have only one hard disk. Follow these steps:

Windows needs the first partition on systems where grub is being used as a bootloader. (Note that this requirement does not apply to systems that use lilo). It is strongly advised to put windows in the first partition (/dev/hda1 or /dev/sda1) otherwise you will have to do hide and unhide of partitions during grub configuration. If you have Linux on first partition then you have to move it. Golden rule: Put windows in first partition and Linux can run easily off any other partition

Notation: If using SCSI or SATA drives use 'sda' and for IDE drives use 'hda'

  1. Download the partition tool LiveGParted from http://gparted.sourceforge.net/livecd.php and boot the LiveGparted CD-ROM
  2. Resize the MS Windows partition and then create new partition(s) for Linux.
  3. If Windows is NOT in first partition and if Linux is already existing on first partition then move the Linux from partition 1 to another partition like 2.
Open X-terminal console and 
	mkdir /hda1
	mkdir /new
	mount /dev/hda1 /hda1
	mount /dev/hda2 /new
	cd /hda1
   Use tar and not cp -r.
	tar cpf - . | tar xpvf - -C /new
   Edit /new/etc/fstab and /new/grub/menu.lst as appropriate
  1. Create primary partition 1 FAT32 for MS WindowsXP, Windows wants the first disk.
  2. If you do not have Windows already in partition 1, install Windows XP on partition 1 (format to NTFS)
  3. Boot Linux CD-ROM and install the grub and in menu.lst you do not need to do unhide and hide since MS-Windows is in first partition.

Troubleshooting: Grub not finding file or disk or partition. If the disk is not recognised inside the grub, then that partition is marked as "hidden". Also when you do 'find /boot/grub/stage1' it does not find the file. So you do this inside grub: Note: hd0 is /dev/hda1 and partition 1 is 0 in grub commands.

grub> unhide (hd0,0)
grub> find /boot/grub/stage1  
(Now this will succeed and show some output)

Dual-boot references: