HELP!!: "could not mount root filesystem" !!!

hello.
i am running 11.2, kde4…
the day before yesterday, the system updated, and i think there was kernal update within that. i had no problems immediately afterward.
…then i did a total shutdown for the night, and turned it back on yesterday only to find this:

***mount: wrong fs, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error
In some cases useful info is found in syslog–try dmesg | tail or so

could not mount root filesystem–exiting to /bin/sh
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
$***

…i’ve never seen or experienced this before, therefore i have no clue where to begin even questioning.
besides the last updates from the other day, i did nothing out of the ordinary, no downloads or any system/configuration tweeks.

will i have to reinstall opensuse? or is there a way to reclaim my previous setup–or at least reclaim my files and documents??
…i’m running off of the 11.2 livecd…ugh…

or now, friends, i’m stuck!!
please help…
–>sbkra

You need to boot from a linux live CD and post here the output of fdisk -l, so we can see how your disk looks like.

this is the output of fdisk -l:

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x02d402d3

Device Boot Start End Blocks Id System
/dev/sda1 1 102 819283+ 82 Linux swap / Solaris
/dev/sda2 * 103 2713 20972857+ 83 Linux
/dev/sda3 2714 7296 36812947+ 83 Linux

OK. I assume you’re running a live system now.
Try the following command:
**mount /dev/sda2 /mnt
**If it doesn’t work, try:
mount -t ext4 /dev/sda2 /mnt
If it still doesn’t work, try:
mount -t ext3 /dev/sda2 /mnt
Are you able to mount sda2? Or do you still get errors?

i got the same error for all three:

mount: wrong fs type, bad option, bad superblock on /dev/sda2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

OK. What’s the output of :
file -s /dev/sda2
?

…i get:

/dev/sda2: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, LBA flag 0x1, 1st sector stage2 0x6bfee6, GRUB version 0.97, code offset 0x48

That’s normal so far. I was hoping to find out the format (ext3, ext4 or another) of the partition before trying to repare the filesystem. Do you know by chance what filesystem it is ? Or … in other words, did you install openSUSE on another filesystem than ext3 or ext4 … like for example reiserfs ? If you didn’t explicitely specify another filesystem during setup, it will be ext4.

no, i didn’t specify another filesystem.
it was a pretty standard install, since it was my first (a couple years ago, with 11.0).

like i said, everything has been fine, that is, until i did the update the other day.
and i’m pretty sure there was a kernal update or fix (i wasn’t paying as much attention as i should have been).
…that is the only thing that has taken place in the last week…the only difference that i can conceive which may be a possible cause…

I don’t know what caused it but the filesystem is damaged. You can try to repare it. Be aware that it might also not work!
To check the filesystem, you would run:
fsck /dev/sda2

  • assuming it is not reiserfs … or it will make things worse!

Do not try it on all partitions, just sda2 !

  • it’s dinner time here. Hope somebody else can continue to help you …

thanks for your help…

to continue, for all…

after running “fsck…”, and reboot, i ultimately get:
**Activating swap-devices in /etc/fstab… failed

fsck failed. Please repair manually and reboot. The root file system is currently mounted read-only. To remount it read-write do:
bash# mount -n -o remount,rw /

[asks for password]
(repair filesystem)#****

…and this is how far as i got. tried the “mount…” but it just keeps the (repair filesystem)#.


again, i greatly appreciate any help that anyone can give…

Now, do what it says: type the command highlighted in red.
Then try to repare the next partition:
fsck /dev/sda3

And reboot properly: shutdown -r now

ok, i’ve done what it told me to do.

now, the system boots like it did normally, with the green boot screen preceding the login screen.
however, instead of the login screen, it stays at the CLI.
…the last few lines of the load process read:

Failed services in runlevel 5: avahi-daemon
Skipped services in runlevel 5: earlyxdm nfs smbfs xdm postfix

at this point, i can login as both user and root.
however, it does not go beyond this commandline screen…
…???..

On 2010-10-27 04:06, sabaka wrote:
>
> thanks for your help…
>
> to continue, for all…
>
> after running “fsck…”, and reboot, i ultimately get:
> ACTIVATING SWAP-DEVICES IN /ETC/FSTAB… FAILED

Do a cat of that fstab, and also a “file -s /dev/sd*”, and copy it here.

From the fstab (of the real system) you obtain the filesystem types, which should match the output
of the file command. The next step is to fsck all partitions (after being sure of the types).

You should have this data printed in advance of disasters, and not have to guess it now.

> -[ASKS FOR PASSWORD]-
> (REPAIR FILESYSTEM)#–
> .and this is how far as i got. tried the “mount…” but it just keeps
> the (repair filesystem)#.

You are expected to manually repair first, then reboot.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

@robin_listas:
what do you mean by “Do a cat of that fstab”?

…the “file -s /dev/sd*” for each partition is:
**file -s /dev/sda1
/dev/sda1: Linux/i386 swap file (new style) 1 (4K pages) size 204819 pages

file -s /dev/sda2
/dev/sda2: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, LBA flag 0x1, 1st sector stage2 0x6bfee6, GRUB version 0.97, code offset 0x48

file -s /dev/sda3
/dev/sda3: Linux rev 1.0 ext3 filesystem data (large files)**

…also, since previously doing fsck, as per please_try_again’s instruction, i now get the following when inputting fsck:
**fsck /dev/sda2
fsck from util-linux-ng 2.16
e2fsck 1.41.9 (22-Aug-2009)
/dev/sda2: clean, 146494/1313280 files, 1276083/5242880 blocks

fsck /dev/sda3
fsck from util-linux-ng 2.16
e2fsck 1.41.9 (22-Aug-2009)
/dev/sda3: clean, 35513/2301952 files, 3513439/9203236 blocks
**

*before reading this post by robin_listas, i posted #14 above…

…i forgot to add that unless i boot through failsafe, the screen will blink off and on continuously, and i’m unable to do anything except restart.
…the commandline login i mentioned occurs only through the failsafe…

Here is the problem if you had a scrambled file system fsck will attempt to repair it however it may not be able to peace everything back together. You may find files/directories/parts of files in the lost and found directory on each partition. If fsck is not able to peace all back together perfectly you may have significant OS problems. Since you may be missing binaries/configs and all other manner of files. These may or may not be in usable condition in Lost and Found.

The problem can be caused by a hard disk going bad. I’d run a low level scan on the disk from the maker’s site.

A reinstall is the only practical way to fix this. You did have data backups right?

It looks like you solved the first problem. Now you have another one (not necessarely related).
Rather than booting in failsafe, select the entry you would boot normally but before pressing Enter, write “3” at the “Boot options” line. Then press Enter. The system should boot in text mode (runlevel 3), which is different from failsafe. After login, type the following commands and post the output here:

lspci | grep -i vga
hwinfo --gfxcard | grep -i -A 3 driver

It will tell us what graphic card you have and possibly which driver you are using. Also try the following command:

grep -i driver /etc/X11/xorg.conf

so, here are the outputs:
lscpi | grep -i vga
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]

hwinfo --gfxcard | grep -i -A 3 driver
Driver Info #0:
XFree86 v4 Server Module: radeon
XF86Config Entry: Option “XAANoOffscreenPixmaps” “true”
Driver Info #1:
XFree86 v4 Server Module: radeon
3D Support: yes
Color Depths: 16

grep -i driver /etc/X11/xorg.conf
/etc/X11/xorg.conf: No such file or directory

hmmm … It doesn’t look like you are using the ATI proprietary driver.
OK. Reboot the same way you just did and instead of adding “3”, add “nomodeset 3”, then press Enter to boot. Log in and type “startx”. It might not work. When you’re back in console, get the file /var/log/Xorg.0.log somehow and post its content here.