Computers.....and everything that makes them work.

Free help when they don't!


bratlady.com--Computers, Services, and Free Online Tech Support
Site Map




Webmail that you can access anytime, anyplace, with any computer--Sign up now!

Email Login
Password
New users
sign up!

Google

Search WWW
Search bratlady.com








Search:
for


How We Set Up Our System to Boot Red Hat Linux With Our NT/Windows 2000/XP OS Loader

  After installing Windows 2000 Professional, we realized that we were going to have to re-install Linux (Red Hat 6.2 in this case) and boot it in a different way than we had previously. We'd previously used LILO on the MBR, but Windows 2000 and NT 4 likes to "own" the MBR, even if the program files are installed on a different partition. The boot partition is FAT32, although FAT16 works as well. (I believe you must have a newer kernel, such as Red Hat 5.2 or newer, for Linux to correctly see FAT32 filesystems, but I'm just learning here, so do some research before attempting a change such as this!!!)

I don't claim to be an expert (not even close), and my only intention here is to share the method we used to make the different operating systems boot in a simple, straightforward manner.

WINDOWS 2000 INSTALL
We installed Windows 2000 first on a FAT32 filesystem so Linux would be able to access the files. I don't know if the newest kernels of Linux can access NTFS filesystems yet, and since we also have Windows 98 on the same system, we just stayed with FAT32.

To save a step later, we removed the -read-only and -system attributes of the boot.ini file (Don't forget to change it back after you're done). You can do this easily from within the Windows file manager with a right-click on the file name, then click "properties", and uncheck the box that says "read-only". If, by chance, you haven't yet changed the file manager's viewing properties from the default, you're not going to see the boot.ini file at all! But, rest assured, it's there (or Win2k wouldn't start). From the file manager, click "Tools", then "Folder Options", then "View". You will then need to mark the box that says "show hidden files and folders". If you prefer, you can do it from a dos prompt:
To remove -hidden and -read-only attributes:
C:\attrib -s -r c:\boot.ini

To put back -read-only and -hidden attributes:
C:\attrib +s +r c:\boot.ini
NOTE:At this point it's probably wise to make sure you have created up-to-date emergency repair disks for NT or Win2k.

LINUX INSTALL
We installed Linux in the usual way, and made a bootable floppy to start Linux (in case of emergency, and also because we haven't set up the NT Loader for booting Linux yet).

When we came to the LILO Section, we specified our Linux root partition as our boot device because the Master Boot Record (MBR) of our hard disk is owned by Windows 2000/NT. This means that the root entry and the boot entry in our /etc/lilo.conf have the same value. (If you have an IDE hard disk and your Linux partition is the second partition of your first drive, your boot entry in /etc/lilo.conf looks like:
boot=/dev/hda2

If you have two disks and your Linux resides on the first partition of your second disk, your boot entry in /etc/lilo.conf looks like: boot=/dev/hdb1

In our case, we have Linux on the third drive and the second partition, so it's boot=/dev/hdc2.

We then ran LILO to update it. You MUST do this every time you edit lilo.conf. We then checked the kernel by booting from the Linux boot diskette we created during the install.

LINUX BOOTSECTOR
Next we had to rip the bootsector from our Linux root partition. With /dev/hdc2 as our linux-partition, the dd command is:
dd if=/dev/hdc2 of=/bootsect.lnx bs=512 count=1

We mounted the Windows partition (hda1) and in our case, we used Midnight Commander as our editor. We then copied the file bootsect.lnx to our boot NT/Windows partition (the root of the c drive or hda1).

We then edited the file boot.ini (we have previously removed the -system and the read-only-attributes) with Midnight Commander as follows:
[Boot Loader] Timeout=10 Default=multi(0)disk(0)rdisk(2)partition(3)\WINNT [Operating Systems] multi(0)disk(0)rdisk(2)partition(3)\WINNT="Microsoft Windows 2000 Professional" /fastdetect C:\="Microsoft Windows 98" C:\bootsect.lnx="Linux"

This is what our boot.ini file is like---others will appear different, depending on your setup. We did not alter the Windows lines, we just added the last line for Linux.

NOTE:If you happen to install Windows 98 AFTER Windows 2000, it will make itself the default operating system from which to boot. This is easily changed to whichever one you prefer. There will be a backup file called "boot.bak" after a new install. You can compare the two--you'll see how the default operating system is shown.You can also use whatever label you want for the OS names that are in quotes.(ie:"Linux" or "Microsoft Windows 2000 Professional") and adjust the timeout value.
Don't forget to restore the file attributes for boot.ini back to read-only and hidden. [From dos: "C:\attrib +s +r c:\boot.ini"]
(read below about chmod and the file attributes)

After a restart, you should see the following or a similiar message:

OS Loader V5.00
Please select the operating system to start:
Microsoft Windows 2000 Professional
Microsoft Windows 98
Linux

Select Linux and if all is well you will see:
LILO
loading zImage ....
or whatever your usual kernel image is....

IMPORTANT!
A new copy of bootsect.lnx must be transfererd to C:\bootsect.lnx every time the bootsector of your Linux partition has been modified. This happens, for example when you install a new kernel with LILO.
We also had a problem with Windows 2000 somehow altering the Linux image file until we used chmod in Linux to make the file hidden and read-only....the dos attrib didn't seems to stop Windows from rendering it useless. It was okay until we ran Windows 2000, then the image file was corrupt and we had to redo it. But as long as the file was made read-only in the ext2 filesystem, it was safe from Windows tampering with it. If you have any ideas about this problem, let us know!

LINUX EMERGENCY COMMAND TO START YOUR SYSTEM
(in case things are seriously messed up--as a last resort, and will usually work)
Boot with your floppy install disk and type at the command line:

linux single user root=/dev/hdxx initrd=
(the xx being your Linux boot partition, as hda1, etc.)


Click here to learn about using one swapfile with multiboot Windows systems.



Questions, solutions, or answers?
Click below for our message board


Click below for help or just to chat!







Suggestions or info?
CLICK HERE to EMail Us


Copyright©2008 bratlady.com   All Rights Reserved
All tradmarks, logos, and copyrights are property of their respective owners.
Monitored by: InternetSeer - Web Site Monitoring