LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-09-2003, 05:25 PM   #1
Hawkster78
LQ Newbie
 
Registered: Jan 2003
Location: West Virginia
Distribution: RedHat 9.3, Mepis, SuSE
Posts: 12

Rep: Reputation: 0
Exclamation Steps to create Tri Booting for either NT bootloader or Grub


I have finally gotten all 3 OS's *winxp winme and rh 8.0* to install on the same hard drive. Now I need in full detail how to configure the bootloader on either the NT bootloader or GRUB LILO (Whatever you prefer). Tell me whatever you think is best and how to go about configuring each one. Thanks for any help given.
If you need more details dont hesitate to ask.

Specs:
80 gig WD Hard Drive
Primary Partition C: WinXP
Ext Partition D: WinME
2nd Ext partition given to RH 8.0





Quote:
In the words of Homer Simpson: Mmmmmmm............Foribidden Doughnut
 
Old 01-09-2003, 06:15 PM   #2
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Grub is easier in my opinion, and makes no distinction between the bootloader for the NTLDR for WinXP (which is the same for 2000 I believe).

There's a few ways you could do it. Make your partitions, install XP, then WinMe, then Linux on the remaining partition. You can skip the NTLDR boot.ini file (used for dual booting windows OSs) with grub or you can boot into them.

You may have to use the rescue utility in WinXP to overwrite the boot sectors before finally installing GRUB on the MBR, configured to run all three.

If you have Linux running now, install grub and output the files:

more /boot/grub/menu.lst

and

fdisk -l /dev/hda

(or sda if you're using scsi disks)

We'll walk you through it.

Bert
 
Old 01-09-2003, 08:12 PM   #3
Hawkster78
LQ Newbie
 
Registered: Jan 2003
Location: West Virginia
Distribution: RedHat 9.3, Mepis, SuSE
Posts: 12

Original Poster
Rep: Reputation: 0
Ok your gonna have to walk it through step by step. What you said is still vague to me. Im sorry I know im a dummy but I like to work with linux because this is what im gonna have to do for a living once I graduate this spring is work with all kinds of OS's. So if you please to the tiny detail explain the process step by step on how to do this.

Thank you
 
Old 01-09-2003, 11:58 PM   #4
deadbug
Member
 
Registered: Oct 2002
Location: San Antonio, Texas
Distribution: MDK 8.0, 9.0; RH 7.2, 8.0, 9.0, FC3, FC4, FC5
Posts: 355

Rep: Reputation: 30
XP doesn't seem to be as finicky as previous versions of NT which would check the MBR for NTLDR. If it didn't find it, it would assume a virus an not load.

If you use Grub (or LILO), make sure you label your NTFS partition that will have XP. Red Hat had licensing concerns about including NTFS support, so unless the partition is identified, it won't identify it as a bootable partition that needs to be included. To add the NTFS read-only capability, sourceforge has an RPM you can add (Red Hat will explain what RPMs are).

I would recommend using the NT loader and changing the order of install to Me, XP, then RH. Bert is willing to walk you through using Grub--the Red Hat Installation Guide has a nice section also on setting up Grub to dual boot (triple boot isn't much more difficult).

Here is where I walked someone else through using the NT boot loader:

http://www.linuxquestions.org/questi...743#post195743

There are two gotchas with this:

1. boot.ini is a hidden system file. Curious, isn't it that win.ini, sys.ini and sys32.ini aren't, but a simple boot file is. Anyway, to be able to edit it, you need to change its attributes this way:

attrib -r -a -s -h c:\boot.ini

After you've edited it and save it, you can reset the attribute by changing the '-' to '+' in the above command. But why? On mine, I just left it as a regular, every day text file.

2. What image to grab. In the example, Mandrake is being installed. For it, you grab ( dd if=/dev/hda? ...) the '/' partition. Red Hat will have you install a /boot partition before the '/' one. For Red Hat, you want to use /boot for your source. If you give each Windows system it's own partition, /boot will probably be hda3--you'll see it in the install window.

2 1/2. With the NT boot loader, you want to load Grub in the first Linux partition, not the MBR. Red Hat hides this a little. When you get to installing Grub, there will be an unchecked box at the bottom that you can check for Advanced Installation. Buried in the instructions on the left, the last paragraph will tell you to put a check in that to bring up a screen to allow you to put Grub somewhere other than the MBR.

Anyway, the neat thing is any one of these options (Grub, LILO or NTLDR) will work, but may need a little adjusting (that's what we're here for!)

Good luck.

Last edited by deadbug; 01-10-2003 at 12:00 AM.
 
Old 01-10-2003, 01:17 AM   #5
Hawkster78
LQ Newbie
 
Registered: Jan 2003
Location: West Virginia
Distribution: RedHat 9.3, Mepis, SuSE
Posts: 12

Original Poster
Rep: Reputation: 0
Great job deadbug that was the most detailed info I have ever seen ill let you know how it works out. Thanks again so much for answering my question. Though I forgot to mention im running ME and XP in FAT32.....I hope that isnt a prob but would the same tutorial you gave work?

Quote:
In the words of Homer Simpson: Mmmmmmmm...............Forbidden Doughnut

Last edited by Hawkster78; 01-10-2003 at 01:19 AM.
 
Old 01-10-2003, 05:26 AM   #6
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
No, no, FAT32 is preferable, because that's writeable from your Linux partition. NT read-only support is included in the kernel, but perhaps redhat's not allowed to autodetect it - I dunno.

The best thing is just install redhat now on your last partition, use the boot disk to get in and post the output of fdisk:

fdisk -l /dev/hda

Bert
 
Old 01-10-2003, 12:17 PM   #7
Hawkster78
LQ Newbie
 
Registered: Jan 2003
Location: West Virginia
Distribution: RedHat 9.3, Mepis, SuSE
Posts: 12

Original Poster
Rep: Reputation: 0
Now ive got another prob now when I followed all those steps and rebooted to the NTLDR it now has a Red Hat 8 option. I hit enter when I select it and this message keeps coming up.
Windows could not start because the following file is missing or corrupt:
<Windows root>\system32\hal.dll
Please re-install a copy of the above file

I can start up XP just fine as well as ME. I dont see what the hal.dll has to do with the running of red hat.

Here is the output of the fdisk command:

Disk /dev/hda: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 3188 25607578+ c Win95FAT LBA
/dev/hda2 3189 9729 52540582+ f Win95 Ext'd LBA
/dev/hda5 3189 6376 25607578+ b Win95FAT32
/dev/hda6 6377 9664 26410828+ 83 Linux
/dev/hda7 9665 9729 522081+ 82 Linux swap

Ill keep trying the ntbootloader but if that keeps messing up ill try win2k pro instead of xp. If by looking at this deadbug you said in that post that linux called your c drive in windows win_c what would I type to move the bootsect.lnx to the main windows drive? Im sorry I sound stupid but ive never messed with linux that much in class only Unix. Like I said ill keep trying and listening to you guys on both grub and ntldr. Thanks for both of your guys help.

Last edited by Hawkster78; 01-10-2003 at 12:38 PM.
 
Old 01-10-2003, 01:51 PM   #8
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Can I suggest you boot from the boot floppy into Linux now.

Install grub. Get the RPM from the redhat disk, or download the rpm.

Have a look at the file /boot/grub/menu.lst

Can you post the contents of that file after installing grub?

It's straightforward from here.

Bert
 
Old 01-10-2003, 02:22 PM   #9
deadbug
Member
 
Registered: Oct 2002
Location: San Antonio, Texas
Distribution: MDK 8.0, 9.0; RH 7.2, 8.0, 9.0, FC3, FC4, FC5
Posts: 355

Rep: Reputation: 30
Okay, you don't sound stupid--you are trying to learn something. There is a big difference.

It looks like you've successfully edited your boot.ini file but haven't yet figured out how to copy the boot sector image for Linux.

In my other post, I pointed out that if boot.ini is on a partition that Linux can write to, simply alter the output portion (of=...) so that the dd command writes directly there. Based on your fdisk, it would appear that your install didn't create a separate /boot partition.

Go figure--the one I did a couple of days ago insisted on that partition! Anyway, yours looks pretty straightforward. Use your boot disk to start Linux and log on as root. Open a terminal window (or just the Run Program from the start menu) and type this:

dd if=/dev/hda5 of=/dev/hda1/bootsect.lnx bs=512 count=1

You should get a reply that one file was read and one file was output. In either a file manager or in a terminal window, make sure the file is there.

File Manager: back out until you are at the system root -- '/' -- and the drill down through mnt and whatever your hda1 name is (in my example, this was win_c).

In a terminal window:

cd /mnt/win_c
ls bootsect.lnx

If your first partition is called something other than win_c, you will need to change the example.

Before you exit, please type this command:

df -h > /dev/hda1/list.txt

The comand df is Linux' disk free command, which, among other things, lists the name of each partition. The -h switch tells it to displaythe size in MB and GB format. The greater-than sign redirects the results to the file list.txt on your first partition.

If this doesn't fix your boot problem, in your next post, please include the contents of list.txt. In Windows it will be C:\list.txt and in Linux it will be /mnt/win_c/list.txt.

Good luck

Last edited by deadbug; 01-10-2003 at 02:26 PM.
 
Old 01-11-2003, 02:38 AM   #10
Hawkster78
LQ Newbie
 
Registered: Jan 2003
Location: West Virginia
Distribution: RedHat 9.3, Mepis, SuSE
Posts: 12

Original Poster
Rep: Reputation: 0
Ok I went through the mnt folder to find my hard drive for windows and wouldnt you know it there isnt a drive for windows there. I knew something like this would happen it always does for me. I kept trying to type in what you said deadbug but it keeps coming up dd: opening `/dev/hda1/bootsect.lnx' not a directory Can you tell me what I possibly could have done wrong? And Bert heres the Grub.conf file output

grub.conf generated by anaconda
Note that you do not have to rerun grub after making changes to this file
NOTICE: You do not have a /boot partition. This means that all kernal and initrd paths are relative to/, eg.
root (hd0,5)
kernal /boot/vmlinuz-version ro root=dev/hda6
initrd /boot/initrd-version.img
boot=/dev/hda6
default=0
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,5)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /boot/initrd-2.4.18-14.img
title DOS
rootnoverify (hd0,0)
chainloader +1

Im sorry to put you guys through such a hassel but once I get this figured out ill be sure to save this conversation all of us had to look back for future reference and be thankful that there are nice knowledgable ppl out there willing to help.
 
Old 01-11-2003, 06:27 AM   #11
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Don't worry about the hassle. We get a kick out of doing this.

To mount your Windows partitions, try this, as root:

mkdir /mnt/DOS1 &&
mount -t vfat /dev/hda1 /mnt/DOS1 &&
mkdir /mnt/DOS2 &&
mount -t vfat /dev/hda5 /mnt/DOS2

Next, the grub file. Now I'm not actually talking about a grub.conf file, but the menu.lst file usually found in /boot/grub/menu.lst, which I think should look like this:

############################## menu.lst file

root (hd0,5)
kernel /boot/vmlinuz-version ro root=dev/hda6
initrd /boot/initrd-version.img
boot=/dev/hda6
default=0
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz

title Red Hat Linux (2.4.18-14)
root (hd0,5)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /boot/initrd-2.4.18-14.img

title DOS 1
rootnoverify (hd0,0)
chainloader +1

title DOS 2
rootnoverifty (hd0,2)
chainloader +1

#################### menu.lst file ends

Before we try installing it on the hard drive though install it on a floppy (we're playing it safe). Make sure you've got a formatted floppy in the drive (no need to mount it) and as root:

grub-install /dev/fd0

there's a few messages and there should be something to say it went OK. Next, boot up from the floppy, and try booting each one.

Bert
 
Old 01-11-2003, 08:27 AM   #12
deadbug
Member
 
Registered: Oct 2002
Location: San Antonio, Texas
Distribution: MDK 8.0, 9.0; RH 7.2, 8.0, 9.0, FC3, FC4, FC5
Posts: 355

Rep: Reputation: 30
Hawk--As Bert pointed out, you simply need to mount. Like him, I was assuming that Red Hat 8.0 would already--so much for assumptions! His instructions will get it loaded for you. I think you will need to be logged on as root to modify grub.conf

This whole thread started with you just wanting to get a bootloader working. Between Bert and me, we were walking you through two of the three popular options (interestingly, no one jumped inwiththe most popular solution--LILO!).

Anyway, that path would have had you picking a solution based on anything but actually using both. In reading Bert's last post, it appears that you are a few steps from being able to have both working and see what you think of both.

With Bert's modifications (labels of your Windows drives) and my guess about what your Linux drive would be is off by one, the correct dd command for your configuration is:

dd if=/dev/hda6 of=/dev/hda1/bootsect.lnx bs=512 count=1

Then modify boot.ini and you can try out both. Boot from the floppy to see how Grub looks and feels. Boot from the hard drive to get a feel for NT's loader. When you decide which one you want, just remove the other. If you pick NT, pull out the floppy. If you choose Grub, in Linux modify Bert's install command to this:

grub-install /dev/hda

In your playing with these, make sure you boot all three operating systems from both loaders--make sure they all work.

Again, as both Bert and I have tried to convey, we get a kick out of doing this!

Have a good weekend.
 
Old 01-11-2003, 10:22 AM   #13
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Yeah, that's right, try both. See which you like.

Personally, I steer clear from the NTLDR, just because I prefer using an open source loader - it just feels more trustworthy.
But whatever works - there's historical reasons why I don't use LILO myself - there was a time when it wouldn't work for large drives. There's the problem of forgetting to rerun LILO before rebooting too. Grub also boots many different OSs, whereas LILO only does Linux and DOS (although I'm not 100% on that). GRUB has the advantage that you can interactively search through filesystems for the bootable image:

grub> kernel (hd0,<*press tab*>

and a list of partitions comes up, just like searching through a filesystem. Very handy indeed.

Bert
 
Old 01-12-2003, 03:46 AM   #14
Hawkster78
LQ Newbie
 
Registered: Jan 2003
Location: West Virginia
Distribution: RedHat 9.3, Mepis, SuSE
Posts: 12

Original Poster
Rep: Reputation: 0
Ok im done it finally worked. Im using the NT bootloader and just turned the countdown to the GRUB choices down to instant autoboot to linux. I couldnt get to the menu.lst file....it just pointed back to the grub.conf file. But I will save this info and mess with the GRUB option later. I thank you two for teaching me how to overcome this headache and if for some reason you have a problem that I may know a solution to ill be there to give you any advice needed. Again thanks for everything and if theres anything else you wanna say go right ahead.

Hawkster
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB Bootloader not booting WinXP Pro SP1 FeralTitan Linux - Newbie 12 08-16-2004 01:09 PM
how to hide GRUB bootloader while booting a duel boot system ( linux/windows ) ? dommini Linux - General 0 12-03-2003 04:48 AM
help booting windows on Suse 8.2 Grub bootloader intenseprod Linux - Newbie 1 07-27-2003 11:35 PM
Help Tri-Booting derek_tracy Linux - General 2 03-07-2003 09:29 AM
Already TRI booting ME, 2k, XP, about to add RH 7.3 PLEASE HELP!!! Ůmegaflops Linux - Newbie 11 05-25-2002 05:13 AM


All times are GMT -5. The time now is 02:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration