LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 10-23-2003, 06:20 PM   #1
tilley
LQ Newbie
 
Registered: Aug 2003
Location: Sunnyvale
Distribution: redhat 9
Posts: 4

Rep: Reputation: 0
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
 
Old 10-23-2003, 06:52 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
Old 10-23-2003, 08:48 PM   #3
Raspis21
Member
 
Registered: Jun 2003
Posts: 33

Rep: Reputation: 15
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!
 
Old 10-23-2003, 11:11 PM   #4
DurantDL
Member
 
Registered: Oct 2003
Location: Virginia, USA
Posts: 31

Rep: Reputation: 15
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.
 
Old 10-24-2003, 12:12 AM   #5
tilley
LQ Newbie
 
Registered: Aug 2003
Location: Sunnyvale
Distribution: redhat 9
Posts: 4

Original Poster
Rep: Reputation: 0
> 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
 
Old 10-24-2003, 12:25 AM   #6
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
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.
 
Old 10-24-2003, 01:07 AM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
Old 10-24-2003, 01:30 AM   #8
tilley
LQ Newbie
 
Registered: Aug 2003
Location: Sunnyvale
Distribution: redhat 9
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 10-24-2003, 01:40 AM   #9
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
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.
 
Old 10-24-2003, 02:31 AM   #10
tilley
LQ Newbie
 
Registered: Aug 2003
Location: Sunnyvale
Distribution: redhat 9
Posts: 4

Original Poster
Rep: Reputation: 0
no, I thought I had lilo but it looks like I only had grub.
Susan
 
Old 10-24-2003, 04:13 PM   #11
DurantDL
Member
 
Registered: Oct 2003
Location: Virginia, USA
Posts: 31

Rep: Reputation: 15
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]
 
  


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
recovering from grub-install /dev/hda1 deleting windows XP boot loader Steve Mading Linux - Software 7 02-22-2010 07:53 PM
Changing Boot Loader from Lilo to Grub annointed3 Linux - General 7 09-30-2004 11:33 PM
Can't change boot loader from GRUB to LILO ikeTightPants Linux - Software 3 05-21-2004 09:30 AM
Switch Boot Loader from Grub to Lilo l2g Linux - Newbie 1 02-15-2004 09:34 AM
Lilo to Grub Boot loader Maurice Arthur Linux - Software 3 07-23-2001 09:07 AM


All times are GMT -5. The time now is 05:10 AM.

Main Menu
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