Grub overwritten but Recovery says "No Vaild root partition"

I made a mistake while cloning a windows partition. I fought that mess for a while and in the process overwrote grub after failing to unplug the wrong drive. The end result is that I have a working Windows installation (that I use once month) but I can’t start openSUSE (11.2 RC2 via zypper dup).

My partitions should look like this (except actually /by-id/blah)

/dev/sda1 /
/dev/sda2 swap
There are 3 other partitions here but they aren’t being used.

/dev/sdb1 /home
/dev/sdb2 /windows/C

I went to use my 11.1 disk to reinstall grub but received the error “No valid root partition found”

I subsequently attempted “Verify Installed…” but received the same error.

Not knowing whether this was a limitation of the 11.1 install/repair disk, I attempted to use Super Grub Disk to boot the system. It also failed saying that the files were invalid or corrupted.

I would love to avoid a full reinstall but I am at a loss as to how to determine whether the problem is with grub or with a messed up kernel or something I haven’t even considered. If more detail is need I will get it.

Try booting off a live cd like Knoppix, openSUSE Live CD, whatever.
Log into this forum so you can post the results straight away form commands below. Mount sda1 into the live cd with these commands (su to root first):

  1. mkdir /mnt/sda1
  2. mount /dev/sda1 /mnt/sda1

Then post here the results of these commands(but su to become root first):

  1. ls -l /mnt/sda1

  2. ls -l /mnt/sda1/boot

  3. ls -l /mnt/sda1/boot/grub

  4. df -Th

That should tell us a lot more

PS “su to root” means to open a terminal window and enter the command su. That gives superuser permissions to the command that follow.

I will run the requested commands shortly and add another reply. Things have become a bit more interesting.

Since my first post I booted off a Knoppix cd and basically did just what you asked. All appeared to be in order though. I played with menu.lst and was then greeted by grub Error 15: File not found. I thought I should try and poke at the problem through chroot and after 15 minutes of scratching my head realized that knoppix is 32bit but my install is 64…

I returned to the 11.1 dvd to use the “Rescue System” option so I would have a 64bit environment.
mount /dev/sda1 /mnt

ls -l /mnt
-rwxr-xr-x 1 root root 0 Jan 1 1980 ??(
-rwxr-xr-x 1 root root 1605635 Nov 28 1907 ??.???
-rwxr-xr-x 1 root root 0 Jan 1 1980 ??(
-rwxr-xr-x 1 root root 1605635 Nov 28 1907 ??.???
-rwxr-xr-x 1 root root 0 Jan 1 1980 ??(
-rwxr-xr-x 1 root root 1605635 Nov 28 1907 ??.???
drwxr-xr-x 2 root root 16384 Jan 1 1970 .
drwxr-xr-x 19 root root 400 Nov 12 00:21 ..
-rwxr-xr-x 1 root root 0 Jan 1 1980 ??(
-rwxr-xr-x 1 root root 1605635 Nov 28 1907 ??.???

knoppix showed me what I expected. I’ve just finish running fsck.ext3 looking for badblocks and I am running fsck.ext3 -f right now.

Again, I’ll boot back into knoppix and give you the output of the commands as soon as it’s done. Or you might know what those question marks mean – they are very difficult to search for – because I don’t know if they mean corruption or what.

Interesting knoppix switches to hda from sda

ls -l /media/hda1/
total 192
drwxr-xr-x   2 root root  4096 Nov  4 01:54 bin
drwxr-xr-x   3 root root  4096 Nov 10 02:56 boot
drwxr-xr-x   5 root root  4096 Dec 20  2008 dev
drwxr-xr-x 127 root root 12288 Nov 12 01:22 etc
drwxr-xr-x   2 root root  4096 Dec 20  2008 home
drwxr-xr-x  11 root root  4096 Nov  4 01:31 lib
drwxr-xr-x   7 root root 12288 Nov  4 01:27 lib64
drwx------   2 root root 16384 Dec 20  2008 lost+found
drwxr-xr-x   7 root root  4096 Nov 10 03:07 media
drwxr-xr-x   4 root root  4096 Oct 23 23:08 mnt
drwxr-xr-x   3 root root  4096 Dec 20  2008 nogo
drwxr-xr-x   9 root root  4096 Oct 23 23:08 opt
drwxr-xr-x   3 root root  4096 Dec 20  2008 proc
drwx------  28 root root  4096 Nov 10 03:03 root
drwxr-xr-x   3 root root 12288 Nov  4 01:58 sbin
drwxr-xr-x   2 root root  4096 Oct 23 23:08 selinux
drwxr-xr-x   5 root root  4096 Nov  4 01:25 srv
-rw-r--r--   1 root root     0 Nov 10 03:22 success
drwxr-xr-x   3 root root  4096 Dec 20  2008 sys
drwxrwxrwt  87 root root 69632 Nov 10 03:22 tmp
drwxr-xr-x  13 root root  4096 Nov  4 00:56 usr
drwxr-xr-x  16 root root  4096 Nov  4 00:56 var
drwxr-xr-x   4 root root  4096 Dec 20  2008 windows

ls -l /mnt/hda1/boot/
total 33436
-rw-r--r-- 1 root root 1920577 Oct 27 06:02 System.map-2.6.31.5-0.1-default
-rw------- 1 root root     512 Dec 20  2008 backup_mbr
lrwxrwxrwx 1 root root       1 Nov  4 01:17 boot -> .
-rw-r--r-- 1 root root    1236 Oct 23 22:19 boot.readme
-rw-r--r-- 1 root root  103597 Oct 27 06:23 config-2.6.31.5-0.1-default
drwxr-xr-x 2 root root    4096 Nov 12 00:33 grub
lrwxrwxrwx 1 root root      27 Nov  4 01:59 initrd -> initrd-2.6.31.5-0.1-default
-rw-r--r-- 1 root root 7525011 Nov  4 01:59 initrd-2.6.31.5-0.1-default
-rw-r--r-- 1 root root  415232 Nov 10 02:56 message
-rw-r--r-- 1 root root  485545 Oct 27 06:26 symtypes-2.6.31.5-0.1-debug.gz
-rw-r--r-- 1 root root  484798 Oct 27 06:30 symtypes-2.6.31.5-0.1-default.gz
-rw-r--r-- 1 root root  483383 Oct 27 07:54 symtypes-2.6.31.5-0.1-desktop.gz
-rw-r--r-- 1 root root  476196 Oct 27 08:07 symtypes-2.6.31.5-0.1-xen.gz
-rw-r--r-- 1 root root  170124 Oct 27 06:23 symvers-2.6.31.5-0.1-default.gz
-rw-r--r-- 1 root root 4403616 Oct 27 06:21 vmlinux-2.6.31.5-0.1-debug.gz
-rw-r--r-- 1 root root 4790874 Oct 27 06:22 vmlinux-2.6.31.5-0.1-default.gz
-rw-r--r-- 1 root root 4731434 Oct 27 07:27 vmlinux-2.6.31.5-0.1-desktop.gz
-rw-r--r-- 1 root root 3948970 Oct 27 07:19 vmlinux-2.6.31.5-0.1-xen.gz
lrwxrwxrwx 1 root root      28 Nov  4 01:56 vmlinuz -> vmlinuz-2.6.31.5-0.1-default
-rw-r--r-- 1 root root 4158784 Oct 27 06:02 vmlinuz-2.6.31.5-0.1-default
ls -l /media/hda1/boot/grub/
total 368
-rw-r--r-- 1 root root     10 Nov  6 04:16 default
-rw------- 1 root root    159 Nov 11 23:49 device.map
-rw------- 1 root root    158 Nov 10 02:36 device.map.old
-rw-r--r-- 1 root root  10084 Oct 23 22:32 e2fs_stage1_5
-rw-r--r-- 1 root root   9248 Oct 23 22:32 fat_stage1_5
-rw-r--r-- 1 root root   8556 Oct 23 22:32 ffs_stage1_5
-rw-r--r-- 1 root root   8552 Oct 23 22:32 iso9660_stage1_5
-rw-r--r-- 1 root root  10140 Oct 23 22:32 jfs_stage1_5
-rw------- 1 root root   1226 Nov 12 00:28 menu.lst
-rw------- 1 root root   1268 Nov 10 02:36 menu.lst.old
-rw------- 1 root root   1128 Nov  3 20:15 menu.lst.old.09-11-3
-rw-r--r-- 1 root root   8700 Oct 23 22:32 minix_stage1_5
-rw-r--r-- 1 root root  11336 Oct 23 22:32 reiserfs_stage1_5
-rw-r--r-- 1 root root    512 Oct 23 22:32 stage1
-rw-r--r-- 1 root root 114510 Nov 10 02:56 stage2
-rw-r--r-- 1 root root 103734 Dec 20  2008 stage2.old
-rw-r--r-- 1 root root   8828 Oct 23 22:32 ufs2_stage1_5
-rw-r--r-- 1 root root   8136 Oct 23 22:32 vstafs_stage1_5
-rw-r--r-- 1 root root  11072 Oct 23 22:32 xfs_stage1_5

df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/root     ext2    3.4M   27K  3.4M   1% /
/ramdisk     tmpfs    1.6G   18M  1.6G   2% /ramdisk
/UNIONFS      aufs    1.6G   18M  1.6G   2% /UNIONFS
/dev/scd0  iso9660    697M  697M     0 100% /cdrom
/dev/cloop iso9660    2.0G  2.0G     0 100% /KNOPPIX
/dev/hda1     ext3     20G  9.4G  9.4G  50% /media/hda1

And because I changed it (to use the symlinks) here’s:

cat /media/hda1/boot/grub/menu.lst
# Modified by YaST2. Last modification on Tue Nov 10 00:56:30 MST 2009
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,0)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.2 - 2.6.31.5-0.1
    root (hd0,0)
    kernel /boot/vmlinuz root=/dev/disk/by-id/ata-Maxtor_6L120P0_L3905EGG-part1 resume=/dev/disk/by-id/ata-ST3300831AS-4NF16CE8-part1 splash=silent showopts vga=0x317
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.2 - 2.6.31.5-0.1
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/disk/by-id/ata-Maxtor_6L120P0_L3905EGG-part1 showopts ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x317
    initrd /boot/initrd-2.6.31.5-0.1-default

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows XP
    map (hd1) (hd0)
    map (hd0) (hd1)
    rootnoverify (hd1,1)
    makeactive
    chainloader +1

Btw, Thank you for your website. I’ve used the howtos/guides there several times. They are awesome reference.

You’ve nominated the swap partition as this:

resume=/dev/disk/by-id/ata-ST3300831AS-4NF16CE8-part1

which is sdb1 but in your opening post you said it is sdb2. So there’s a question mark there.

I’d be inclined to try an entry like this:

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.2 - 2.6.31.5-0.1
    root (hd0,0)
    kernel /boot/vmlinuz    root=/dev/sda1 
    initrd /boot/initrd

and see if you can boot on that. You can repair it fully later if it works.

BTW did you try a full, automatic repair using the install DVD?

I think it’s almost fixed. While still looking for answers I was reading up on grub and found the geometry command. I had attempted to use the grub command line before and it refused to display so I just double checked my devices.map file to make sure I had everything set right. Next boot cycle I figured I would try again now that I had something concrete to try. This time I was able to use grub>. During the boot grub has decided to reverse the drives from their order in devices.map. I don’t know if I caused this by some other troubleshooting attempt or if it is related to a (what I considered unrelated) problem my BIOS has with detecting hard drives on warm boots. Whatever the source. Just switching (hd0) and (hd1) in menu.lst solved the problem.

I still don’t know why the install disk “Rescue System” mounted the ext3 file system with all of those question marks but the file system checks out clean. I would guess that is why Recovery found no valid root partitions and why none of the other recovery options I chose worked. (No I did not use the Automatic recovery option. I chose the options I thought were apropos.)

Now I just have to figure out why cold boot works fine but warm boots leave me with no processor and no hard drives even though this has never been a problem in the past.

Unless someone thinks that problem is related to the grub problem, I’m going to consider this solved. Thanks for the help even though it seems this was mostly at user error problem. :shame:

These sorts of confusions began with the arrival of sata drives IMO.