# VFS: Cannot open root device -- Abandoned

## sheepdog

A gentoo system I have run without problems for some time suddenly will not boot.  The error on boot up is: *Quote:*   

> VFS: Cannot open root device "<NULL>" or unknown-block(3,7)

 If I boot from a live CD and attempt to mount /dev/hda1 the error is something like: *Quote:*   

> Cannot find SQUASHFS.  Specify the file system type.

 I believe it is ReiserFS file system.  However, I can mount /dev/hda5, which is the boot partition and has the linux kernel.  Any suggestions, please?Last edited by sheepdog on Mon Mar 19, 2007 12:21 am; edited 1 time in total

----------

## anello

Check the filesystem ... if it is reiserfs ... use reiserfsck ...

----------

## wynn

 *sheepdog wrote:*   

> A gentoo system I have run without problems for some time suddenly will not boot.  The error on boot up is: *Quote:*   VFS: Cannot open root device "<NULL>" or unknown-block(3,7) If I boot from a live CD and attempt to mount /dev/hda1 the error is something like:
> 
> ```
> Cannot find SQUASHFS.  Specify the file system type.
> ```
> ...

 According to the error message (unknown-block(3,7)) the root partition the kernel is trying to mount is /dev/hda7

 *sheepdog wrote:*   

> I believe it is ReiserFS file system.  However, I can mount /dev/hda5, which is the boot partition and has the linux kernel.  Any suggestions, please?

 Would you post your /etc/fstab and /boot/grub/grub.conf, please?

Before it stopped booting did you upgrade the kernel? What kernel are you running? Could you also post

```
ls -l /boot
```

----------

## sheepdog

 *anello wrote:*   

> Check the filesystem ... if it is reiserfs ... use reiserfsck ...

 How do I check the file system if I cannot mount the partition?  reiserfsck --check of the partition says *Quote:*   

> resiserfs superblock cannot be found

 

----------

## suicidal_orange_II

That was right, you check the partition.  From this you can be sure either that partition is not formatted in reiserfs, or it is really damaged (which sounds unlikely if it boots fine sometimes).  Try running some other fsck's on it - as you've seen if its not the right one it just errors without damaging any data.  When one works you'll know what type it is and we can help you more

Suicidal_Orange

----------

## sheepdog

 *wynn wrote:*   

> According to the error message (unknown-block(3,7)) the root partition the kernel is trying to mount is /dev/hda7

 With the LiveCD running there is no /dev/hda7.  in /dev there are 

/dev/hda1

/dev/hda5

/dev/hda6

fsck shows that there are 2 partitions:

/dev/hda5

/dev/hda6

hda5 is boot.  /dev/hda6 does not mount because "cannot find SQUASHFS". *Quote:*   

> 
> 
> Would you post your /etc/fstab and /boot/grub/grub.conf, please?

 

```

default 0

timeout 30

splashimage=(hd0,4)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.18-gentoo-r3

root (hd0,4)

kernel /vmlinuz real_root=/dev/hda7 init=3

title=Gentoo Linux 2.6.16-gentoo-r7

root (hd0,4)

kernel /vmlinuz-2.6.16-gentoo-r7 real_root=/dev/hda7 init=3

```

 *Quote:*   

> Before it stopped booting did you upgrade the kernel? What kernel are you running? Could you also post
> 
> ```
> ls -l /boot
> ```
> ...

 

```
total 13469

lrwxrwxrwx 1 root root      27 Dec  2 18:36 System.map -> System.map-2.6.18-gentoo-r3

-rw-r--r-- 1 root root  974868 Oct  2  2005 System.map-2.6.12-gentoo-r10

-rw-r--r-- 1 root root  974868 Oct  2  2005 System.map-2.6.12-gentoo-r10.old

-rw-r--r-- 1 root root  765728 Jun  4  2006 System.map-2.6.16-gentoo-r7

-rw-r--r-- 1 root root  823701 Dec  2 18:36 System.map-2.6.18-gentoo-r3

-rw-r--r-- 1 root root  822824 Dec  2 17:51 System.map-2.6.18-gentoo-r3.old

lrwxrwxrwx 1 root root      31 Dec  2 18:36 System.map.old -> System.map-2.6.18-gentoo-r3.old

lrwxrwxrwx 1 root root       1 Oct  2  2005 boot -> .

lrwxrwxrwx 1 root root      23 Dec  2 18:36 config -> config-2.6.18-gentoo-r3

-rw-r--r-- 1 root root   31027 Oct  2  2005 config-2.6.12-gentoo-r10

-rw-r--r-- 1 root root   31090 Oct  2  2005 config-2.6.12-gentoo-r10.old

-rw-r--r-- 1 root root   33465 Jun  4  2006 config-2.6.16-gentoo-r7

-rw-r--r-- 1 root root   35334 Dec  2 18:36 config-2.6.18-gentoo-r3

-rw-r--r-- 1 root root   35273 Dec  2 17:51 config-2.6.18-gentoo-r3.old

lrwxrwxrwx 1 root root      27 Dec  2 18:36 config.old -> config-2.6.18-gentoo-r3.old

drwxr-xr-x 2 root root    1024 Mar 18 13:12 grub

drwx------ 2 root root   12288 Oct  1  2005 lost+found

lrwxrwxrwx 1 root root      24 Dec  2 18:36 vmlinuz -> vmlinuz-2.6.18-gentoo-r3

-rw-r--r-- 1 root root 1939167 Oct  2  2005 vmlinuz-2.6.12-gentoo-r10

-rw-r--r-- 1 root root 1937123 Oct  2  2005 vmlinuz-2.6.12-gentoo-r10.old

-rw-r--r-- 1 root root 1703574 Jun  4  2006 vmlinuz-2.6.16-gentoo-r7

-rw-r--r-- 1 root root 1797714 Dec  2 18:36 vmlinuz-2.6.18-gentoo-r3

-rw-r--r-- 1 root root 1792104 Dec  2 17:51 vmlinuz-2.6.18-gentoo-r3.old

lrwxrwxrwx 1 root root      28 Dec  2 18:36 vmlinuz.old -> vmlinuz-2.6.18-gentoo-r3.old

```

----------

## sheepdog

 *suicidal_orange_II wrote:*   

> That was right, you check the partition.  From this you can be sure either that partition is not formatted in reiserfs, or it is really damaged (which sounds unlikely if it boots fine sometimes).  Try running some other fsck's on it - as you've seen if its not the right one it just errors without damaging any data.  When one works you'll know what type it is and we can help you more
> 
> Suicidal_Orange

 I'm pretty sure it is Reiserfs.  I don't see how to tell if it another type or just Reiserfs with a corrupt superblock by running reiserfsck on it.  Running e2fsck (the only other possibilty) also says that it could not find the superblock.

----------

## wynn

Thank you for posting all that !

One problem is in your grub.conf, you should have

```
kernel /vmlinuz root=/dev/hda6
```

and, for the other "kernel" line

```
kernel /vmlinuz-2.6.16-gentoo-r7 root=/dev/hda6
```

The reason the kernel is asking for /dev/hda7 is the "real_root=/dev/hda7", "real_root=" is only used when booting using a kernel/initramfs pair.

To find out what filesystem you have on /dev/hda6, run

```
blkid /dev/hda6
```

from the livecd, you will get something like

```
# blkid /dev/hda3

/dev/hda3: UUID="7687080a-45b9-40c5-8b41-399e05236bce" LABEL="2006.1-root" TYPE="reiserfs"
```

----------

## sheepdog

 *wynn wrote:*   

> The reason the kernel is asking for /dev/hda7 is the "real_root=/dev/hda7", "real_root=" is only used when booting using a kernel/initramfs pair.
> 
> To find out what filesystem you have on /dev/hda6, run
> 
> ```
> ...

 This command returns a line of the type you describe on /dev/hda5, but it returns nothing on /dev/hda6. 

I do not see how changing to root=/dev/hda6 in grub.conf will help if /dev/hda6 does not appear to have a valid file system.  When I try to boot with the revised grub.conf the error is: *Quote:*   

> Could not find a file systme.  Tried ext2, ext3, reiserfs, etc.

 

----------

## sheepdog

I have decided to wipe the disk and reinstall.  Thank you all who tried to help.

----------

## wynn

 *sheepdog wrote:*   

>  *wynn wrote:*   The reason the kernel is asking for /dev/hda7 is the "real_root=/dev/hda7", "real_root=" is only used when booting using a kernel/initramfs pair.
> 
> To find out what filesystem you have on /dev/hda6, run
> 
> ```
> ...

 No, it won't help but, when there is a valid filesystem on /dev/hda6, the correction will be one less problem to solve.

----------

