LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Hard shutdown bad idea I know but now Kernel panic (http://www.linuxquestions.org/questions/slackware-14/hard-shutdown-bad-idea-i-know-but-now-kernel-panic-4175459610/)

sizemj 04-25-2013 08:21 PM

Hard shutdown bad idea I know but now Kernel panic
 
I had to do a shutdown on my laptop by holding the power button down. (Lenovo T430) Now I get "Kernel panic - not syncing VFS Unable to mout root fs on unknown-block (8, 4)

I have tried to put the Slackware DVD in and run fsck on /dev/sda (my drive) but it hangs and does nothing. I have also tried to just re-install Slackware but it hangs at cfdisk. This is Slackware 14 32bit install. It is dual booting with Windows 7 which works fine.

ReaperX7 04-25-2013 08:32 PM

How old is your hard drive?

sizemj 04-25-2013 08:34 PM

6 months maybe. The laptop is less than a year old. The windows partition works fine.

ReaperX7 04-25-2013 08:40 PM

Try having Windows 7 re-partition the Linux side of the drive as a Bare Partition, format it to NTFS, and then erase it and reinstall Linux afterwards. There's a slim but realistic chance it could be a bad block due to disk damage from the power off.

Do you know the brand of Hard Drive also?

sizemj 04-25-2013 08:43 PM

Hitachi,
That is a good idea. Have to fix the MBR but I can do that. LILO is on it.

Thanks

ReaperX7 04-25-2013 11:09 PM

Once you get it repartitioned hit it with "chkdsk" and do a thorough scan and check all the free space too just to be safe.

If all else fails you can always grab a copy of Hiren's Boot Disk and use it's utilities to check the drive.

vdemuth 04-26-2013 12:37 AM

Why would you want to use Win7 as some sort of rescue medium.

Grab a live linux cd, maybe system rescue, though others are available and use that to rescue your existing install.

TommyC7 04-26-2013 01:25 AM

I'm not too knowledgeable about the Linux kernel, but if I recall correctly that's the same error message you see when you boot the generic kernel without an initrd.

As far as I know, that kernel panic is just spouted when the kernel does not include the driver(s) required to access the root filesystem.

In which case, you might be able to fix it simply by re-creating your initrd (not 100% guarantee this will work, though) which you can do by chrooting into your system with the Slackware installer CD.

Quote:

vdemuth:
Why would you want to use Win7 as some sort of rescue medium.
According to the original poster, that's the only operating system he/she can access at the moment.

ALVAN 04-26-2013 05:52 AM

I hope you run fsck against a partition like /dev/sda2 or /dev/sda3 and not to /dev/sda (dont know where your Linux / root partition is, and i presumed /dev/sda1 is the windows NTFS partition).

The above error might happen if :

1. You dont select the right root partition to boot at lilo boot prompt
2. The kernel modules cant recognize your hard drive
3. The kernel does not know the file system to boot in
4. If the hard drive is bad, tough if one is bad you should see more errors

2 and 3 can be ignored if you use the slackware kernel that came on CD.


I suggest you boot with a slackware boot cd and find out where exactly is your root partition.
Try to manually mount and watch with dmesg if you see hard drive errors.
Look at /your_root_mounted/etc/lilo.conf and check if the right root partitions is there.

Might worth a try to rerun lilo again from the boot cd : chroot /your_root_mounted then rerun lilo -v

sizemj 04-28-2013 08:58 PM

Root partition is /dev/sda4. sda3 is swap. sda1 and sda2 windows 7 and windows rescue partition. I have booted up with Trinty Rescue cd. tried to mount sda3 and it does seem to be a bad block device error. That partition seems to be hosed and I cannot even run a fsck on it. ReaperX7 idea I think will be the best.

Slackovado 04-29-2013 01:46 AM

Quote:

Originally Posted by sizemj (Post 4940816)
Root partition is /dev/sda4. sda3 is swap. sda1 and sda2 windows 7 and windows rescue partition. I have booted up with Trinty Rescue cd. tried to mount sda3 and it does seem to be a bad block device error. That partition seems to be hosed and I cannot even run a fsck on it. ReaperX7 idea I think will be the best.

I second the Hiren's Boot CD. But get FalconFour's Ultimate Boot CD/USB v4.6 (F4UBCD) http://thepiratebay.is/torrent/83262...6_%28F4UBCD%29 and also get the 4.5 version as some of the utilities didn't work on the 4.6 version.
However the 4.6 has excellent MiniXP (better than 4.5).
There is a utility called Harddrive Regenerator which will recover bad sectors. Sometimes it's just enough to copy data off a drive that's going bad.
I just changed a hard drive on a Thinkpad T530 (same as yours but with 15" screen) that was purchased just before Christmas (so about 4 months old).
It had a massive amount of bad sectors and I could barely get stuff off it.
If you just have corrupted files due to a crash then that can be fixed with fsck and you should be able to mount the filesystem afterwards (when booted from a rescue disk like Slackware install disk).
If you can't even mount the file system then you have physically bad sectors or corrupted partition table or something like that.


All times are GMT -5. The time now is 05:30 PM.