The dual boot Linux / Windows
the solutions have been tested on XP but most of the solutions will work with Vista as well
1. use BIOS settings
When you turn on the computer it loads mainboard BIOS that after checking hardware tries to find the
OS on the given place.
In the past it was possible only to boot from a floppy or HD , but now typical BIOS settings
enable to boot from CD , floppy , HD, USB and sometimes from LAN.
All the time there is an option to boot from 1st hard drive and this is the drive connected to the first slot on mainboard
(usually Master on IDE1 ).
Now many of the new boards give the possibility to change order of HD in BIOS settings, so if your board enables swap
this is the first way to dual install :
Suppose you have Windows on WD and second disc Seagate.
In the BIOS settings you can set the order 1.Seagate 2.WD
Now when you restart computer it gives the disc error as it tries to read from Seagate that is the empty one.
The you can full install linux on Seagate following the installation instructions.
For Linux Seagate is the first disc (hda) and Windows is on the second disc (hdb).
Then when you restart computer it starts Linux only.
If you want to run Windows you have to go back to the BIOS settings and set order back to 1.WD 2.Seagate.
Now the computer restarts looking for the first HD again but this time first is WD an then Windows starts.
Both Linux and Windows run independent and don't have to see each other, the problem is that anytime you want to
change system you have to go back to BIOS settings ( however you can add Windows start to Linux boot as in point 4).
2.use Windows bootloader (NTLDR)
When the BIOS boots the HD it goes to the very beginning of the disc. First 512 bytes are so called Master Boot Record
the first first 4... bytes of MBR are called bootloader and there is the information where on HD is OS ,
the remaining bytes contain structure of partitions existing on the HD.
During the process of the instalation Windows installs the bootloader to the MBR and the system starts in so called 'chain loading'
boot method:
1. turn on the computer 2. load BIOS check that goes to the MBR of the HD
3. data from MBR points to the beginning of the partition where is Windows OS installed ( system files from C:\ and then from C:\Windows).
The way to add linux to the windows booting informations
is fully described here
With this solution you have the original Windows bootloader starting Linux.
If you want to repair the windows MBR you can a)reinstall the system b)repair the system from Win install CD
c) repair the system from Bart PE CD d)from Windows safe mode use commands like fixmbr , but remember that
Windows simply overwrites the existing data in MBR , so erases linux MBR if it was installed.
3.use Linux bootloader ( Grub )
Grub is the linux program that installs bootloader to MBR.
As the bootloader is bigger than 512 bytes it is split into two parts one called 'primary bootloader' that residues in MBR and points
to the 'secondary bootloader'.
Now when BIOS points to the beginning of the HD with grub first processor loads the data from primary bootloader in MBR
and this is so called stage one , then is redirected to the secondary (stage two ) that completes the bootloading process,
but for us it is now irrelevant.
What is important that linux grub can start windows.
The third way :
Windows on the first partition of the first hard drive.
During the installation of Linux the grub writes the data to the MBR overwriting the existing Win one,
and is installed on the next partitions of the same drive or on the second one.
5.use Lilo
Lilo is similar to grub but smaller, an the way of instalation is similar.
After linux instalation you should edit file
/etc/lilo.conf similar to this:
6. booting Lilo with Grub
( clue is in point 5)
This is a way how to install BT to hd, but without lilo.
As it doesn't change anything but bootloader,BT installed that way will work , if BT installed with lilo in 'traditional' way
works on a computer.
So it is usefull only when you have already installed a linux distro that uses grub. I have tested it on debian-based linuxes,
but should work on any grub-linux.Grub can boot many systems, so you can use it to tripleboot , Debian,Windows,BT.
Assuming that you have first partitions used like:
/dev/hda1 -linux
/dev/hda2 - windows
1. prepare empty partition e.g. /dev/hda3
2.boot BT live CD
3.press konqueror button - system>BackTrack installer
first line "source" leave empty
in second "install BT to" put the path to the partition e.g./dev/hda3
third "write MBR to" leave empty - that prevents lilo from writing mbr
and choose 'real' installation
4.reboot to grub-linux
5. in /boot/grub/menu.lst add lines
6.reboot again then in the menu you should see Backtrack 2 boot option.
7.Partitioning
Linux uses different partition systems than Windows
the most popular are EXT2, EXT3 and ReiserFS so to install Linux you must create partition with one of the systems.
If the only partition is fully taken by Windows that happens often in laptops you don't have to reinstall Windows, but first you can try
to shrink the existing partition using Partition Magic ( Windows ) or some linux programs as parted or Gparted
but linux still have buggy NTFS support , so with any partition program backup the most important data first.
Most of the new distros come with advanced partition programs so you can try to use them as well.
|