LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-18-2004, 06:53 PM   #1
mattp
Member
 
Registered: Mar 2004
Location: Chicago, USA
Distribution: Slackware 10.2
Posts: 368

Rep: Reputation: 30
Lilo Problem


On my system, I have:
/dev/hdg1 as /boot
/dev/hdg2 as /
/dev/hde1 as /mnt/hd2
/dev/hdf1 as SWAP

When I boot, when the OS *should* load, I get nothing. I put in the boot disk, mount my root at the boot: prompt (mount root=/dev/hdg2) and log in as root. I checked lilo.conf and fstab, they looked okay (I guess). I ran "lilo" and it gives me this:

Warning: /dev/hdg is not on the first disk
Added Linux*

Any Ideas?
 
Old 03-18-2004, 07:21 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I guess lilo should be installed in the MBR
of the actual boot disk?


Cheers,
Tink
 
Old 03-18-2004, 07:22 PM   #3
mattp
Member
 
Registered: Mar 2004
Location: Chicago, USA
Distribution: Slackware 10.2
Posts: 368

Original Poster
Rep: Reputation: 30
Forgive my ignorance, but I have no idea what you just asked. ( :
 
Old 03-18-2004, 07:26 PM   #4
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Re: Lilo Problem

Quote:
/dev/hdg1 as /boot
/dev/hdg2 as /
/dev/hde1 as /mnt/hd2
/dev/hdf1 as SWAP
Whew! I thought I threw a lot of disks into my systems but that's on the systems that are all SCSI. That's a lot of IDE isn't it?
Quote:
Warning: /dev/hdg is not on the first disk
Added Linux+ACo-
Is there an /dev/hda through /dev/hdd? Or does Slackware use a weird disk naming convention. I'm wondering if this isn't a BIOS settable thing. I'd expect the system to try and boot in the order floppy, CD (maybe), then the first hard disk (/dev/hda).

Q: Can you post your lilo.conf?
 
Old 03-18-2004, 07:29 PM   #5
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
perhaps you could restart the install... choose repair... / or just start the lilo install and choose to install it to the "mbr" or "master boot record" instead of the first xxx of the linux drive...
 
Old 03-18-2004, 07:31 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
"Warning: /dev/hdg is not on the first disk
Added Linux*"

lilo put the bootloader on /dev/hdg like you told it to do but it warned you that this is the wrong disk because that is not the disk that the BIOS boots from.

Since you have a secondary PCI IDE controller card then coming to an agreement with the BIOS as to which disk that you are booting can be tricky. Look in your motherboard BIOS to see whether it is booting from the motherboard IDE controller (IDE0 and IDE1) or from the secondary controller (IDE2 and IDE3). If it is booting from IDE2 then it is booting from /dev/hde. If it is booting from IDE0 then it is booting from a disk that you have not listed here, probably /dev/hda.


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-18-2004, 07:47 PM   #7
mattp
Member
 
Registered: Mar 2004
Location: Chicago, USA
Distribution: Slackware 10.2
Posts: 368

Original Poster
Rep: Reputation: 30
Linux called my Cd Drive /dev/hda (for some reason). I only have 3 hds as listed above. I am going to try your guys' suggestions and then post my lilo.conf as a last resort. Thanks
 
Old 03-18-2004, 08:31 PM   #8
ftetia
LQ Newbie
 
Registered: Mar 2004
Location: Paris
Distribution: Redhat 9
Posts: 17

Rep: Reputation: 0
Lightbulb Lilo info

Hi,

I don't know if it's always of topicality but lilo can boot after 1024 cylinders.
So lilo must be installed on the first HD (hda or hdc) and before 1024 cylinders.

Someone can confirm ??
Bye
 
Old 03-18-2004, 09:23 PM   #9
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
I think this could be fixed (though nasty)...

Quote:
Linux called my Cd Drive /dev/hda (for some reason). I only have 3 hds as listed above. I am going to try your guys' suggestions and then post my lilo.conf as a last resort. Thanks
That's a wild configuration. You could do some moving of cables in the system to correct that CD-ROM showing up as /dev/hda. But if you do that and are able to get hde, hdf, and hdg mapped as hda, hdb, and hdc, you'll have to boot off the CD-ROM or boot floppy in repair mode to correct the contents of /etc/fstab, lilo.conf, and perhaps other files. I have a feeling this could get messy.

Please don't tell us that Windows is on your /dev/hde. If so, don't bother reading any further. (I'm almost positive that Windows would not appreciate this procedure being done.)

OK, you can call me masochistic if you like, but if this were my system I'd want to get it set up in a more standard configuration. Plus, I'd prefer to not rerun the installation if I could avoid it. So... I'd identify each of the disks ahead of time so that I'd know which disk contains what filesystems and then shoot for setting the disks up like:

/dev/hdg --> /dev/hda (master, ide0 -- has / and /boot)
/dev/hdf --> /dev/hdb (slave, ide0 -- has the swap partition)
/dev/hde --> /dev/hdc (master, ide1 -- mounted on /mnt/hd2)
cd-rom (slave, ide1)

The one's that's the most important to get fixed is the drive where / and /boot reside. the others probably wouldn't matter but the above would be a lot more typical and save a lot of future confusion.

Since I supposedly know what partitions exist on what disk, it would be a simple (heh, heh) matter to pull all the drives, reattach them one at a time (setting the jumper from slave to master if necessary), boot from the CD and run "fdisk -l /dev/hdX" (X = a, b, c, ...) until I don't get a "no such device" error (or one could watch the boot process from the CD and see what IDE device had been detected), look at the displayed partition table and, say "Aha, I'll want this one to be /dev/hda!", and slap a label on it. Once I'd gotten all the disks identified and reconnected to correct cables and the jumpers setup properly, boot off the CD again, mount /dev/hda2 (where "/" is on the system) on, say "/mnt". Then cd to /mnt/etc, make a backup copy of fstab (in case of an editing snafu), and then fire up my favorite editor to fix the device names in fstab. A similar process would be necessary for lilo.conf. Then, booting from the CD once more, mount the /dev/hda2 as the root and run lilo to write the bootstrap record. And by now, your head hurts, right? Well I did say it could get messy.

Sounds like a good way to spend a Saturday afternoon. FWIW, I recently had to do something not much different than the above process following losing two SCSI disks -- including a spectacular head crash on /dev/sda -- on a system during a storm.

If you don't want to tackle anything like what I'd try (this is the newbie forum after all), and this is a new installation that you don't mind re-installing over, you could just rearrange the disks until you find you have /dev/hda through /dev/hdc and rerun the installer.
 
Old 03-18-2004, 09:44 PM   #10
mattp
Member
 
Registered: Mar 2004
Location: Chicago, USA
Distribution: Slackware 10.2
Posts: 368

Original Poster
Rep: Reputation: 30
rnturn, I really appreciate your long post. I'm sorry to say that I started to reinstall before I saw it. Btw, Windows wasn't installed on the hd, so I think your plan would have worked.

I rearranged the drives a little to get the thing to boot up, but once it does, I get a lot of Kernal panics. I tried working fstab and lilo.conf around but with little or no results. The new partition layout (after I rearranged) looks like this:

hdc = cdrom (secondary, master)
hdh1 = swap (pci card 1, slave) SWAP
hdg1 = ext2 (pci card 1, master) /mnt/hd2
hde1 = ext2 (pci card 0, master) /boot
hde2 = ext2 (pci card 0, master) / (root)

I can now boot from hde, but I reinstalled to try to rid myself of those kernal panics. Is there anything I should watch out for when it comes time to setup lilo?

Thanks for all of your help
 
Old 03-19-2004, 12:58 AM   #11
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
I can now boot from hde, but I reinstalled to try to rid myself of those kernal panics. Is there anything I should watch out for when it comes time to setup lilo?
I still think booting off anything but the first hard disk (and I mean /dev/hda or /dev/sda) on a PC is just... weird. But if it works!

Not sure about why you would have gotten a kernel panic. It depends on when it happens in the boot sequence. I've seen it die when it tried mounting the root filesystem after I rebuilt the kernel, forgot to rebuild a new initrd image, and the kernel freaked when it tried to mount the ext3 root filesystem. That bad part about panicking on boot is that you have only what's on the screen to go in (in my experience) so you'll have to write down as much of it as you can so someone can look at it. The good thing about it is that it hardly ever seems to happen if you're using the plainest vanilla kernel that comes on your CD. I haven't used Slackware in years so I'm not familiar with how it works nowadays. If the installer tried autodetecting everything and somehow screwed up, it might have installed a variety of kernel that's not quite correct for your hardware. If you have to manually specify what your hardware is during installation then the burden is on you to be accurate so the installer plops the right code on disk. Since your disk configuration is still what I'd call "unconventional" it could be that's still a problem. Can't get a /dev/hda, eh?

As for the lilo gotchas, it's sort of hard to tell what you might run into. Are you still planning on posting the lilo.conf you're using? And if you're getting a real kernel panic, you're past the point where lilo should be an issue. Usually if you foul up the lilo configuration you'll just see something like "LI" when the system tries to boot and it all hangs. (That can also happen if Lilo is OK but the disk geometry is somehow incorrect. I've actually successfully installed Linux across a network (i.e., slowly) onto a system only to have it hang on the first boot because of this. Bummer.)

Do you have any record of what was happening just before the kernel panicked?

BTW... doesn't LQ now have a Slackware-specific area under the Distributions forum? Might be worth the time to do some searching in those threads for your problem. Could be someone else has seen it before.

Good luck... Post your findings. Gotta go. Must... sleep...
 
Old 03-19-2004, 08:44 AM   #12
mattp
Member
 
Registered: Mar 2004
Location: Chicago, USA
Distribution: Slackware 10.2
Posts: 368

Original Poster
Rep: Reputation: 30
The reason I got kernal panic was because my FSTAB said that hde was swap, but now when I rearranged the drives, the drive in hde was actually ext2. So linux freaked out. I got pissed and reinstalled. I botched the installation. I will fix it and post whats going on. Thanks for you help thus far!
 
Old 03-19-2004, 06:18 PM   #13
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
The reason I got kernal panic was because my FSTAB said that hde was swap, but now when I rearranged the drives, the drive in hde was actually ext2. So linux freaked out.
Hmm, interesting. I've seen fsck squawk when it tries to check a swap partition but that never resulted in a kernel panic; just told me I'd have to run fsck by hand and dumped me into maintenance mode where I found the mistake.
Quote:
I got pissed and reinstalled. I botched the installation.
Ouch!
Quote:
I will fix it and post whats going on.
Good luck...
 
Old 03-19-2004, 06:33 PM   #14
mattp
Member
 
Registered: Mar 2004
Location: Chicago, USA
Distribution: Slackware 10.2
Posts: 368

Original Poster
Rep: Reputation: 30
I could have fixed it from maintainace mode? Argh!! Too late now I guess. I will try to reinstall tonight, but I may not have time. Thanks for stickin' with me! ( :
 
Old 03-19-2004, 06:41 PM   #15
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
"I could have fixed it from maintainace mode?"

Yes. Whenever you move partitions around you can reconfigure Linux by changing /etc/lilo.conf and /etc/fstab and run lilo. The problem that you described in your original post seems to me to be that when you reconfigured /etc/lilo.conf you told told lilo the wrong address for the drive that you boot from. The drive that you boot from is set in the BIOS. It isn't necessarily the drive that your / partition is on.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
  


Reply



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
yet another lilo problem killahsmurf Slackware - Installation 6 04-23-2005 11:33 PM
Lilo vs Grub - PROBLEM with lilo nelsonnery Linux - Software 2 09-09-2004 11:09 AM
LILO problem CommandoHamster Linux - General 4 07-22-2003 11:52 AM
LiLo Installation problem ?and (GNOME and KDE problem) hitesh_linux Linux - Software 1 01-01-2002 04:56 AM
Problem with Lilo not updating (yes I ran lilo after changing the conf) webguy Linux - General 2 06-24-2001 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:36 PM.

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
Open Source Consulting | Domain Registration