LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 09-10-2005, 04:08 PM   #1
dhawal
LQ Newbie
 
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11

Rep: Reputation: 0
boot linux from ntldr


recently i installed RHEL 4 WS. before this i had windows 98 and windows 2000. while installing linux there are two option - either install the loader on the MBR or on the 1st sector of the boot partition. so i installed the grub loader on the boot partition. i have two hard drives - on the 1st is win98 and win2k and on the 2nd i installed RHEL.....it proceeded with no problems and after installation completed it had to reboot. but i had only two options on my ntldr - win 98 and w2k coz i still hadnt added linux's entry in the boot.ini file. so i started linux in rescue mode and typed
Code:
dd if=/dev/hdd6 of=/mnt/cdrive/linux.bin bs=512 count=1
i read this on the web that this will solve the purpose. here hdd6 is where i have my boot (/boot) partition and /mnt/cdrive is the directory where i mounted my c drive which is FAT32; all other drives are NTFS. so after executing this command it made a linux.bin file in my c drive and i added its entry in the boot.ini file. now when i restart my machine and select the linux option it shows GRUB and freezes, it doesn't proceed further. also i don't want grub to be on the MBR, i just want ntldr to boot linux.
 
Old 09-10-2005, 04:40 PM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Grub isn't in you MBR so don't condemn it.

Your Red Hat isn't bootable on its own and Grub failed. Your box can boot your Windows normally as long as you don't choose Linux.

Here is the fix

Boot up your Red Hat installation CD and go into rescue mode. Mount hda6 on the /mnt directory, chang root from installation CD to your failed Red Hat and restore Grub again in hda6 root patition. See if that helps

Instructions after booting to rescue mode are


mkdir /mnt/hda6
mount /dev/hda /mnt/hda6
chroot /mnt/hda6
grub-install /dev/hda6

You should try to make a bootable floppy for the Red Hat by adding to the above

grub-install /dev/fd0

A bootable floppy can confirm if your Linux working or not.
 
Old 09-11-2005, 01:28 AM   #3
bongski55
Member
 
Registered: May 2003
Location: Somewhere in Asia
Distribution: ubuntu on Dell, Vista,XP triple boot
Posts: 276
Blog Entries: 1

Rep: Reputation: 30
I also use your method to dual boot.
Are you sure your RH installation is booting?Make sure your linux installation boots ok before creating the 'linux.bin' file. It saves a lot of trouble.
 
Old 09-11-2005, 07:55 AM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
That is why using NTLDR is a waste of time because Grub can boot 10 times more systems with only 1/10 of the effort.
 
Old 09-25-2005, 07:33 AM   #5
dhawal
LQ Newbie
 
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11

Original Poster
Rep: Reputation: 0
To load/boot Red Hat Enterprise Linux 4 WS from Microsoft's Boot Loader (NTLDR)

Problem: To load/boot Red Hat Enterprise Linux 4 WS from Microsoft's Boot Loader (NTLDR)

I have Windows 98 and Windows 2000 installed on my computer which I've been using for many years now and lately I was curious about linux. I read about RHEL and thought to give it a try. So I downloaded it and installed it on my PC. And since I wanted to load linux from my Windows boot loader, I installed GRUB on the first sector of the boot partition in linux. I had earlier posted a thread regarding this, but its solution didn't work. The scenario is as follows:
I have two hard disks - 1st as Primary Master where I've installed Windows 98 and Windows 2000 with NTFS partition, 2nd as Secondary Slave which I had kept for collecting data, songs and movies. So I decided to install RHEL 4 WS on this hard disk. I read the installation guide before actually installing and then proceeded as mentioned. Since I wanted Linux to boot from NTLDR, I selected the option to install GRUB on the first sector of the boot partition. The partitions that I made in linux are (1) / (root partition), (2) /boot (boot partition), and swap partition. The root partition (/) is on hdd8, the boot partition (/boot) is on hdd6 and Windows 98 is on hda.
Now, after installation I restarted Linux in the rescue mode and tried to find the grub.conf file as it was mentioned in many of the web pages online if you want to dual boot Windows and Linux. The problem is, I cannot find any grub.conf file. I tried the grub-install command, but that too doesn't work. Also tried the dd command
dd if=/dev/hdd6 of=/mnt/cdrive/linux.bin bs=512 count=1
but this too didn't work; after adding its entry in the boot.ini file and after restarting and selecting the Linux option, it freezes after showing GRUB. I'm not able to start linux at all. Is there any solution for this or do I have to install the grub loader on the MBR itself??
 
Old 09-25-2005, 07:37 AM   #6
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
You need to mount the hda6 and chroot, for example when you boot into redhat rescue mode, issue command

Code:
mkdir /chroot
mount /dev/hda6 /chroot
chroot /chroot
grub-install /dev/hdX
replace X with your choice.
 
Old 09-25-2005, 07:47 AM   #7
dhawal
LQ Newbie
 
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11

Original Poster
Rep: Reputation: 0
i tried this also, but it doesn't work. wht does the command do? it will install grub to the hdX right? while executing this command it doesn't show any erroe, but after the restart it doesn't work. and i don't want to put RHEL's entry on the MBR and thats the reason I installed grub on the first sector of the boot partition (hdd6)
 
Old 09-25-2005, 07:55 AM   #8
dhawal
LQ Newbie
 
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by bongski55
I also use your method to dual boot.
Are you sure your RH installation is booting?Make sure your linux installation boots ok before creating the 'linux.bin' file. It saves a lot of trouble.


How do I check whether the RH installation is working or not? I can boot from the 1st CD in to the rescue mode and execute most of the commands.
 
Old 09-25-2005, 10:23 AM   #9
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
I don't have RHEL 4, but will assume it works similar to all the other versions of Red Hat when it comes to rescue mode. To see if Linux works as installed you will need to create a boot disk. Here are the steps.

1) Boot from an install disk and type linux rescue at the boot prompt. This should locate your LInux installation and bring you to a command prompt.
2) At the command prompt type chroot /mnt/sysimage. /mnt/sysimage should be the / of your original installation.
3) Insert a diskette that will be used as your new boot diskette.
4) Locate the version number of your kernel using ls /boot/vmlinuz*. It is most likely 2.6.something.
5) Create bootdisk by typing mkbootdisk --device /dev/fd0 2.6.something

You should now be able to boot into RHEL 4 using the diskette you created. This does not require GRUB to be installed or installed and working. The boot disk essentially becomes you boot loader.

saikee gives a good suggestion about reinstalling GRUB. I question your dd command. Was /dev/hdd6 a typo or do you really have four harddrives? I would be interested in seeing what your GRUB configuration file looks like. Since GRUB is coming up, perhaps the source of the problem lies there.

Bill

Last edited by wmakowski; 09-25-2005 at 11:23 AM.
 
Old 09-25-2005, 02:09 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Your to threads have been merged since the second one was
a continuation of the first.
 
Old 09-27-2005, 06:20 AM   #11
ltamit12
LQ Newbie
 
Registered: Sep 2005
Posts: 1

Rep: Reputation: 0
dual boot

I am also facing the same problem. ie. I have two hard disks of 80 gb and 40 gb. 80 gb is my primary hard disk and 40 gb is my secondary hard disk. Now I have loaded win xp in 80 gb and rh 7.3 on 40 gb. I can boot with both however I have to make change in bios setup to boot from ide0 or ide1 everytime. I am not getting both operating systems option at the grub, I tried to configure grub.conf file as
title win xp
rootnoverify (hd1,0)
imakeactive
chainloader +1
nothing happened besides getting win xp as another option in grub boot loader. But when I choose win xp to boot it says,

booting win xp
rootnoverify (hd1,0)
chainloader +1
and nothing happens thereafter. What could be the problem and what is exact way to boot from both OS loaded in two separate hard disk???
 
Old 09-27-2005, 09:17 AM   #12
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
My initial thought is that you are not pointing to the correct harddrive to boot WinXP. It should be (hd0,0) instead of (hd1,0).

Bill
 
Old 09-27-2005, 09:18 AM   #13
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
My initial thought is that you are not pointing to the correct harddrive to boot WinXP. It should be (hd0,0) instead of (hd1,0) in the rootnoverify statement. If the entry for Linux is hd1 that is definitely the problem.

Bill

Woops, must of hit post reply instead of edit. Sorry about the extra post...

Last edited by wmakowski; 09-27-2005 at 09:23 AM.
 
Old 10-14-2005, 10:23 AM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Yep

Grub counts from zero!
 
Old 10-20-2005, 04:53 PM   #15
dhawal
LQ Newbie
 
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by wmakowski
I don't have RHEL 4, but will assume it works similar to all the other versions of Red Hat when it comes to rescue mode. To see if Linux works as installed you will need to create a boot disk. Here are the steps.

1) Boot from an install disk and type linux rescue at the boot prompt. This should locate your LInux installation and bring you to a command prompt.
2) At the command prompt type chroot /mnt/sysimage. /mnt/sysimage should be the / of your original installation.
3) Insert a diskette that will be used as your new boot diskette.
4) Locate the version number of your kernel using ls /boot/vmlinuz*. It is most likely 2.6.something.
5) Create bootdisk by typing mkbootdisk --device /dev/fd0 2.6.something

You should now be able to boot into RHEL 4 using the diskette you created. This does not require GRUB to be installed or installed and working. The boot disk essentially becomes you boot loader.

saikee gives a good suggestion about reinstalling GRUB. I question your dd command. Was /dev/hdd6 a typo or do you really have four harddrives? I would be interested in seeing what your GRUB configuration file looks like. Since GRUB is coming up, perhaps the source of the problem lies there.

Bill
i don't have four drives, only two. but the hdd in which i installed RHEL is Secondary Slave and so hdd. Also, to my astonishment, I don't have a grub.conf or menu.lst anywhere (neither in /boot/grub nor in /etc)
 
  


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
To load/boot Red Hat Enterprise Linux 4 WS from Microsoft's Boot Loader (NTLDR) dhawal Red Hat 1 09-25-2005 08:08 AM
To load/boot Red Hat Enterprise Linux 4 WS from Microsoft's Boot Loader (NTLDR) dhawal Linux - General 1 09-25-2005 08:07 AM
entry of red hat boot loader in mandrake b0nd Linux - Newbie 3 02-01-2005 07:06 AM
ntldr missing on red hat boot johno77 Red Hat 2 05-27-2004 06:31 AM
NT Boot Loader/Red hat 7.1 ascii2k Linux - Software 7 07-05-2001 09:34 AM


All times are GMT -5. The time now is 02:32 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