# (Yet another) Kernel panic - not syncing VFS

## Xander314

[url]I've been trying to install Gentoo on my Core 2 quad system for a while now. I just tried it on an old AMD sempron and that one went by without problem. However, on the main system I'm getting the usual kernel panic error "not syncing VFS".

I've tried Google a lot, but nothing I've found has helped me. My boot partition is ext2 and my other partitions are ext4. Both are enabled in the kernel. I have enabled the "tmpfs virtual memory file system support" and "/proc file system support". I know this problem is often because the kernel can't mount the root filesystem. As I said, I have the right file system drivers built in. The relevant part of my grub config file is as follows. I was unable to precisely follow the instruction of the Gentoo handbook since I am using Grub 2 (installed by Linux Mint's installer).

```

menuentry "Gentoo Linux (3.0.6) (on /dev/sdc7)" --class gnu-linux --class gnu --class os {

   insmod part_msdos

   insmod ext2

   set root='(/dev/sdc,msdos5)'

   search --no-floppy --fs-uuid --set=root a6bfd365-1504-44fc-9cb4-c1568e06544c

   linux /gentoo-3.0.6 root=UUID=d1cee2f1-d46d-47fd-94a6-22f7feb463d8

}

```

Disk UUIDs:

a6bfd365-1504-44fc-9cb4-c1568e06544c : /dev/sdc5

d1cee2f1-d46d-47fd-94a6-22f7feb463d8 : /dev/sdc7

Here is /etc/fstab

```

/dev/sdc5      /boot      ext2      noauto         1 2

/dev/sdc6      none      swap      sw         0 0

/dev/sdc7      /      ext4      noatime         0 1

/dev/sda1      /share      ntfs      defaults      0 2

/dev/sdb1      /home      ext4      defaults      0 2

/dev/cdrom      /mnt/cdrom   auto      noauto,user      0 0

proc         /proc      proc      defaults      0 0

shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0

```

I'm not sure if there are any particular parts of the kernel .config file that are relevant, but I have uploaded the whole thing to PasteBin:

http://pastebin.com/JXJCC8jP

Let me know if you want specific parts posted here.

Any ideas as to what I can do to fix it? Should I just enable everything and incrementally disable things again?[/url]

----------

## eccerr0r

What are you using for your initrd/initramfs?  Did you use genkernel to build your initrd? 

I'm not sure how to specify the initrd in grub2 but you'll need to specify it somehow.  Without it, UUID will not work and you must use /dev/sdXXX hardcoded devices.

----------

## Xander314

Okay, I wasn't aware of that. Unfortunately it didn't help  :Sad:  Here's my updated section of the grub file:

```

menuentry "Gentoo Linux (3.0.6)" {

set root=(hd0,5)

linux /boot/gentoo-3.0.6 root=(hd0,7) quiet splash

}

```

I get the same error. If it helps, the next part of the message says something about Gentoo 3.2.1 being "not tainted".

EDIT: Oh, and I assume the (hdX,Y) notation counts as "hardcoded devices". GRUB doesn't seem to accept /dev/sda1 etc.

----------

## NeddySeagoon

Xander314,

```
linux /boot/gentoo-3.0.6 root=(hd0,7) quiet splash 
```

the root= in there is just passed to the kernel.  Grub shuld not try to parse it.

Anyway, you kernel is being loaded.  The panic will finish with unknown-block (x,y)   What are x and y?

This normally means you are missing hardware support ot filesystem support in your kernel.

Please post your lspci -k output and the filesystem you have on your root partition.

----------

## eccerr0r

I'm basing this off of what I know about grub0.9x which is what I use.

The (hdX,Y) are Grub identifiers for the "BIOS" hard disk devices.

The "set root" command in GRUB tells what "root" filesystem GRUB should use to locate files, but has nothing to do with what the kernel/Linux uses to locate the files.  This only lets Grub to find where your kernel (and initramfs) is/are.

The "root=" in your kernel command line (using the kernel= command in grub 0.9x) specifies the "root" of what the linux kernel should use.  Now here's the confusing part, linux and grub use different identifier schemes (AFAIK).  I usually have root=/dev/sdc7 or whatever the disk ends up being.  The exact device used is determined by the kernel disk enumerations and not all configurations are detected automatically - this is why software raid and logical volume management partitions confuse the kernel.  An initrd/initramfs is the helper to make these situations work correctly.

Might need to look into how to build an initramfs/initrd if you have many disks in your machine.  This will reduce chances of boot failure if the kernel decides to change the device numbering...

----------

## Xander314

 *Quote:*   

> the root= in there is just passed to the kernel. Grub shuld not try to parse it. 

 

Okay, I changed that to /dev/sdc7. And it's working now, so I guess the problem must have been using the (hdX,Y) notation and/or the UUID notation.

Thanks everyone! I'm glad to have Gentoo booting at last. Now I just need to fix the ethernet and set up GNOME...  :Wink: 

----------

