# Kernel Panic message when i start my computer

## Prapi

Sometimes, when i start my computer (about 1 in 5 times) i get the following message:

 *Quote:*   

> No filesystem could mount root, tried: reiserfs ext3 ext2 squashfs vfat iso9660 udf xfs
> 
> Kernel Panic-not syncing: VFS: unable to mount rootfs on unknown-block (1,0)
> 
> 

 

What do i have to do to fix this?

EDIT: i think this started happening after the installation of gnome...

----------

## RazielFMX

Gnome should not (in theory) have caused this.  First, can you post your fstab and your grub.conf?

Thanks!

----------

## gundelgauk

Yes, please post fstab and grub.conf.

Also, what kind of hard drive are you using (SATA, PATA, ...?), which controller does your mainboard have (output of lspci) and how did you compile the drivers (directly into the kernel or as modules?)?

----------

## d2_racing

Also, you should post the exact error and also, do you have anything in the dmesg when your box sucessfully boots ?

----------

## Prapi

@RazielFMX

fstab:

/dev/hda1 /boot ext2 noauto noatime 1 2

/dev/hda3 /       ext3 noatime 0 1

/dev/hda2 none swap sw 0 0

I cant find my grub.conf (i made it exactly like described in the gentoo handbooks), i looked in /boot/grub/grub.conf but this file seems to be empty. (I'm sure i made it though!).

@ gundelgauk

lspci output can be found here:

https://forums.gentoo.org/viewtopic-t-669509-highlight-modules.html

i have an IDE harddisk.

i compiled the kernel using genkernel.

@d2_racing

I don't understand what you mean with the exact error. I thought this was the error?

And what is dmesg?

----------

## RazielFMX

 *Prapi wrote:*   

> @RazielFMX
> 
> fstab:
> 
> /dev/hda1 /boot ext2 noauto noatime 1 2
> ...

 

You are not mounting /boot automatically...  To see your /boot/grub/grub.conf, please do the following as root:

```

mount -o noatime /dev/hda1 /boot

```

That should do it, provided /boot is empty (besides the lost+found).

----------

## Prapi

grub.conf

```
default 0

timeout 30

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

title=Gentoo Linux 2.6.23-r9

root (hd0,0)

kernel /boot/kernel-genkernel-x86-2.6.23-gentoo-r9 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev

initrd /boot/initramfs-genkernel-x86-2.6.23-gentoo-r9
```

----------

## d2_racing

I think that you don't need the /boot thing, because you have a separate partition, so you don't need this.

```

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

kernel /kernel-genkernel-x86-2.6.23-gentoo-r9 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev 

initrd /initramfs-genkernel-x86-2.6.23-gentoo-r9

```

----------

## RazielFMX

The /boot is fine, since /boot is symlinked to itself when you install grub:

```

alexiea ~ # cd /boot

alexiea boot # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/hda1                85528      5143     75969   7% /boot

alexiea boot # ls -l boot

lrwxrwxrwx 1 root root 1 Jun 19  2007 boot -> .

alexiea boot #

```

And I take full advantage of the symlink so that my grub.conf is easier for people to follow:

```

alexiea boot # cat /boot/grub/grub.conf

##Alexiea

default 0

timeout 8

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

title=Gentoo Linux 2.6.23-r9

root (hd0,0)

kernel /boot/kernel-2.6.23-gentoo-r9 root=/dev/hda3

```

EDIT:

 *Prapi wrote:*   

> grub.conf
> 
> ```
> default 0
> 
> ...

 

I personally have never used genkernel, but as far as I can tell, your grub.conf looks ok.

Could you do me a favor?  Could you unmount your /boot (umount /boot) and fsck it, posting the fsck output?

```
e2fsck -fpv /dev/hda1
```

Thanks!

----------

## Prapi

EDIT: will try  :Smile: 

----------

## Prapi

```
e2fsck -fpv /dev/hda1

      36 inodes used (0%)

       2 non-contiguous inodes (5.6%)

         aantal inodes met ind/dind/tind-blokken: 6/3/0

    6551 blocks used (20%)

       0 bad blocks

       0 large files

      22 regular files

       3 directories

       0 character device files

       0 block device files

       0 fifos

       0 links

       2 symbolic links (2 fast symbolic links)

       0 sockets

--------

      27 files

```

----------

## RazielFMX

Cool, no errors (that couldn't be fixed, -p makes it fix all but the most serious of errors automatically). 

So...  I'd reboot a few times, see if the error was corrected by e2fsck (which may have been).  If not...  well, I am running out of ideas and I'll have to do some more research...

----------

## Prapi

ok, i just got the error again. This is whats on the rest of my screen when the error occurs:

```

Cannot allocate resource for EISA slot 1

Cannot allocate resource for EISA slot 4

EISA: Detected 0 cards

TCP cubic registered

NET: registered protocol family 1

NET: registered protocol family 17

Using IPI No-Shortcut mode

input: ImExPS/2 Generic explorer mouse as /class/input/input1

md: Autodetecting RAID arrays

md: autorun ...

md: ... autorun DONE.

RAMDISK: compressed image found at block 0

crc error

UDF-fs: No partition found (1)

List of all partitions:

0300 117220824 hda-driver: ide-disk

  0301 32098 hda1

  0302 506047 hda2

  0303 116680095 hda3

0340 4194302 hdb driver: ide-cdrom

1600 4194302 hdc driver: ide-cdrom

No filesystem could mount root, tried: reiserfs ext3 ext2 squashfs vfat iso9660 udf xfs

Kernel Panic-not syncing: VFS: unable to mount rootfs on unknown-block (1,0) 

```

----------

## NeddySeagoon

Prapi,

```
unknown-block (1,0) 
```

is /dev/ram0 

Your initrd is supposed to be there, if you need one. 

```
RAMDISK: compressed image found at block 0 
```

suggests that your initrd was loaded, so I conclude that your kernel is missing ramdrive, initrd or ext2fs support.

Going by your grub.conf, posted earlier in the thread, both the kernel and initrd are loaded, the kernel starts and is initiialised then is unable to reed /dev/ram0 because it has one or more options missing.

----------

## Prapi

So what should i do to fix this?

----------

## RazielFMX

What you have is verbatim from the handbook...

Could you remount /boot and show me the contents of it?

```

mount -o noatime /dev/hda1 /boot

cd /boot

find . -type f -ls

```

----------

## Prapi

Yeah, i'm new to gentoo so i used the handbooks to learn how to install and work with gentoo  :Smile: 

```
find . -type f -ls

    13    0 -rw-r--r--   1 root     root            0 apr 20  2007 ./.keep

    14 1709 -rw-r--r--   1 root     root      1741752 mrt  7 23:19 ./kernel-genkernel-x86-2.6.23-gentoo-r9

    15  772 -rw-r--r--   1 root     root       786163 mrt  7 23:19 ./System.map-genkernel-x86-2.6.23-gentoo-r9

    16 2333 -rw-r--r--   1 root     root      2376912 mrt  7 23:36 ./initramfs-genkernel-x86-2.6.23-gentoo-r9

  6026    2 -rw-r--r--   1 root     root         1842 mrt  2 01:31 ./grub/grub.conf.sample

  6027   35 -rw-r--r--   1 root     root        33856 mrt  2 01:31 ./grub/splash.xpm.gz

  6029    1 -rw-r--r--   1 root     root          512 mrt  2 01:41 ./grub/stage1

  6030  104 -rw-r--r--   1 root     root       105436 mrt  2 01:41 ./grub/stage2

  6031    8 -rw-r--r--   1 root     root         8032 mrt  2 01:41 ./grub/e2fs_stage1_5

  6032    8 -rw-r--r--   1 root     root         7904 mrt  2 01:41 ./grub/fat_stage1_5

  6033    7 -rw-r--r--   1 root     root         7168 mrt  2 01:41 ./grub/ffs_stage1_5

  6034    8 -rw-r--r--   1 root     root         7200 mrt  2 01:41 ./grub/iso9660_stage1_5

  6035    9 -rw-r--r--   1 root     root         8672 mrt  2 01:41 ./grub/jfs_stage1_5

  6036    8 -rw-r--r--   1 root     root         7328 mrt  2 01:41 ./grub/minix_stage1_5

  6037   10 -rw-r--r--   1 root     root         9728 mrt  2 01:41 ./grub/reiserfs_stage1_5

  6038  104 -rw-r--r--   1 root     root       105436 mrt  2 01:31 ./grub/stage2_eltorito

  6039    8 -rw-r--r--   1 root     root         7520 mrt  2 01:41 ./grub/ufs2_stage1_5

  6040    7 -rw-r--r--   1 root     root         6752 mrt  2 01:41 ./grub/vstafs_stage1_5

  6041   10 -rw-r--r--   1 root     root         9384 mrt  2 01:41 ./grub/xfs_stage1_5

  6042    1 -rw-r--r--   1 root     root          280 mrt  2 01:40 ./grub/grub.conf

  6043    1 -rw-r--r--   1 root     root           15 mrt  2 01:41 ./grub/device.map

  6044    1 -rw-r--r--   1 root     root          197 mrt  2 01:41 ./grub/default

  6045    1 -rw-r--r--   1 root     root          280 mrt  7 23:36 ./grub/grub.conf.bak

```

I just recompiled the kernel, because i added modules for my soundcard  :Smile: 

----------

## NeddySeagoon

Prapi,

If you still get the same error, check you have initrd support and ext2 support.

Go into make menuconfig and press / to search.

----------

