Repair openSUSE 11.0 installation

I have been running OS 11.0 on a notebook since it came out. This morning my hard disk went bad, I think. Anyway openSUSE will not longer boot. (Windows 2k boots OK on the same system.) I think that I did the original install from a Gnome Live CD. I can’t figure out how to do a repair using that live CD. Is this possible?

The computer will not read a DVD so I need to use either a CD or an USB memory stick. The biggest memory stick that I currently own is 2 gb. I guess I could upgrade to OS 11.1, but I am not sure how to do that.

Suggestions on what to do next will be appreciated.

It’s possible that you can do a repair with the LiveCD, but not without a better idea of the problem. Your description is just that openSUSE does not boot, but W2K does. How do you have the booting set up? Are you getting the openSUSE menu and from there booting to W2K? If you get that menu and the openSUSE boot fails, what do you see? Are you getting the graphical screen, or a text menu? If the graphical screen, hit the Escape key to drop the screen to a text menu, then try - you may now see an error message you did not before. In other words, give us as much info as you can, and then we may be able to suggest a repair.

As far as upgrading to 11.1, you may be able to do that with a LiveCD. On the DVD, at the start of the installation there is an option to request upgrade rather than fresh install. I don’t remember if that is offered from the LiveCD installation, but if you just try it you will see that on one of the first few screens - just don’t go to the partitioning step unless you are positive you are actually upgrading (if it doesn’t have that option, you can just abort the process).

Well here is more information that was not in the original post.

The machine actually does boot. However, I get the following:

mount: unknown filesystem type ‘ext2’
could not mount root filesystem – exiting to /bin/sh
$

So I think that my hard disk has somehow become corrupted

Boot from the LiveCD. Open a terminal window. Switch to root (the “su” command). Then do this and copy/paste back here:


fdisk -lu

I can’t do a cut and paste. However, when I issue that command I see the file system with the partitions that I think that I should see.

On the other hand, I do have a floppy drive in the notebook … here is the copy and paste

fdisk -lu

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders, total 78140160 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xe06ee06e

Device Boot Start End Blocks Id System
/dev/sda1 * 63 16996769 8498353+ 7 HPFS/NTFS
/dev/sda2 16996770 78140159 30571695 f W95 Ext’d (LBA)
/dev/sda5 16996833 18555074 779121 82 Linux swap / Solaris
/dev/sda6 18555138 32885054 7164958+ 83 Linux
/dev/sda7 32885118 45174779 6144831 83 Linux
/dev/sda8 45190908 77963444 16386268+ b W95 FAT32

Cannot copy/paste from the terminal? Is that because the LiveCD does not give you a network connection?

Please boot the LiveCD, again open a terminal, switch to root, and do:


mount -t ext3 /dev/sda6 /mnt

Do you get an error message? If you get no message, then do:

mount

Do you now see in the list something like?:

/dev/sda6 on /mnt type ext3

mount
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
gvfs-fuse-daemon on /home/linux/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=linux)
/dev/sda6 on /mnt type ext3 (rw)

The last line would appear to be the one you are suggesting.

I only have a wireless network pc-card in the laptop. I spent hours getting it to work. That’s the primary reason why I don’t just want to load OS 11.1.

The error that you got:

mount: unknown filesystem type 'ext2'
could not mount root filesystem -- exiting to /bin/sh

Occurs when the kernel reaches the point where it mounts the root file system. However, you just successfully mounted the root partition, assuming it is sda6. (I’m guessing that sda7 is your /home directory.)

Did you try rebooting, and did you get exactly the same error?

Try this: Boot from the LiveCD, open a terminal window, switch to root, and do:


e2fsck -f /dev/sda6

That will force a check of the root file system and repair any errors in it (usually). Note any errors that it reports. Assuming it completes properly, reboot. If still no joy, then . . . .

I need to take a look at 2 files. (Sorry that this is laborious, not having the network connection from the LiveCD.) So boot into the LiveCD, open a terminal, switch to root, and do:


cat /boot/grub/menu.lst
cat /etc/fstab

Post output back here. By the way, if you are doing the copy/post via the floppy, it might be easier to have the output go to text files you can copy (i.e., save a couple of steps)? If you want to do that, just do something like:


cat /boot/grub/menu.lst > menu.txt
cat /etc/fstab > fstab.txt

Now the output is in the 2 files, menu.txt and fstab.txt.

Sorry, above commands overlook that the partition is not yet mounted in the LiveCD. So do this instead:

mount -t ext3 /dev/sda6 /mnt

cat /mnt/boot/grub/menu.lst

cat /mnt/etc/fstab

linux:/home/linux # mount -t ext3 /dev/sda6 /mnt
mount: /dev/sda6 already mounted or /mnt busy
mount: according to mtab, /dev/sda6 is already mounted on /mnt
linux:/home/linux # cat /mnt/boot/grub/menu.lst
cat: /mnt/boot/grub/menu.lst: No such file or directory
linux:/home/linux # cat /mnt/etc/fstab
cat: /mnt/etc/fstab: No such file or directory

The machine is a dual boot machine. I think that the boot loader is in the windows partition. Is this why the above doesn’t work.

I have managed to wire an ethernet connection to my laptop. Its almost as tenuous as the wireless one!

What happened when you did the filesystem check? It looks like you remained in the LiveCD - that sda6 was mounted when you ran e2fsck? Didn’t it return an error or warning on that?

It is not possible for grub to be in the Windows partition. Wherever grub is installed, the error you got was when trying to mount the root - this is not related unless the wrong root partition was called (which is why I asked to see menu.lst and fstab).

Please try once again. Reboot the LiveCD, open a terminal, switch to root, and do:

mount -t ext3 /dev/sda6 /mnt
cat /mnt/boot/grub/menu.lst
cat /mnt/etc/fstab

if that fails again, post the output of this back here:

ls /mnt
ls /mnt/boot

linux:/home/linux # mount -t ext3 /dev/sda6 /mnt
linux:/home/linux # cat /mnt/boot/grub/menu.lst
cat: /mnt/boot/grub/menu.lst: No such file or directory
linux:/home/linux # cat /mnt/etc/fstab
cat: /mnt/etc/fstab: No such file or directory
linux:/home/linux # ls /mnt
linux lost+found vicdell
linux:/home/linux # ls /mnt/boot
ls: cannot access /mnt/boot: No such file or directory

More info:

linux:/home/linux # e2fsck -f /dev/sda6
e2fsck 1.40.8 (13-Mar-2008)
/dev/sda6 is mounted.

WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

/dev/sda6: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda6: 4965/895840 files (5.5% non-contiguous), 130099/1791239 blocks

Sorry I wasn’t more clear - not a good idea to run that file system check on a mounted partition. You were right the first time to say no.

sda6 is not the root partition, it is where /home is mounted. So first we should double-check that sda6 is OK and now check sda7 - it is probably sda7 that is failing to mount at boot time. So boot from the LiveCD, open a terminal, switch to root, and do:

e2fsck -f /dev/sda6
e2fsck -f /dev/sda7

If you get fatal errors on either, report that back here. Otherwise then do this:

mount -t ext3 /dev/sda7 /mnt
ls /mnt
cat /mnt/boot/grub/menu.lst
cat /mnt/etc/fstab

If you get an error mounting sda7, post that back here. If not, post back the output of the ls and cat commands.

More than you suggested:

linux:/home/linux # e2fsck -f /dev/sda6
e2fsck 1.40.8 (13-Mar-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda6: 4965/895840 files (5.5% non-contiguous), 130099/1791239 blocks
linux:/home/linux # e2fsck -f /dev/sda7
e2fsck 1.40.8 (13-Mar-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda7: 97692/384272 files (1.3% non-contiguous), 711851/1536207 blocks
linux:/home/linux # mount -t ext3 /dev/sda7 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda7,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

linux:/home/linux # dmesg | tail
bootsplash: status on console 0 changed to on
[drm] Initialized drm 1.1.0 20060810
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
[drm] Initialized r128 2.5.0 20030725 on minor 0
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode
ext3: No journal on filesystem on sda7
linux:/home/linux # ls /mnt
linux:/home/linux # cat /mnt/boot/grub/menu.lst
cat: /mnt/boot/grub/menu.lst: No such file or directory
linux:/home/linux # cat /mnt/etc/fstab
cat: /mnt/etc/fstab: No such file or directory