Boot from hard drive stalls, rescue CD works fine
I have been experimenting with SimplyMepis and Libranet on a spare hard drive.
During the experimentation something happened to my Mandrake 9.2 drive and it won't boot from the hard drive anymore except when I choose "hard drive" option from the Mandrake rescue CD that I, thank goodness, prepared some time ago. When I try to boot from the hard drive (the bootloader is installed in the MBR of /dev/hda), I get the message from BIOS saying "Looking for boot record on IDE1" and a second later it says "OK," which is normal procedure. But then it just hangs, though it does sound like the hard drive may be churning away---hard to tell. So I reboot with the rescue CD in the CD-ROM drive, and choose "hard drive" as the boot option and immediately it goes to the screen where you can choose what kernel you want, just as it normally did booting from hard drive in the first place. What's lacking, and how can I fix it? I tried "upgrade" from the distro set of CD's, which often fixes lots of minor problems, but it had no effect on this one. I tried reinstalling the bootloader after I got booted up, as root: Code:
lilo -v -b /dev/hda Out of ideas at this point! I'd rather not do a whole new install because it takes about five hours to get all my apps back and installed correctly every time I do that. But I'd rather not have to rely on a CD-ROM every time I want to boot, either--though I intend to manufacture a couple more of them now, just in case! ;) |
What happens when you merely type lilo while logged in?
Also post the output of mount cat /etc/fstab fdisk -l /dev/hda |
Quote:
Code:
[root@bodhisattva jon]# mount Code:
[root@bodhisattva jon]# cat /etc/fstab Code:
[root@bodhisattva jon]# fdisk -l /dev/hda Code:
[root@bodhisattva jon]# lilo |
You also may want to post /etc/lilo.conf and the hdparm info for your drive as well.
|
Quote:
Code:
boot=/dev/hda Code:
rescue CD came to the rescue again by selecting "hard drive." |
I see nothing unusual in your configuration files or information returned.
On the other hand it appears that the BIOS is not locating Lilo correctly on the drive since you never see the Lilo screen. This (to me) normally indicates that the bios believes that the MBR is located one place on the drive, when it actually is located elsewhere. This can happen if the state of LBA mode is toggled differently (accidentally, or by another OS) and then the MBR re-written. So while the Linux boot from the CD may be getting the actual geometry used when the drive was set up, the BIOS now sees a slightly different configuration and is looking (and finding!) a different MBR record which in turn is erroneous. Try toggling the LBA states for the drive in the bios then COLD boot after each change. If this doesn't help, again try running Lilo after setting a different LBA mode, booting to Linux via the CD and running Lilo again. I've had a situation wherein the drive's geometry block has been modified by a utility when the bios was configured one way, then when the drive was reconfigured (after a dead cmos battery) it was not able to work properly due to the old geometry data. Nothing I could do would eliminate this problem except a complete drive reformat with a drive vendor utility that would zero out the ENTIRE drive. Since this also took care of the erroneous MBR and sectors things worked again after doing so. But this was very extreme! Remember though, that since you can boot into Linux, it's not too difficult to backup your current configuration completely so you do not have to do a lot of work to get everything back to a working state. E.G. Boot up Linux via the CD. tar off the /etc directory tar -czvf savedetc.tar.gz /etc/* Save the contents of your RPM installation... rpm -qa > rpmfiles.lst Then boot from a Live CD, and tar off either your entire partition(s) or just tar off your /home directories to another media. Once done, reformat and re-install your hda drive as close as possible to what you have now. Then once you have a rudimentary Linux system running first re-install all of your RPM's to exactly the same state using urpmi < rpmfiles.lst Next UNTAR the /etc folder back to /etc cd / tar -xzvf savedetc.tar.gz And run lilo again and reboot. Finally restore your home directories from their backups. |
Thanks, opjose! I am saving this page as "if all else fails.html" and will print it out and work on these tactics--hopefully not having to resort to the extremest measure--tomorrow.
Will of course report back with results. |
I went ahead and tried that tonight. No luck. I did a complete reinstall erasing the entire disk and placing the bootloader in MRB but it still stalls as before. I don't currently have Maxtor's handy-dandy low-level disk utility; I guess I may be able to download it and put it on CD-ROM (don't currently have a floppy drive hooked up, either). However it seems last time I checked, Maxtor only offered one that required a Windows machine. I may be wrong.
Anyway, the urpmi I have on this system won't work from redirection, so I guess I can go and put "urpmi" at the beginning of every one of the 500-some lines of that list and see if it will run that way---or just do things piecemeal as I've done many times before---takes a few hours and lots of frustration. Got email and browser going, and that's it. Still have to boot from CD-ROM, which is not that much of a deal. Maybe I better just leave it that way, get halfway back to normal, and hope for better days. |
Did you first ZERO out the disk with a manufacturer's utility.
When I had this problem the system(s) would not boot properly until this was done. If you've saved the file then there is no reason to manually enter urpmi at the beginning. Just let sed or some other editor do the work for you, then you can add the shell commands at the beginning and make the file executable. Finally just run it with sh ./filelist.lst |
Unfortunately I wasn't able to zero out the disk as I lack a suitable utility for that at present. As I mentioned in the prior post, I will probably try to get one from Maxtor's site, but it seems to me they only offered one that required Windows last time I checked!
I'm almost back to normal operations already, though, mainly thanks to the handy tip you gave about restoring the /etc directory. That made a world of difference in ease of getting programs running again such as lm_sensors, power backup monitoring, and others. Thanks! I already thought of making a script from that list of rpms, and will probably do so tomorrow. There may be no need, though--I'm almost back to where I have everything available and working again. I have a pretty simple system, where email, browsing, word processing, spreadsheet, some graphics, and some system monitoring is all I need. Lucky that way! I intend to burn (at low speed) three or four more "rescue" disks and keep them carefully so I will presumably always be able to boot SOMEHOW. I'm sure glad I made that one several weeks ago, on the spur of the moment. The first disk of the Mandrake distribution is bootable, of course, but I don't know how you would just boot into an existing Mandrake-Linux system with it. So for me the "rescue" disk was worthy of its name. |
I'll bet google will turn up something to zero out a drive which does not need to be maxstor specific, as long as it hits the entire disk... (a maxtor utility would be better though...).
Yeah those rescue disks are a handy thing, as are those LiveCD's in a pinch. |
Quote:
From recent experiences it looks to me like the only directory that resists restoring is /lib. I suppose because the mechanism I use for restoring it (I've tried both cp and rdiff-backup's restore function) is calling routines from there while it works. |
Correct!
Which is why if you are going to try to preserve a full linux file system, it should really be offline. E.G. boot from a Live Linux CD or use a Winblows program (bleh) to backup your Linux partition. However I frequently just hook up an external drive, boot up a live Linux file system, then tar off everything to the external drive. Then I make any changes, hardware swaps, etc. and tar back everything after doing a rudimentary Linux install. I actually prefer the urpmi method though after saving off /etc and home directories as it "cleans up" the system and makes it run quite well in the process. |
All times are GMT -5. The time now is 05:54 AM. |