# [SOLVED] kernel panic not syncing vfs unable to mount root

## Al79

SOLUTION: enable CONFIG_MSDOS_PARTITION

 *Jaglover wrote:*   

> 
> 
>  *Quote:*   
> 
> # CONFIG_MSDOS_PARTITION is not set
> ...

 

Hi all,

I'm installing gentoo on a new notebook(ASUS N53SV it's an i7), and I have some trouble with hd. I tried with google, I don't know where is my mistake. I'm sure I forgot something, but I don't have a clue about what.

I'm not able to rewrite completely kernel error because the machine is freezed, but i copied by hand those lines:

```
[...]

VFS: Cannot open root device "sda6" or unknown-block(8,6)

kernel panic - not syncing: VFS: unable to mount root fs on unknow-block(8,6)

PID: 1, comm: swapper not tainted 3.0.6-gentoo #7

[...]

```

Following is my hardware configuration:

```
00:00.0 Host bridge: Intel Corporation Device 0104 (rev 09)

   Subsystem: ASUSTeK Computer Inc. Device 1147

   Flags: bus master, fast devsel, latency 0

   Capabilities: [e0] Vendor Specific Information: Len=0c <?>

00:01.0 PCI bridge: Intel Corporation Device 0101 (rev 09) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=01, subordinate=01, sec-latency=0

   I/O behind bridge: 0000d000-0000dfff

   Memory behind bridge: db000000-dc0fffff

   Prefetchable memory behind bridge: 00000000c0000000-00000000d1ffffff

   Capabilities: [88] Subsystem: ASUSTeK Computer Inc. Device 1147

   Capabilities: [80] Power Management version 3

   Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [a0] Express Root Port (Slot+), MSI 00

   Capabilities: [100] Virtual Channel

   Capabilities: [140] Root Complex Link

00:02.0 VGA compatible controller: Intel Corporation Device 0116 (rev 09) (prog-if 00 [VGA controller])

   Subsystem: ASUSTeK Computer Inc. Device 1642

   Flags: bus master, fast devsel, latency 0, IRQ 47

   Memory at dc400000 (64-bit, non-prefetchable) [size=4M]

   Memory at b0000000 (64-bit, prefetchable) [size=256M]

   I/O ports at e000 [size=64]

   Expansion ROM at <unassigned> [disabled]

   Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [d0] Power Management version 2

   Capabilities: [a4] PCI Advanced Features

00:16.0 Communication controller: Intel Corporation Cougar Point HECI Controller #1 (rev 04)

   Subsystem: ASUSTeK Computer Inc. Device 1147

   Flags: bus master, fast devsel, latency 0, IRQ 11

   Memory at df00b000 (64-bit, non-prefetchable) [size=16]

   Capabilities: [50] Power Management version 3

   Capabilities: [8c] MSI: Enable- Count=1/1 Maskable- 64bit+

00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 05) (prog-if 20 [EHCI])

   Subsystem: ASUSTeK Computer Inc. Device 1147

   Flags: bus master, medium devsel, latency 0, IRQ 16

   Memory at df008000 (32-bit, non-prefetchable) [size=1K]

   Capabilities: [50] Power Management version 2

   Capabilities: [58] Debug port: BAR=1 offset=00a0

   Capabilities: [98] PCI Advanced Features

00:1b.0 Audio device: Intel Corporation Cougar Point High Definition Audio Controller (rev 05)

   Subsystem: ASUSTeK Computer Inc. Device 1063

   Flags: bus master, fast devsel, latency 0, IRQ 5

   Memory at df000000 (64-bit, non-prefetchable) [size=16K]

   Capabilities: [50] Power Management version 2

   Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+

   Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00

   Capabilities: [100] Virtual Channel

   Capabilities: [130] Root Complex Link

00:1c.0 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 1 (rev b5) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=02, subordinate=02, sec-latency=0

   I/O behind bridge: 0000c000-0000cfff

   Memory behind bridge: de600000-deffffff

   Prefetchable memory behind bridge: 00000000d4200000-00000000d4bfffff

   Capabilities: [40] Express Root Port (Slot+), MSI 00

   Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 1147

   Capabilities: [a0] Power Management version 2

00:1c.1 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 2 (rev b5) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=03, subordinate=03, sec-latency=0

   I/O behind bridge: 0000b000-0000bfff

   Memory behind bridge: ddc00000-de5fffff

   Prefetchable memory behind bridge: 00000000d3700000-00000000d40fffff

   Capabilities: [40] Express Root Port (Slot+), MSI 00

   Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 1147

   Capabilities: [a0] Power Management version 2

00:1c.3 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 4 (rev b5) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=04, subordinate=04, sec-latency=0

   I/O behind bridge: 0000a000-0000afff

   Memory behind bridge: dd200000-ddbfffff

   Prefetchable memory behind bridge: 00000000d2c00000-00000000d35fffff

   Capabilities: [40] Express Root Port (Slot+), MSI 00

   Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 1147

   Capabilities: [a0] Power Management version 2

00:1c.5 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 6 (rev b5) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=05, subordinate=05, sec-latency=0

   I/O behind bridge: 00009000-00009fff

   Memory behind bridge: dc800000-dd1fffff

   Prefetchable memory behind bridge: 00000000d2100000-00000000d2afffff

   Capabilities: [40] Express Root Port (Slot+), MSI 00

   Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 1147

   Capabilities: [a0] Power Management version 2

00:1d.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])

   Subsystem: ASUSTeK Computer Inc. Device 1147

   Flags: bus master, medium devsel, latency 0, IRQ 23

   Memory at df007000 (32-bit, non-prefetchable) [size=1K]

   Capabilities: [50] Power Management version 2

   Capabilities: [58] Debug port: BAR=1 offset=00a0

   Capabilities: [98] PCI Advanced Features

00:1f.0 ISA bridge: Intel Corporation Device 1c49 (rev 05)

   Subsystem: ASUSTeK Computer Inc. Device 1147

   Flags: bus master, medium devsel, latency 0

   Capabilities: [e0] Vendor Specific Information: Len=0c <?>

00:1f.2 SATA controller: Intel Corporation Cougar Point 6 port SATA AHCI Controller (rev 05) (prog-if 01 [AHCI 1.0])

   Subsystem: ASUSTeK Computer Inc. Device 1147

   Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 45

   I/O ports at e0b0 [size=8]

   I/O ports at e0a0 [size=4]

   I/O ports at e090 [size=8]

   I/O ports at e080 [size=4]

   I/O ports at e060 [size=32]

   Memory at df006000 (32-bit, non-prefetchable) [size=2K]

   Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [70] Power Management version 3

   Capabilities: [a8] SATA HBA v1.0

   Capabilities: [b0] PCI Advanced Features

00:1f.3 SMBus: Intel Corporation Cougar Point SMBus Controller (rev 05)

   Subsystem: ASUSTeK Computer Inc. Device 1147

   Flags: medium devsel, IRQ 18

   Memory at df005000 (64-bit, non-prefetchable) [size=256]

   I/O ports at e040 [size=32]

01:00.0 VGA compatible controller: nVidia Corporation Device 0df4 (rev a1) (prog-if 00 [VGA controller])

   Subsystem: ASUSTeK Computer Inc. Device 1642

   Flags: bus master, fast devsel, latency 0, IRQ 16

   Memory at db000000 (32-bit, non-prefetchable) [size=16M]

   Memory at c0000000 (64-bit, prefetchable) [size=256M]

   Memory at d0000000 (64-bit, prefetchable) [size=32M]

   I/O ports at d000 [size=128]

   Expansion ROM at dc000000 [disabled] [size=512K]

   Capabilities: [60] Power Management version 3

   Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+

   Capabilities: [78] Express Endpoint, MSI 00

   Capabilities: [b4] Vendor Specific Information: Len=14 <?>

   Capabilities: [100] Virtual Channel

   Capabilities: [128] Power Budgeting <?>

   Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>

03:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

   Subsystem: Device 1a3b:2c37

   Flags: bus master, fast devsel, latency 0, IRQ 17

   Memory at ddc00000 (64-bit, non-prefetchable) [size=64K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [60] Express Legacy Endpoint, MSI 00

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Virtual Channel

   Capabilities: [160] Device Serial Number 00-15-17-ff-ff-24-14-12

   Capabilities: [170] Power Budgeting <?>

04:00.0 USB Controller: Device 1b73:1000 (rev 04) (prog-if 30)

   Subsystem: ASUSTeK Computer Inc. Device 1039

   Flags: bus master, fast devsel, latency 0, IRQ 19

   Memory at dd200000 (32-bit, non-prefetchable) [size=64K]

   Capabilities: [50] Power Management version 3

   Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+

   Capabilities: [80] Express Endpoint, MSI 00

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

   Subsystem: ASUSTeK Computer Inc. U6V laptop

   Flags: bus master, fast devsel, latency 0, IRQ 46

   I/O ports at 9000 [size=256]

   Memory at d2104000 (64-bit, prefetchable) [size=4K]

   Memory at d2100000 (64-bit, prefetchable) [size=16K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+

   Capabilities: [70] Express Endpoint, MSI 01

   Capabilities: [b0] MSI-X: Enable- Count=4 Masked-

   Capabilities: [d0] Vital Product Data

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Virtual Channel

   Capabilities: [160] Device Serial Number 00-42-10-35-68-4c-e0-00

```

my partition table:

```
    sda1                    Primary   swap                 20003.89

    sda2        Boot    Primary   ntfs                   300000.64

    sda3                    Primary   ntfs                   50001.48

    sda5                    Logical   ext4                   1003.49

    sda6                    Logical   ext4                   39999.54

    sda7                    Logical   ext4                   39999.54

    sda8                    Logical   ext4                   299147.83

```

this is my grub config file:

```
title Gentoo(sda6-3.0.6-gentoo)

password --md5 stuff :)

lock

#kernel (hd0,4)/gentoo/gentoo-sda6-3.0.6 root=UUID=5bf5eac7-0d90-4428-9ba6-4fdff02ec09c 

#kernel (hd0,4)/gentoo/gentoo-sda6-3.0.6 root=/dev/sda6 

kernel (hd0,4)/gentoo/gentoo-sda6-3.0.6 root=0806

```

as you can see I tried several grub configuration UUID, sda# and hex (major, minor) partitions number according to my ls:

```
# ls -l /dev/sda6

brw-rw---- 1 root disk 8, 6 Dec  8 11:07 /dev/sda6

# ls -l /dev/disk/by-uuid/

lrwxrwxrwx 1 root root 10 Dec  8 11:07 5bf5eac7-0d90-4428-9ba6-4fdff02ec09c -> ../../sda6

```

this is my fstab:

```
#swap sda1 53698f39-b75a-4181-915f-f666a56a8fdc :

UUID=53698f39-b75a-4181-915f-f666a56a8fdc none          swap            sw              0 0

#boot sda5 ed91e2dc-5c4a-402b-bc02-d00fa23818b3 :

UUID=ed91e2dc-5c4a-402b-bc02-d00fa23818b3 /boot         ext4            noauto,noatime  1 2

#root sda6 5bf5eac7-0d90-4428-9ba6-4fdff02ec09c :

UUID=5bf5eac7-0d90-4428-9ba6-4fdff02ec09c /             ext4            noatime         0 1

#home sda8 e23f79e1-e447-42cb-845a-3c64f22577f3 :

UUID=e23f79e1-e447-42cb-845a-3c64f22577f3 /home         ext4            noatime,barrier=0               0 3

/dev/cdrom              /mnt/cdrom      iso9660         noauto,ro,user  0 0

/dev/fd0                /mnt/floppy     auto            noauto          0 0

none            /proc   proc    defaults 0 0

none            /dev/shm tmpfs defaults 0 0

tmpfs           /var/tmp/portage tmpfs auto,size=3000M,nr_inodes=1M,auto 0 0

```

this is the full kernel config file while the following should be what you need:

```
CONFIG_SATA_PMP=y

CONFIG_SATA_AHCI=y

CONFIG_SATA_AHCI_PLATFORM=y

CONFIG_SATA_ACARD_AHCI=y

```

while I tried to add and remove pata compability stuff(actually it's enabled):

```
CONFIG_PATA_OLDPIIX=y

CONFIG_PATA_SCH=y

CONFIG_PATA_LEGACY=y

```

following this thread I checked my SMP, but mine was enabled form the first time I compiled the kernel(even if it shouldn't matter): 

```
CONFIG_X86_32_SMP=y

CONFIG_USE_GENERIC_SMP_HELPERS=y

CONFIG_SMP=y

CONFIG_PM_SLEEP_SMP=y

CONFIG_HAVE_TEXT_POKE_SMP=y

```

Any help would be greatly appreciated.

ThanksLast edited by Al79 on Thu Dec 08, 2011 1:19 pm; edited 2 times in total

----------

## cach0rr0

your partitions are visible to the kernel, however it hasn't any idea what to do with them

grep 'EXT4' .config

if ext4 is built as module, and not built-in, i would expect you to have this error

----------

## Al79

 *cach0rr0 wrote:*   

> your partitions are visible to the kernel, however it hasn't any idea what to do with them
> 
> grep 'EXT4' .config
> 
> if ext4 is built as module, and not built-in, i would expect you to have this error

 

Thanks for your replay. 

```
CONFIG_EXT4_FS=y

CONFIG_EXT4_FS_XATTR=y

CONFIG_EXT4_FS_SECURITY=y

```

----------

## krinn

 *info grub wrote:*   

> 
> 
> Note that the partition numbers for extended partitions are
> 
> counted from `4', regardless of the actual number of primary partitions
> ...

 

So first one is x,4 and next one is x,5

Your boot partition is the first extended partition, so your root is that one +1 -> hd0,5

----------

## cach0rr0

 *krinn wrote:*   

>  so your root is that one +1 -> hd0,5

 

which should be sda6

----------

## krinn

yes  :Smile: 

but i don't see where you saw that

 *Quote:*   

> your partitions are visible to the kernel,

 

----------

## Al79

I copied some error message lines:

```
VFS: Cannot open root device "sda6" or unknown-block(8,6)

please append a correct "root=" boot option; here are the available partitions:

0800   73257458 sda driver: sd

0b00     1048575 sr0 driver: sr

kernel panic - not syncing: VFS: unable to mount root fs on unknow-block(8,6)

PID: 1, comm: swapper not tainted 3.0.6-gentoo #7 

call trace:

[<c1487227>] ? panic+0x40/0x12b

[<c16b591b>] ? mount_block_root+0x1d5/0x1e9

[<c16b5a2d>] ? mount_root+0x39/0x4d

[<c16b55c0>] ? start_kernel+0x258/0x258

[<c16b5b71>] ? prepare_namespace+0x130/0x156

[<c16b56a9>] ? kernel_init+0xe9/0xf2

[<c1489676>] ? kernel_thread_helper+0x6/0xd

```

Maybe it's useless, but as you can see the system can't recognize partitions...as supposed by cach0rr0.

For this reason I guess the trouble is related with some module not loaded(or some other parts not built-in)

...but I don't have a clue where my mistake could be. 

I enabled/disabled the following options:

```
CONFIG_EXPERIMENTAL=y

# CONFIG_STANDALONE is not set

# CONFIG_PREVENT_FIRMWARE_BUILD is not set

```

to see if there is some alpha driver that could help, but I can't find any useful stuff. 

If you need some further info, please ask.

I hope this further error description could be useful.

Thanks all

----------

## Jaglover

 *Quote:*   

> # CONFIG_MSDOS_PARTITION is not set

 

Kernel makes it to the hard drive and gets stuck.

----------

## Al79

 *Jaglover wrote:*   

>  *Quote:*   # CONFIG_MSDOS_PARTITION is not set 
> 
> Kernel makes it to the hard drive and gets stuck.

 

I didn't understand why, but it worked!

What does matter the MSDOS partition with an ext4 root partition? 

Sorry but i didn't catch it.

Thanks all for your help

----------

## Jaglover

It's quite simple, actually. This option turns on support for DOS partition table. Without reading it kernel does not know where your partitions are. Reading the filesystem from given partition is the next step.

----------

## Al79

 *Jaglover wrote:*   

> It's quite simple, actually. This option turns on support for DOS partition table. Without reading it kernel does not know where your partitions are. Reading the filesystem from given partition is the next step.

 

Ah ok, thanks for your explanation

----------

