What's New!

Chat with
Hackers

How to Defend
Your Computer 

The Guides
to (mostly) 
Harmless Hacking

Happy Hacker 
Digests (old stuff) 

Hacker Links 

Hacker
Wargames 

Meet the 
Happy Hacksters 

Help for 
Beginners 

Hacker 
Bookstore 

Humor 

It Sucks 
to Be Me!

How to Commit
Computer Crime (not)! 

What Is a 
Hacker, Anyhow? 

Have a 
Great Life! 

News from the 
Hacker War Front

 

How to Run Linux and Windows on the Same Computer

by Tanvir

Dual booting Linux and Windows is always a painstaking task for most people especially if you have Win2000 (NTFS) and using LILO in Linux. In this paper I will discuss how to dual boot Red Hat Linux (RHL) with Windows2000 (NT5).

(Carolyn's note: This also works for Windows XP using the NTFS file system. If you are running Windows 95/98/ME, click here for help.)

I assume you have a Windows 2000 Professional in full NTFS mode, Red Hat Linux 7.0 with Kernel 2.2 both in one HDD. Well, it's true there are some tools available out there that will do the job for you but we are hackers and we love doing things with whatever minimum we have available at hand.

In scenario 1 let's assume you already have Linux and Windows installed and you use a boot disk to start-up Linux. To get rid of the floppy you have to do the following:

Boot to your Linux partition and cat /etc/lilo.conf. At the beginning (global section) of the lilo.conf file you'll see something like boot=/dev/hda8. Take a note of this line.

Now, you have to copy the boot sector file. For this as root do the following:

dd if=/dev/hda8 bs=512 count=1 of=mylinux.lnx

Here, I assume that your linux partition is in /dev/hda8. After executing this command you'll see something like this:

1+0 records in
1+0 records out

Now, a file named mylinux.lnx has been created in your home directory. To make sure, type 'ls'. And you will see the file. Now, you need a FAT formatted floppy disk to copy this file. Put the floppy in and type this command:

mcopy mylinux.lnx a:

This will copy the file in the floppy. In case, if you don't have the command mcopy, you have to install an rpm named mtools. Easy!! Just go to your Linux CD (/mnt/cdrom/RedHat/RPMS) and find out the file mtools-some_version.rpm and install it.

Ok now as you have mcopy the mylinux.lnx file in the floppy, remove the floppy and restart to Windows2000. Now, in Windows C: drive you have to do 2 things. First, copy the file (mylinux.lnx) from the floppy to C drive. And then edit your boot.ini file (which is located in your C drive). If unfortunately you can't see boot.ini then check the hidden files and folder in Windows >> View options. After copying the file, notepad to your boot.ini file and add the following lines at the end of the section

c:\ mylinux.lnx ="Linux"

Save it and restart again. Now, you'll see two options to boot from.

If unfortunately you see that the process is not working you have to do some troubleshooting. Please note that whatever troubleshooting you do, after that you have to go through the whole process again.

Ok. if the process doesn't work at first place go to your Linux box and type LILO. This will update LILO. But if you see something unusual like "can't write to LILO because the cylinder of the partition is 1024" then Vi to /etc/lilo.conf and you'll see a line named Linear. Replace Linear with lba32 quit and update LILO. This will solve the problem.

Also sometimes adding the following lines to lilo might help:

other=/dev/hda1
label=windows2000

You can also install W2k first in FAT32 mode. Install Linux with LILO on MBR and put the upper line on the /etc/lilo.conf file. This will do the job fine for you. Now, you can freely convert your W2k partition in NTFS mode keeping the current installation intact. To convert to NTFS type the following at your DOS prompt:

Convert C: /FS:NTFS (Change the drive letter as you deem fit)

In this paper I have described ways to make it possible to make NTFS and Ext2 to live together. I hope this was of help to you.


Carolyn's most
popular book,
in 4th edition now!
For advanced
hacker studies,
read Carolyn's
Google Groups
Subscribe to Happy Hacker
Email:
Visit this group

Return to the index of Guides to (mostly) Harmless Hacking!

© 2002 Happy Hacker All rights reserved.