Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
|
10-23-2003, 06:20 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Location: Sunnyvale
Distribution: redhat 9
Posts: 4
Rep:
|
trouble install boot loader grub or lilo
My LILO duel boot loaded stopped working.
Background:
I had it set up dual boot with Windows (dos). It stopped working well. I got the Windows booting again. (fdisk /mbr)
I have Windows on one HD and Linux on another (with a key to turn on and off), so I decided to not have dual boot but just use key to boot Linux.
However, since I rewrote the Windows MBR I now have no Linux boot loader.
I tried booting linux rescue, install-grub , chroot /mnt/systemini, /dev/hdc2 (which is where linux is) and it said it installed with no errors. But it doesn't boot.
I tiried bootng from CD and doing upgrade to install a boot loader - it goes through the motions and says nothing was changed or installed and, of course, won't boot.
I Can boot from floppy but would like my machine to be able to pull its own boots up so to speak.
Any suggestions?
Thanks
Tilley
|
|
|
10-23-2003, 06:52 PM
|
#2
|
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113
Rep:
|
Should be able to just run '/sbin/lilo' again to reinstall it to the mbr, which is what happened - running fdisk /mbr deleted it. I'm not sure though - I don't know anything about any keys. I have a tri-boot on two drives and I just run lilo.
Might give more details about what's where and whether LILO was on the mbr in the first place (sounds like it must have been) and so on. Some people use ntldr, some grub, some lilo, some to the mbr, some to the superblock, etc, etc.
|
|
|
10-23-2003, 08:48 PM
|
#3
|
Member
Registered: Jun 2003
Posts: 33
Rep:
|
Hi Susan,
You have probably correctly installed lilo on the second hard drive, but you havent set the partition active. You said you used fdisk to fix the mbr of the first drive, and you have a key to turn off the first drive and turn the second drive on. Well, turn on the linux drive and then run the fdisk from a floppy. Make the partition with LILO installed on it active and BINGO, you should be up and booting
Enjoy!
|
|
|
10-23-2003, 11:11 PM
|
#4
|
Member
Registered: Oct 2003
Location: Virginia, USA
Posts: 31
Rep:
|
Normally the BIOS boots the active partition from /dev/hda.
Configure "lilo.conf" for dual boot, and put "lilo" in the MBR (hda).
Now you can dual boot either the Windows or the Linux partition.
Note that your key either hides drive C: or swaps drive letters.
Maybe your bootstrap got confused when hda/hdc switched identities.
|
|
|
10-24-2003, 12:12 AM
|
#5
|
LQ Newbie
Registered: Aug 2003
Location: Sunnyvale
Distribution: redhat 9
Posts: 4
Original Poster
Rep:
|
> run the fdisk from a floppy. Make the partition with LILO installed on it active
Not sure I understand this. Isn't fdisk for Windows?
Are you saying I should use my windows boot disk (which has fdisk on it ) to make the partition with LILO installed on it active. What command do I use for that?
> that your key either hides drive C
this is what my key does - hides it.
What I want to do now is when I turn the key on Linux drive off (hide it) it will boot to Windows (which it already does) and when I turn key on (show Linux drive) it will boot to Linux. So rather than dual boot, each drive has it's own boot record and which one boots depends on whether Linux is hidden or not. Make sense?
This is instead of reinstalling the Lilo dual boot which is what got corrupted (and I have heard anecdotes that it can be problematic). It was pretty strange actually. I would boot to Windows and it would be sitting there and - much to my astonishment - reboot itself and then crash.
I'd get rid of Windows altogether, but I need it for work - sigh.
Thanks for your help
Susan
|
|
|
10-24-2003, 12:25 AM
|
#6
|
LQ Addict
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661
Rep:
|
you'd have to install lilo to the mbr of your linux disk (and not the partition where linux sits). Assuming that the device name of the drive under linux is /dev/hdb, you need the line
boot=/dev/hdb
and the right entries for your root partition, etc. I think this'll do it.
|
|
|
10-24-2003, 01:07 AM
|
#7
|
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113
Rep:
|
quatsch has you covered, but just to note: Linux and MS both have their own programs called fdisk. Linux also has cfdisk and sfdisk and probably more stuff. It's generally a good idea to use an MS fdisk on an MS partition and a Linux on a Linux, though I have been sloppy before without any disasters because of it, so it may just be anecdotal 'wisdom' handed down through the generations. Still, they use different methods, so it makes sense.
|
|
|
10-24-2003, 01:30 AM
|
#8
|
LQ Newbie
Registered: Aug 2003
Location: Sunnyvale
Distribution: redhat 9
Posts: 4
Original Poster
Rep:
|
ok. I've been looking around
I remembered that somewhere I read about fdik -l to get list of drives so here is what I have
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 3193 25543350 83 Linux
/dev/hdc3 3194 3323 1044225 82 Linux swap
And I looked at a file called grub.conf which says
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdc2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd1,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1
I note that the line #boot=/dev/hda is commented out.
Also, hda is Windows and I don't want it to boot from there but in the boot partition which is (from above) is /dev/hdc1.
So if I uncomment line #boot=/dev/hda and change hda to hdc1, will that fix it?
Sorry I sound so newbieish and confused, but that's because I am.
Thanks
Susan
|
|
|
10-24-2003, 01:40 AM
|
#9
|
LQ Addict
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661
Rep:
|
Do you have a file called /etc/lilo.conf? Just asking b/c I'm not comfortable with grub... though I'm sure somebody else is.
|
|
|
10-24-2003, 02:31 AM
|
#10
|
LQ Newbie
Registered: Aug 2003
Location: Sunnyvale
Distribution: redhat 9
Posts: 4
Original Poster
Rep:
|
no, I thought I had lilo but it looks like I only had grub.
Susan
|
|
|
10-24-2003, 04:13 PM
|
#11
|
Member
Registered: Oct 2003
Location: Virginia, USA
Posts: 31
Rep:
|
Changing hda to hdc1 will not do it.
Most likely you just want "boot=/dev/hdc"
My guesses about your linux drive:
hdc1 is /boot, aka grub (hd2,1);
hdc2 is /, aka grub (hd2,2); and
hdc3 is swap space, for virtual memory.
DOS boots from grub (hd0,0), or hdc.
Linux is trying to boot from (hd1,0), or hdb.
Try changing "root=(hd2,2)" instead?
More later, gotta run.
Tell us how it goes.
Quote:
Originally posted by tilley
[snip]
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 3193 25543350 83 Linux
/dev/hdc3 3194 3323 1044225 82 Linux swap
And I looked at a file called grub.conf which says
# grub.conf generated by anaconda
[snip]
#boot=/dev/hda
[snip]
title Red Hat Linux (2.4.20-8)
root (hd1,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1
[snip]
Thanks
Susan [/B]
|
|
|
|
All times are GMT -5. The time now is 07:32 AM.
|
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
|
|