Linux - NewbieThis 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.
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.
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*
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
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).
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...
"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.
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
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.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
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.
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:
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?
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
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...
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!
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
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.
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! ( :
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.