Power failure, non-booting Linux install

mcwcmcwc Vancouver, BC Member
edited June 2004 in Science & Tech
During the early hours this morning, the power went out and both my main rig and laptop turned off, which has Linux installed on it. When I turned my laptop on, LILO loads just fine and when it goes to boot Linux, it stays stuck at this screen (attached image). Note, the cursor is not blinking.

I've tried using the "rescue" option on the Mandrake install CD to remount and reinstall LILO but it done nothing. It still boots to the same screen.

Now, it is there anyway to recover this install or should do an upgrade install to get Linux working again?

Comments

  • Straight_ManStraight_Man Geeky, in my own way Naples, FL Icrontian
    edited June 2004
    Morgan, what file system are you running???

    ext3 or Reiser??? If Ext3, then run fsck. For Reiser, run reiserfsck. If you are running Reier on Mandrake 10, this could be Reiser 4. Docs and recovery info for Reiser is at http://www.namesys.com (yup, the URL got moved again) and they have several scenario walkthroughs.

    Unfortunately, it looks like the system tried to suspend, got caught in mid-suspend with a power failure. Probable file system or journal damage.

    Your file system checker probably can help some, but fix that before doing a reload in this case.

    After the file system recovery, with Lilo as bootloader (I use GRUB as the current one detects differnces in boot options at boot by itself), do this in console, which can be a rescue console if you mount /

    lilo -qv
    lilo -vt
    lilo

    First sequence tell Lilo to look for available boot options, be verbose about them.

    Second tests the config but does not write anything permanently.

    Third tells Lilo to update its config file.

    I hate to tell you this, but if you were fixing a kernel at power-outage time, that is when Linux will be very vulnerable to HD going down in mid-write and you ending up with a corrupt kernel, which is the other major scenario causer for something like this is. So, if you could talk here more about what you were doing on the Linux box when power went down (or even since last Linux reboot), diag and recover steps would be more precise from me. I started using Mandrake at version 8.0 and know some parts of it better than most other distros. I also am running 10 Official here, so might be able to dig up some appropo help snippets and links if I know more about what to look for.

    Linux might want 15 min to think about things with those messages, also. Let it try for that long at least.

    AND, if you have multiple chjoices in Lilo, try the Linux-enterprise choice once or the Linux choice and see if you get different results, these ARE different kernels precompiles. You might at least be able to get into a normal Linux run long enough to fix the "other" non-working kernel by reinstalling just that one kernel package from within a Linux boot with urpmi or RPM.
  • mcwcmcwc Vancouver, BC Member
    edited June 2004
    The file system I am using is ext3.

    The power went out in the middle of the night, while I was sleeping. My laptop was left there, folding and that's all it was doing during the night. The last time I rebooted was 3 to 4 days ago.

    I'll try my best to understand what you wrote and see if I can fix the problem.

    Thanks for the help John.
  • Straight_ManStraight_Man Geeky, in my own way Naples, FL Icrontian
    edited June 2004
    Ok, let me find some EXT3 recovery scenarios.... You should run fsck with the file system being scanned unmounted-- totally unmounted. Thus, a rescue CD boot is best bet. Almost all good rescue CDs have fsck on them. IF you got the Mandrake Live CD, it can function as a rescue CD, in fact, and that might be easiest to do for you, since the Live CD will let you be in a GUI or console and fsck the HD without ever mounting the file system. fsck is interactive, just tell it Y to any question with an totally unbootable Linux on HD, then clean up the mess or move the remains to a slave hookup, install Mandrake 10 on a different HD hooked up as Master, then recover, if this is a desktop Linux install, with a lappie, it gets harder but once you clean the file system to the extent it can be, if you can boot it, you can copy off data and maybe burn to CD what you want. What is bad will essentially be vaporized. The rest, you can access as if nothing happened. Reiserfsck is actually a BIT harder to deal with than fsck, fsck is designed to talk back at you and ask for permission to run in an advanced journal\file system rebuild if it finds a big mess on any partition.

    With a laptop, cherge the batteries first please, and then run fsck with laptop plugged into a surge strip. Batteries will back up the fsck run's integrity if the power cuts out in mid-fsck, and probably let it finish if it gets about 1\3 done beofre power cuts.

    What's really interesting about this scenario, for me, is that the laptop might have low-power suspended if the laptop was not plugged into wall outlet via transformer when left to run overnight. If so, you might have little or no file system damage. I did not realize this was definitely a laptop install when I first posted, and that fact alone could make things more interesting-- and if the laptop suspended itself you might have lost little to nothing if batteries were not fully discharged and laptop self-suspended. This could happen before or after power went out.
  • mcwcmcwc Vancouver, BC Member
    edited June 2004
    I had ACPI set to go into hibernate when the battery was low, I didn't turn on suspend. I think that Linux was sucessful at going into hibernation mode. I'll turn on suspend once it just up and running again.

    Anyway, I tried running fsck in the recovery console from the install disk but bash can't find fsck. A little searching at linuxquestions.org, I found that I could use fsck.ext3 and it worked. I used "fsck.ext3 -yfv /dev/hda1" and "fsck.ext3 -yfv /dev/hda6". Both partitions came out clean. It still doesn't boot. I am getting MandrakeMove right now and try it that works in an hour or so. If it doesn't, I'll have my laptop fold with MandrakeMove till tomorrow morning.
  • mcwcmcwc Vancouver, BC Member
    edited June 2004
    After going through power failure and Linux crash threads at linuxquestions.org, either Linux performs fsck booting after a crash or it was suggested to run fsck. Well, after not finding any solution, I went to do an upgrade install, on the partitioning part of the upgrade installation, it displayed:
    An error occurred
    swapon(hda5) failed: Invalid argument.
    hda5 is my swap partition. Is my swap partition damaged? If so, do I just reformat the swap partition to repair it?
  • beatzbeatz i am a hamburger Member
    edited June 2004
    Hi mcwc,

    maybe you just have a corrupt hibernation memory image. When linux hibernates it writes the image to the swap partition. You could try to just reformat the swap partition and then it should boot up normally, if there is no image found.

    Also you can pass a kernel option at boot, so that the kernel will ignore the image and start up normally. There are different ways to hibernate, but to me it looks like you are using Suspend-to-Disk, so the option "pmdisk=off" should do the trick. Other options are "noresume" or "noresume2", depending on the hibernation method.

    I would definitely try this first before reinstalling, it might work. Excuse my rather confusing english, but its late here in Europe and all the wine bottles are empty ; ).

    Good luck,

    Michael
  • mcwcmcwc Vancouver, BC Member
    edited June 2004
    Thanks beatz! That certainly did the trick.
    Also, thanks for your help John.

    I think I'll change my boot manager to GRUB and change my ACPI settings.
  • beatzbeatz i am a hamburger Member
    edited June 2004
    Nice to hear, that I could help! :thumbsup:

    When you are interested in setting up some acpi power saving methods you might want to check out this tutorial, which goes into a lot of details. More can be found here.

    For myself I found apm to work much better with my old lappy. I now have hiberate, suspend and standby working. There is a good tutorial here.

    Have fun,

    Michael
Sign In or Register to comment.