June 8, 2004 10:26 PM
Once upon a time, when only Win 98 resided on my system, I hadn't
thought much about the overall boot process. Sure, I knew the basics;
the bios loading up and doing the POST (Power On Self Test), the bios
then checking the boot devices in order, the bootstrap loader on the
device being given control which usually loads other programs
necessary for the execution of an operating system and so on. Only
when I was preparing for my first linux partition, I gave it much more
serious thought.
The boot sector of a hard disk, called the MBR (Master Boot Record) takes up the first 512 bytes on the disk. Bootloaders such as GRUB, LILO and NTLDR are usually installed onto the MBR so that they can facilitate the loading of multiple operating systems. GRUB (GRand Unified Bootloader) and LILO (Linux Loader) are familiar to most Linux users. NTLDR is Win 2000/Win XP's bootloader that lets you run different Win distributions installed on the system.
An interesting point to note is that each partition on the hard disk
itself has a boot sector. Thus, LILO or GRUB can be installed onto the
boot sector of the Linux partition and still be made to work if you
have NTLDR on your system. This can be easily accomplished by dumping
the first 512 bytes of the partition on which Linux is installed onto
a file using the dd
utility from a Linux shell. The syntax is as
follows:
dd if=infile of=outfile bs=blocksize (bytes) count=blocks to read
Since I have my Linux boot partition in hda5
, the following
invocation should do the trick:
dd if=/dev/hda5 of=/linux.bin bs=512 count=1
Once this file (linux.bin
) has been copied to the C drive, the
following line has to be appended at the end of C:\boot.ini
:
C:\linux.bin="Linux"
That should put an entry called Linux on your NTLDR menu so that choosing it will load GRUB or LILO.