Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel panic: VFS: Unable to mount root fs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jorgito
n00b
n00b


Joined: 06 Mar 2007
Posts: 1

PostPosted: Tue Mar 06, 2007 1:06 am    Post subject: Kernel panic: VFS: Unable to mount root fs Reply with quote

Well... I actually know this is a recursive question, but I coudn't find a solution by myself...

This is the error I get when I try to start with my brand new kernel 2.6.20.1....

I run my Linux on a SATA disk, and root is the second partition, so it's /dev/sda2...

This is the entry on grub:
Code:

title           kernel 2.6.20.1
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.20.1 root=/dev/sda2 all-generic-ide ro quiet splash
boot


Most forums comments that the solution is to add the "root=..." option, bot not here.
I haven't a /boot partition, so I run the kernel from the root partition.

Others comments that the problem could be the fstab file, probably bad configured. I think it's not, but this is the entry on fstab:
Code:
/dev/sda2       /               ext3    defaults,errors=remount-ro 0       1


Finally the last solution I founded is to add on kernel support for the File System I am using onmy root FS, and I did...
Code:
<*> Second extended fs support
  [*]   Ext2 extended attributes
  [*]     Ext2 POSIX Access Control Lists
  [*]     Ext2 Security Labels
  [ ]   Ext2 execute in place support
<*> Ext3 journalling file system support
  [*]   Ext3 extended attributes
  [*]     Ext3 POSIX Access Control Lists
  [*]     Ext3 Security Labels


I really cannot figure where's the problem.... what am I doing wrong?

Thanks a lot
Back to top
View user's profile Send private message
big
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jan 2007
Posts: 87

PostPosted: Tue Mar 06, 2007 3:18 am    Post subject: Reply with quote

make sure you have built the sata driver directly into the kernel.
_________________
be big,no bug
Back to top
View user's profile Send private message
rodia
n00b
n00b


Joined: 29 Dec 2005
Posts: 16
Location: 43° 36 North, 1° 26 West

PostPosted: Tue Mar 06, 2007 11:14 am    Post subject: Kernel panic: VFS: Unable to mount root fs Reply with quote

Hello everyone,

Here is a shot of my Grub conf :

Code:

title=Gentoo Linux 2.6.19r5
root  (hd0,3)
kernel  /boot/kernel-2.6.19-gentoo-r5  root=/dev/sda7

title=Gentoo Linux 2.6.15r1
root  (hd0,3)
kernel  /boot/kernel-2.6.15-gentoo-r1  root=/dev/sda7


I'm having your same problem while i'm trying to boot on Gentoo Linux 2.6.19r5
the root filesystem isnt mounted and i've goot a VFS Kernel Panic...

So i tried to copy kernel-2.6.15 config file to kernel-2.6.19 and while doing
a make menuconfig I realized that :

Code:

root  /usr/src/linux # make menuconfig
scripts/kconfig/mconf arch/i386/Kconfig
.config:19:warning: trying to assign nonexistent symbol CLEAN_COMPILE
.config:36:warning: trying to assign nonexistent symbol KOBJECT_UEVENT
.config:50:warning: trying to assign nonexistent symbol CC_ALIGN_FUNCTIONS
.config:51:warning: trying to assign nonexistent symbol CC_ALIGN_LABELS
.config:52:warning: trying to assign nonexistent symbol CC_ALIGN_LOOPS
.config:53:warning: trying to assign nonexistent symbol CC_ALIGN_JUMPS
.config:62:warning: trying to assign nonexistent symbol OBSOLETE_MODPARM
.config:236:warning: trying to assign nonexistent symbol PCI_LEGACY_PROC
.config:327:warning: trying to assign nonexistent symbol IP_NF_MATCH_LIMIT
.config:329:warning: trying to assign nonexistent symbol IP_NF_MATCH_MAC
.config:330:warning: trying to assign nonexistent symbol IP_NF_MATCH_PKTTYPE
.config:331:warning: trying to assign nonexistent symbol IP_NF_MATCH_MARK
.config:332:warning: trying to assign nonexistent symbol IP_NF_MATCH_MULTIPORT
.config:336:warning: trying to assign nonexistent symbol IP_NF_MATCH_DSCP
.config:337:warning: trying to assign nonexistent symbol IP_NF_MATCH_AH_ESP
.config:338:warning: trying to assign nonexistent symbol IP_NF_MATCH_LENGTH
.config:340:warning: trying to assign nonexistent symbol IP_NF_MATCH_TCPMSS
.config:341:warning: trying to assign nonexistent symbol IP_NF_MATCH_HELPER
.config:342:warning: trying to assign nonexistent symbol IP_NF_MATCH_STATE
.config:343:warning: trying to assign nonexistent symbol IP_NF_MATCH_CONNTRACK
.config:346:warning: trying to assign nonexistent symbol IP_NF_MATCH_REALM
.config:347:warning: trying to assign nonexistent symbol IP_NF_MATCH_SCTP
.config:348:warning: trying to assign nonexistent symbol IP_NF_MATCH_DCCP
.config:349:warning: trying to assign nonexistent symbol IP_NF_MATCH_COMMENT
.config:351:warning: trying to assign nonexistent symbol IP_NF_MATCH_STRING
.config:357:warning: trying to assign nonexistent symbol IP_NF_TARGET_NFQUEUE
.config:368:warning: trying to assign nonexistent symbol IP_NF_TARGET_DSCP
.config:369:warning: trying to assign nonexistent symbol IP_NF_TARGET_MARK
.config:370:warning: trying to assign nonexistent symbol IP_NF_TARGET_CLASSIFY
.config:373:warning: trying to assign nonexistent symbol IP_NF_TARGET_NOTRACK
.config:688:warning: trying to assign nonexistent symbol SCSI_SATA
.config:689:warning: trying to assign nonexistent symbol SCSI_SATA_AHCI
.config:690:warning: trying to assign nonexistent symbol SCSI_SATA_SVW
.config:691:warning: trying to assign nonexistent symbol SCSI_ATA_PIIX
.config:692:warning: trying to assign nonexistent symbol SCSI_SATA_MV
.config:693:warning: trying to assign nonexistent symbol SCSI_SATA_NV
.config:694:warning: trying to assign nonexistent symbol SCSI_PDC_ADMA
.config:695:warning: trying to assign nonexistent symbol SCSI_SATA_QSTOR
.config:696:warning: trying to assign nonexistent symbol SCSI_SATA_PROMISE
.config:697:warning: trying to assign nonexistent symbol SCSI_SATA_SX4
.config:698:warning: trying to assign nonexistent symbol SCSI_SATA_SIL
.config:699:warning: trying to assign nonexistent symbol SCSI_SATA_SIL24
.config:700:warning: trying to assign nonexistent symbol SCSI_SATA_SIS
.config:701:warning: trying to assign nonexistent symbol SCSI_SATA_ULI
.config:702:warning: trying to assign nonexistent symbol SCSI_SATA_VIA
.config:703:warning: trying to assign nonexistent symbol SCSI_SATA_VITESSE
.config:704:warning: trying to assign nonexistent symbol SCSI_SATA_INTEL_COMBINED
.config:728:warning: trying to assign nonexistent symbol SCSI_QLA2XXX
.config:729:warning: trying to assign nonexistent symbol SCSI_QLA21XX
.config:730:warning: trying to assign nonexistent symbol SCSI_QLA22XX
.config:731:warning: trying to assign nonexistent symbol SCSI_QLA2300
.config:732:warning: trying to assign nonexistent symbol SCSI_QLA2322
.config:733:warning: trying to assign nonexistent symbol SCSI_QLA6312
.config:734:warning: trying to assign nonexistent symbol SCSI_QLA24XX
.config:793:warning: trying to assign nonexistent symbol IEEE1394_CMP
.config:984:warning: trying to assign nonexistent symbol SERIAL_8250_ACPI
.config:1115:warning: trying to assign nonexistent symbol FB_RADEON_OLD
.config:1303:warning: trying to assign nonexistent symbol OBSOLETE_OSS_USB_DRIVER
.config:1337:warning: trying to assign nonexistent symbol USB_MTOUCH
.config:1338:warning: trying to assign nonexistent symbol USB_ITMTOUCH
.config:1339:warning: trying to assign nonexistent symbol USB_EGALAX
.config:1482:warning: trying to assign nonexistent symbol RELAYFS_FS


for info : /usr/src/linux -> /usr/src/linux-2.6.19-gentoo-r5

I guess that somewhere in these nonexistent symbol there is a missing driver for ATA1
or IDE Control... but can"t guess what even after reading
/usr/src/linux/Documentation/ide.txt
It's quite chinese for me these IDE and Serial ATA stuffs (if u have any helping link).

Thanks for any help so that i could use linux-2.6.19 or next

Red.
_________________
Having the choice is a choice that we do.
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Tue Mar 06, 2007 11:33 am    Post subject: Reply with quote

there is a quick way to find out the problem:
https://forums.gentoo.org/viewtopic-p-3682124.html#3682124
but you need 2 computer on a network and netcat
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Tue Mar 06, 2007 11:47 am    Post subject: Reply with quote

You can find out what is necessary to configure in your kernel from [FAQ] KC13: I just installed a new kernel and it won't boot: specifically, for 2.6.19, "2) Kernel panic — VFS error:" > "3) SATA and new, experimental, PATA in kernels 2.6.19 and later"
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
rodia
n00b
n00b


Joined: 29 Dec 2005
Posts: 16
Location: 43° 36 North, 1° 26 West

PostPosted: Tue Mar 06, 2007 12:59 pm    Post subject: Reply with quote

hehe Thankx GNUtoo for the hint on how-to check whats going wrong.

Anyway, I guess i understood whats happening.
I compared the boot mesg (dmesg) of my stable kernel 2.6.15
with what i saw in the boot window of my try-to-make-it-smooth kernel-2.6.19
and i saw that I didnt have libata loading while booting kernel-2.6.19
that's why I can't mount my root fs thus have a kernel panic.
Here is what i get in my dmesg of kernel 2.6.15

Code:

confused user #  dmesg  | grep -i ata
 BIOS-e820: 000000003f688c00 - 000000003f68ac00 (ACPI data)
Memory: 903124k/917504k available (3340k kernel code, 13960k reserved, 977k data, 220k init, 0k highmem)
hda: SONY CD-RW/DVD-ROM CRX310EE, ATAPI CD/DVD-ROM drive
hda: ATAPI 48X DVD-ROM CD-R/RW drive, 1536kB Cache, UDMA(33)
libata version 1.20 loaded.
ata_piix 0000:00:1f.2: version 1.05
ata1: SATA max UDMA/133 cmd 0xFE00 ctl 0xFE12 bmdma 0xFEA0 irq 18
ata2: SATA max UDMA/133 cmd 0xFE20 ctl 0xFE32 bmdma 0xFEA8 irq 18
ata1: dev 0 cfg 49:2f00 82:746b 83:7f01 84:4023 85:7469 86:3e01 87:4023 88:20ff
ata1: dev 0 ATA-7, max UDMA7, 156250000 sectors: LBA48
ata1: dev 1 cfg 49:2f00 82:7c6b 83:7f09 84:4773 85:7c69 86:3e01 87:4763 88:207f
ata1: dev 1 ATA-7, max UDMA/133, 160086528 sectors: LBA48
ata1: dev 0 configured for UDMA/133
ata1: dev 1 configured for UDMA/133
scsi0 : ata_piix
ATA: abnormal status 0xFF on port 0xFE27
ata2: disabling port
scsi1 : ata_piix
  Vendor: ATA       Model: SAMSUNG HD080HJ/  Rev: ZH10
  Vendor: ATA       Model: Maxtor 6V080E0    Rev: VA11
EXT3-fs: mounted filesystem with ordered data mode.
ReiserFS: sdb4: using ordered data mode
EXT3-fs: mounted filesystem with ordered data mode.


As far as my eyes can see, I didnt notice any ata1 either ata2
even libata loading lines in my kernel 2.6.19 boot message.

Here may be some reason.. although i dont think a warning
can prevent my libata from loading.

Code:

[snipping kernel compilation blabla]
 CC      drivers/acpi/cm_sbs.o
  LD      drivers/acpi/built-in.o
  CC      drivers/ata/libata-core.o
drivers/ata/libata-core.c: In function 'ata_pci_device_do_resume':
drivers/ata/libata-core.c:5914: warning: ignoring return value of 'pci_enable_device', declared with attribute warn_unused_result
  CC      drivers/ata/libata-scsi.o
  CC      drivers/ata/libata-sff.o
  CC      drivers/ata/libata-eh.o
  LD      drivers/ata/libata.o
  CC      drivers/ata/ata_generic.o
  LD      drivers/ata/built-in.o


I dont know why my libata won't load in 2.6.19
although it's compiling.

maybe I missed some config...
maybe it's not linked to the resulting image ?
Anyone ? hints ?
Anyone ? hugs ?

Red.
_________________
Having the choice is a choice that we do.
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Tue Mar 06, 2007 5:07 pm    Post subject: Reply with quote

Thank you for your interesting printout and the comparison between your 2.6.15 and 2.6.19.

/var/log/messages here doesn't show "libata loaded"at all although, at the beginning of the file, booting 2.6.17-gentoo-r7, ata-piix was used as the driver for the Intel ICH6 SATA chipset: AFAIK all messages that appear on the screen also go into /var/log/messages on a successful boot.

In 2.6.19-gentoo-r5, libata is shown as dependent on "ATA device support" at the top of "Serial ATA (prod) and Parallel ATA (experimental) drivers" and it appears to be a library used by the SATA drivers and not a separate module.

The reason ata1 and ata2 don't appear seems to be more likely to be that the ata-piix driver is a module not compiled in as it ought to be.

If you would like to post the output of "lspci | grep SATA" and "lspci -n" it will be possible to say definitely what driver supports your chipset.
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
rodia
n00b
n00b


Joined: 29 Dec 2005
Posts: 16
Location: 43° 36 North, 1° 26 West

PostPosted: Thu Mar 08, 2007 10:11 am    Post subject: Solved ! (at last for me: SATA intel chipset) Reply with quote

Thanks wynn for all this enlightment,

For a sorry, my lspci meaningful lines :

Code:

# lspci | grep IDE
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)
# lspci -n


I was watching modules in :
Device Drivers --> ATA/ATAPI/MFM/RLL support

While i found the SATA stuffs where in a separate section :
Device Drivers --> Serial ATA (prod) and Parallel ATA (experimental) drivers

I put support for Generic SATA Devices but that wasnt enough until
I found one of wynn's post that he/she sent to a similar thread for kernel 2.6.19-gentoo-r1
whith similar issues.
Wynn suggested the next configuration :

Code:

#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
...
CONFIG_BLK_DEV_IDECD=y
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_PIIX=y
CONFIG_BLK_DEV_IDEDMA=y
#
# SCSI device support
#
CONFIG_SCSI=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
#
# Serial ATA (prod) and Parallel ATA (experimental) drivers
#
CONFIG_ATA=y
CONFIG_SATA_AHCI=y
CONFIG_ATA_PIIX=y
CONFIG_SATA_INTEL_COMBINED=y

I did a minimum one (bcause I do not have any jukebox ehhe), see following conf :
Code:

#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
...
CONFIG_BLK_DEV_IDECD=y
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_PIIX=y
CONFIG_BLK_DEV_IDEDMA=y
#
# SCSI device support
#
CONFIG_SCSI=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
#
# Serial ATA (prod) and Parallel ATA (experimental) drivers
#
CONFIG_ATA=y
CONFIG_SATA_AHCI=y
CONFIG_ATA_PIIX=y


I didnt find any CONFIG_SATA_INTEL_COMBINED option
in my kernel 2.6.19-gentoo-r5 so I guess this is an option
that was left in kernel 2.6.19-gentoo-r1. (Sorry do not have time to verify)

Anyway I make clean && make && make modules_install then installed
the kernel and it works perfectly as I'm writing right now :D
(libata is now loaded at boot time since my hardware is recognized 8) )

So it's a nice end ("they all lived together and had many many children").

Thanks for you all.
This forum thing is really a good thing.

:idea: : Could we have Alphabetic orders of section in make menuconfig ?
See you all...

Red1
_________________
Having the choice is a choice that we do.
Back to top
View user's profile Send private message
rodia
n00b
n00b


Joined: 29 Dec 2005
Posts: 16
Location: 43° 36 North, 1° 26 West

PostPosted: Thu Mar 08, 2007 10:37 am    Post subject: more info Reply with quote

The option CONFIG_SATA_INTEL_COMBINED is automatically
set to "yes" (and added, coz i didnt see it before) after exiting
'make menuconfig'
and saving the conf file (/usr/src/linux/.config)

I wanned to add V4L supports and got VFS Kernel panic again grrr...

:?: is that 2.6.19-gentoo-r5 really stable :?:

For now i'm fine with no-v4l simple :
Linux localhost 2.6.19-gentoo-r5 #10 SMP PREEMPT Thu Mar 8 11:22:34 GMT 2007 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux

Red1
_________________
Having the choice is a choice that we do.
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Thu Mar 08, 2007 11:06 am    Post subject: Reply with quote

You may like to have a look at Updating KC11 — kernel compiling for the beginner which has advice for recompiling kernels, briefly: save the working config with a name different to .config and not in /usr/src/linux-2.6.19-gentoo-r5 and save the working kernel by renaming it with .old or .wkg on the end. You can then use the instructions at the end of KC11 to reboot your old kernel when/if the new one fails.

If you are just adding v4l support to a working .config, I can't see how this would cause a kernel panic: this would happen only when you remove (or change to a module) filesystem or disk support.

Perhaps you were using a copy of a non-working .config by mistake?

Unfortunately, the output from "lspci -n" has not made it into the post so, getting out my crystal ball: hmmm it's cloudy ... no it's clearing now and I see ...ata_piix for both the IDE and the SATA. Selected by
Code:
Device drivers -->
Serial ATA (prod) and Parallel ATA (experimental) drivers  -->
< >   Intel PIIX/ICH SATA support
SATA_INTEL_COMBINED is selected automatically by choosing the ata_piix driver.
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
rodia
n00b
n00b


Joined: 29 Dec 2005
Posts: 16
Location: 43° 36 North, 1° 26 West

PostPosted: Thu Mar 08, 2007 11:52 am    Post subject: Reply with quote

bah i'm so clumsy
I ran the command lspci -n but didnt even paste the output it in my previous post, here it is :

Code:

# lspci | grep IDE
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)
# lspci -n
00:00.0 0600: 8086:2770 (rev 02)
00:01.0 0604: 8086:2771 (rev 02)
00:02.0 0300: 8086:2772 (rev 02)
00:02.1 0380: 8086:2776 (rev 02)
00:1c.0 0604: 8086:27d0 (rev 01)
00:1c.1 0604: 8086:27d2 (rev 01)
00:1d.0 0c03: 8086:27c8 (rev 01)
00:1d.1 0c03: 8086:27c9 (rev 01)
00:1d.2 0c03: 8086:27ca (rev 01)
00:1d.3 0c03: 8086:27cb (rev 01)
00:1d.7 0c03: 8086:27cc (rev 01)
00:1e.0 0604: 8086:244e (rev e1)
00:1e.2 0401: 8086:27de (rev 01)
00:1f.0 0601: 8086:27b8 (rev 01)
00:1f.1 0101: 8086:27df (rev 01)
00:1f.2 0101: 8086:27c0 (rev 01)
00:1f.3 0c05: 8086:27da (rev 01)
02:00.0 0200: 14e4:1677 (rev 01)


You got a damn good crystal ball hehe :wink: (got the loto numbers ? haha)

Quote:

If you are just adding v4l support to a working .config, I can't see how this would cause a kernel panic: this would happen only when you remove (or change to a module) filesystem or disk support.

Perhaps you were using a copy of a non-working .config by mistake?

Certainly... but i dont see how.. since in my history i just had copy commands
from my config file and not to.
Although I remember that make menuconfig had load of lines of output before
starting up, meaning it generated a .config file, I guess.

I'll retry later and keep you inform. Anyway I can't see how v4l would cause a kernel panic either !
I must have replaced the "return" key by a "space" key some time while reviewing my SCSI
and SATA supports... disabling them maybe...

See ya
Red1
_________________
Having the choice is a choice that we do.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum