Dual boot Linux/Windows using NTLDR with linux on the other hard disk drive
The situation: I want to take safety precautions by avoiding the possibilities of messing up with my Windows Partition (and yet still wants to play around with any linux box) by installing the linux on a new empty hard disk drive. As easy as it sound... but I want to use NTLDR bootloader Windows (the classy black and white MS-DOS style) instead of colorful GRUB loader (or maybe you just want to use NTLDR boot loader and still refused to use LILO bootloader).
The Problem: How do I do it, since the Windows on the primary hard disk drive, and the Linux is on the 2nd disk?
The Solution: During installation of the new linux, we must install LILO/Grub on the first partition, not on the MBR. Next, simply boot into your linux box and launch the terminal. On debian based box (knoppix, kanotix, ubuntu etc) maybe you want to view the list of hard disk drives attached to the computer, use this command:
root@localhost:~# fdisk -l
And the terminal will list down every single hard disk drives available. (Note: you must be in root permission in order to do this) Determine the hard disk for linux and respective partition. As for my case it is /dev/hdb1.
In the terminal, type in the following command:
dd if=/dev/hdb1 of=bootsector.lnx size=512 count=1
(Note: If above command doesn't work, you might want to omit the size=512 in the command)
Where:
/dev/hdb1 is my linux partition.
This will create a file bootsector.lnx in the current present working directory (type #pwd in the terminal to determine the current directory). Now, we need to transfer the file into a diskette or FAT32 partition, since we are going to transfer this bootsector.lnx file to the Windows Partition (usually formatted with NTFS filesystem).
Next, login into your Windows XP. Open c:\boot.ini files. Or you may choose the long way - On the My Computer icon, choose properties (Or Control Panel > System). On the Advanced tab, click settings button under "Startup and Recovery". Next, click on the Edit button.
Edit the boot.ini file by adding this lines on the very bottom of the page.
c:\bootsect.lnx="Boot to my linux box"
...and as you may guess., copy the generated bootsector.lnx to the root of c (c:\).
Reboot your computer. Supposedly you will have the NTLDR bootloader showing options to boot to your linux box apart from Windows XP.



0 Comments:
Post a Comment
<< Home