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.
I've searched this forum for Kernel panics but mine seems to be a little unique.
One day when I tried to boot Fedora 8 on my machine, I get the following message from the boot screen.
Code:
Uncompressing Linux...Ok, booting the kernel
Red Hat nash versio 6.09 starting
...
...
mount: could not find filesystem '/dev/root'
setuproot; moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init
The messages preceding the "kernel panic" message is unique from the other kernel Panic messages that I have read....my machine is not even mounting root!
I tried reinstalling Fedora 8 onto this hard drive, but after going through the Install GUI, I get a pop up that says:
Code:
An error occurred trying to format sda1. This problem is serious, and the install cannot continue.
Press <Enter> to exit the installer.
I have a second hard drive that has XP is installed on the machine. With the same IDE cable, I plugged the second hard drive in and XP booted up from the second drive with no problem, which tells me the problem is not my motherboard.
This hard drive is not that old...I thing I have had it only a couple of years.
Have you tried booting from CD? Running "fsck" from the CD boot?
When I boot from the CD and issue the fdisk -l command, this is my output:
Code:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003c781
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 19457 156087540 8e Linux LVM
Disk /dev/dm-0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 158.2 GB, 158209146880 bytes
255 heads, 63 sectors/track, 19234 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/dm-3: 1577 MB, 1577058304 bytes
255 heads, 63 sectors/track, 191 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800
Disk /dev/dm-3 doesn't contain a valid partition table
[root@localhost ~]#
When I try to use fsck on the entire drive:
Code:
[root@localhost etc]# fsck /dev/sda
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
fsck.ext2: Device or resource busy while trying to open /dev/sda
Filesystem mounted or opened exclusively by another program?
[root@localhost etc]#
When I try to fsck the first partition:
Code:
[root@localhost etc]# fsck /dev/sda1
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda1 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
Do you really want to continue (y/n)? yes
The filesystem size (according to the superblock) is 104388 blocks
The physical size of the device is 16033 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no
/boot contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Error reading block 16387 (Invalid argument) while getting next inode from scan. Ignore error<y>? yes
Force rewrite<y>? yes
Error writing block 16387 (Invalid argument) while getting next inode from scan. Ignore error<y>? no
Error reading block 16388 (Invalid argument) while getting next inode from scan. Ignore error<y>?
This just keeps repeating until I say no and then it aborts
Onebuck is right. The whole *point* of booting from a CD is so that your hard drive *isn't* mounted, so you can run "fsck" on it (and try to repair it).
Usually, the CD has some kind of "repair option" - that's the one you want. It will put you in "single user" mode, and it should mount a virtual root volume in RAM (leaving your hard drive unmounted, and available to try to repair).
Then run "fsck" on the Linux partition of your hard drive (for example, /dev/hda2, or /dev/sda2).
Remember:
1) You're getting the "panic" because you can't mount your root volume
2) You can't mount the root volume because of some kind of disk or partition error
... and ...
3) The first step to resolving the error is to see if you can "repair" the root volume with "fsck".
You're on "3)". Once you successfully run "fsck", you might be home free.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.