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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
09-10-2005, 03:08 PM
|
#1
|
LQ Newbie
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11
Rep:
|
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.
|
|
|
09-10-2005, 03:40 PM
|
#2
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
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.
|
|
|
09-11-2005, 12:28 AM
|
#3
|
Member
Registered: May 2003
Location: Somewhere in Asia
Distribution: ubuntu on Dell, Vista,XP triple boot
Posts: 276
Rep:
|
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.
|
|
|
09-11-2005, 06:55 AM
|
#4
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
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.
|
|
|
09-25-2005, 06:33 AM
|
#5
|
LQ Newbie
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11
Original Poster
Rep:
|
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??
|
|
|
09-25-2005, 06:37 AM
|
#6
|
Member
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379
Rep:
|
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.
|
|
|
09-25-2005, 06:47 AM
|
#7
|
LQ Newbie
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11
Original Poster
Rep:
|
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)
|
|
|
09-25-2005, 06:55 AM
|
#8
|
LQ Newbie
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11
Original Poster
Rep:
|
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.
|
|
|
09-25-2005, 09:23 AM
|
#9
|
Member
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560
Rep:
|
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 10:23 AM.
|
|
|
09-25-2005, 01:09 PM
|
#10
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Your to threads have been merged since the second one was
a continuation of the first.
|
|
|
09-27-2005, 05:20 AM
|
#11
|
LQ Newbie
Registered: Sep 2005
Posts: 1
Rep:
|
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???
|
|
|
09-27-2005, 08:17 AM
|
#12
|
Member
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560
Rep:
|
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
|
|
|
09-27-2005, 08:18 AM
|
#13
|
Member
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560
Rep:
|
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 08:23 AM.
|
|
|
10-14-2005, 09:23 AM
|
#14
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
Yep
Grub counts from zero!
|
|
|
10-20-2005, 03:53 PM
|
#15
|
LQ Newbie
Registered: Feb 2005
Distribution: Redhat Enterprise Linux 4 WS, Ubuntu 5.10
Posts: 11
Original Poster
Rep:
|
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)
|
|
|
All times are GMT -5. The time now is 12:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|