March 10th, 2003, 02:37 PM
Booting Linux using the Windows 2000 Boot Menu
Booting Linux and other Unices using the Windows 2000 Boot Menu
First off, this tutorial is basically for people for whom GRUB/LILO don't work for some reason. Otherwise, GRUB/LILO are your best options for a dual boot system. Another situation where this info might be useful is if you've installed a UNIX that doesn't come with a boot loader and you need to boot it from hard disk (ie without a boot floppy).
Now, here are the steps you need to take:
1) When you install Linux, tell the installer to install LILO/GRUB into the first sector of the root partition and NOT the MBR. This is VERY important.
2) When you install the Linux system, be sure to make a boot floppy. Advanced users who know what they're doing can also use a rescue disk or any live distribution.
3) After you install Linux, boot your system using the boot floppy. You might have to change the boot sequence in the BIOS to get this to work.
4) Login to Linux as root and type in the following commands (Please note that the hash (#) is not part of the command. It's the bash prompt) :
(i) # fdisk -l
This should bring up a list of partitions that looks something like this:
Now in my case, the Linux partition is /dev/hda6 . Take a note of which partition is your Linux partition and keep it in mind. Now, if you have one or more FAT32 partitions, follow the instructions immediately below. If you don't have a FAT32 partition, just NTFS ones, then you read the following section and look at the notes at the end of the tutorial for floppy users.
# fdisk -l
Disk /dev/hda: 255 heads, 63 sectors, 4865 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1436 11534638+ 7 HPFS/NTFS
/dev/hda2 1437 1956 4173435 c Win95 FAT32 (LBA)
/dev/hda3 1956 4865 23370007+ f Win95 Ext'd (LBA)
/dev/hda5 1956 3521 12574296 c Win95 FAT32 (LBA)
/dev/hda6 3522 4541 8193118+ 83 Linux
/dev/hda7 4542 4607 530113+ 82 Linux swap
/dev/hda8 4608 4865 2072353+ b Win95 FAT32
(ii) Now, I have a FAT32 partition at /dev/hda5 . Now, I'll mount the FAT32 partition so that I can transfer files from the Linux partition to the FAT32 one. For that, use the following commands, replacing /dev/hda5 with your FAT32 partition and /dev/hda7 with your linux partition.
Now do an ls /mnt/hda5 to make sure that the partition has been mounted successfully. You should get a listing of all the files on that partition.
# mkdir /mnt/hda5
# mount -t vfat /dev/hda5 /mnt/hda5
(iii) Now comes the interesting stuff. Type this in exactly as I've written here (substituting the appropriate drive names of course), otherwise you could mess up your system.
It should respond with
# dd if = /dev/hda7 of=/mnt/hda5/boot.lin bs=512 count=1
or something similar
1+0 records in
1+0 records out
(iv) Now, reboot your computer into Windows 2K/XP, log in as Administrator (or equivalent) , and open the run dialog and type in "notepad c:\boot.ini". If this doesn't work then you'll have to change the attributes of the boot.ini file to make it visible (not hidden). You should get a file that looks something like this:
To the end of the file, add a line that says:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
"Linux" can be replaced with anything you like (Mine says c:\boot.lnx="Slackware Linux 8.1"). Save the file and exit notepad.
Now, go to the FAT32 partition that has the boot.lin file and copy it to C:\
That's it! Now reboot your computer and see the Win2K boot menu showing Linux as an option.
Note for people without a FAT32 partition:
Insert a DOS formatted floppy into your floppy drive and type in the following:
# mount /mnt/floppy
After you do this, just replace /dev/hda5/ with /mnt/floppy/ in all the commands.
If you have any questions, feel free to ask here or in PM.
March 10th, 2003, 03:07 PM
good post mate ... i will try it.. so much thanks.. i just install my linux on drive d ( d:/) and win200 in drive c ( c:/) .. if i can make it in one directory .. u are a great guy mate... thanks anway.
March 10th, 2003, 03:17 PM
This is a very good post...
Have you ever tried out any of the various emulators out there such as Virtual PC or VMWare? Just curiuos as the method you have posted will certainly appear overwhelming to beginners or even ametuers.
Keep up the good work!
Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden
March 10th, 2003, 03:25 PM
thehorse13, I only wrote this tut because I had some problems finding info on this subject when I needed to find it. GRUB/LILO don't work on my computer, so I need to do it this way. I hope this helps people in the same situation. Also, I really haven't played around with VMWare enough but I've found it to be much slower than an independant install whenever I have.
March 13th, 2003, 09:37 AM
Good Post cgkanchi,
been looking for this !
Well thehorse13, I have tried Virtual PC 4 on my Win 2000 system to run windows 98,
but I found it unstable.Kept freezing up the entire system.I have therefore given up and reverted back to multiboot.
March 29th, 2003, 08:17 AM
I'm presently struggling with a similar Windows/Linux problem. Perhaps someone could shed some light on my issue, I think it could be helpful for others also as it may eliminate several other people's complications when multi-booting OS's.
I have several versions of Windows installed on my comp using Ranish, all of my partitions are primary partitions if I understand it correctly.....none are extended. My first partition is 1G, I have all my Windows put the swap file there and it is recognized as the E: drive. Then I have a data partition at the end of the drive, recognized as D: and I keep all my installed program files there....Each OS is set to the 1st active partition when I choose a partition to boot from, and is thus seen as the C: drive. I basically use Ranish to do all my partitioning, and for selecting which OS to boot from and which partitions are set active in the MBR. This all works excellent for booting to all the MS operating systems, but I haven't figured out how to make it work for Linux yet. Originally I thought it would work the same way, but.....my comp spits back the frustrating 'No Operating System Installed' message. Presently if I want to boot to Linux, I must select the Linux partitions as active, save it in the MBR, and boot from floppy. Anyone know if this is simply an issue of selecting to install the loader on the first active partition when I install? I could've sworn I did select that option.....but maybe I was just drunk?
I enjoy the flexibility Ranish allows me, and would encourage anyone interested in playing with multi-booting/experimenting to play around with it....however make sure you have a backup of your MBR that you know how to restore if you decide to give it a shot. If you mess up your MBR, don't worry as long as you don't format anything, and all you have to do is restore your backup. Or if you mess it up and don't have a backup....once you are comfortable with Ranish, it's not too tough to re-create the MBR.
March 29th, 2003, 11:19 AM
Heh, brilliant information. Way to go.
Ubuntu-: Means in African : "Im too dumb to use Slackware"