kernel 2.6: unable to mount root fs

Submitted by Mort
on January 4, 2004 - 11:48am

hi forum

i'm trying to install the 2.6 kernel on my debian unstable system. configuring with make menuconfig and compiling with make-kpkg kernel-image works fine. also installing, with dpkg -i kernel-image-2.6.0_10.00.Custom_i386.deb spits out no errors.
i added also kernel information into the /etc/lilo.conf:

root=/dev/hda2

image=/boot/vmlinuz-2.6.0
label=26er
initrd=/boot/initrd-2.6.0.img
read-only

running lilo says:

Warning: '/proc/partitions' does not match '/dev' directory structure.
Name change: '/dev/ide/host0/bus0/target0/lun0/disc' -> '/dev/hda'
Added 26er
Added Deb24-22 *
Added Deb24
Added Deb22
Added Deb24-bf

but that was that way before, so i don't think that matters.

when i restart and try to boot with the new kernel, i get:
Kernel panic: VFS: Unable to mount root fs on hda2
then, a seconds later, it prints out: <7> drivers/usb/host/uhci-hcd.c: bc00: suspend_hc but i guess that has nothing to do with my problem.

i tried a lot of things, from many pages with that problem, eypecially http://kerneltrap.org/node/view/1882 but this brings no soloution for me.

also interesting: the precompiled package from debian, kernel-image-2.6.0-test9-1-386, which is available via apt, prints out something similar: VFS: cannot open root device "302" or unknown-block (3,2) please append a correct "root=" boot option
Kernel panic: VFS: unable to mount root fs on unknown-block (3,2)

here goes my config: http://home.arcor.de/mortthemurder/mort_13.config

some more information about my machine:
AMD Athlon XP 2700+
512mb memory
MSI(MS-6590) KT400 Board with the via 333 chipset and onboard Promise S-ATA Raid Controller
hda: 160gb, hda2 is the root partition, ext2
hdb: 120gb
hdc: cd-rw
hdd: dvd
hd?: 160gb S-ATA

any ideas?

mort

Is EXT2_FS = m?

Anonymous
on
January 4, 2004 - 12:08pm

I had the exact same problem - turned out I had stupidly configured EXT2_FS as a module (your root file system has to be part of the kernel in order to load). Check the .config file in your 2.6 source dir and see what you set EXT2_FS to.

CONFIG_EXT2_FS=y !

Mort
on
January 4, 2004 - 12:37pm

as you can see in my config:

# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y

but thanks anyway

Kill the extra attributes and stuff

Anonymous
on
January 4, 2004 - 4:28pm

The xattrs, posix_acl, security etc. probably don't match what the file system looked like when you created it. Recompile with all of those options set to no:

# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=n
CONFIG_EXT2_FS_POSIX_ACL=n
CONFIG_EXT2_FS_SECURITY=n

And see if it works for you.

Unable to mount ...

Anonymous
on
February 5, 2004 - 4:20am

Enable Automount at boot is a small option that kept buggin' me into
2.6.X kernels :p

darkyo

Kernel panic 2.6.3 SOLVED (IDE)

Anonymous
on
March 11, 2004 - 5:15am

Check your .config for :

CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y

Doh!! Second time this has got me.

problem is gone! :D

Mort
on
January 4, 2004 - 1:41pm

thanks to a nice guy called peppa. he gave me his config.

Kernel panic

Anonymous
on
January 6, 2004 - 1:46pm

Hi,
I have same problem.
Can you write here how can i solve this problem?
Or send config to ailas@atlas.cz?
Thanks

-Seventh

Anonymous
on
February 23, 2004 - 8:06am

Same error here, though with device "303" and (3,3) instead of 302. :\

I thought it might be an ext2/3 version issue, but at this point I don't think it is.

I've try to solve this proble

Anonymous
on
March 10, 2004 - 2:49pm

I've try to solve this problem for some time and I guess it's caused not by configuration(since I've tried many different configs and no of them did work for me) but by some bug in kernel which couldn't be fixed so easily...

Hello, me too, i do Have the

Anonymous
on
August 18, 2004 - 3:45pm

Hello,
me too, i do Have the same problem, please write me un email, if u can solve it, b_younes@caramail.com

Thanks

config file

Anonymous
on
January 8, 2004 - 5:39pm

can you post the config that he gave it to you here, so other ppl can study it?

Configs

Mort
on
January 29, 2004 - 10:05am

I sent the guys which posted their adress a mail.
I'm sorry that I'm so late, I don't check in here often.
You can get my working configs here:
http://home.arcor.de/mortthemurder/kernel-configs.tar

greetings & good luck
Moritz

Me too! =)

Anonymous
on
January 11, 2004 - 10:52pm

... please send for me your .config ! Thanks!!
victor_ky@click21.com.br
Victor

Config File

Anonymous
on
January 21, 2004 - 1:18pm

I am having the same problem with SUSE 9.0...could you send the config file to abstract199@yahoo.com

config

Anonymous
on
January 26, 2004 - 1:07pm

Could you send to me your .config?
Many Thanks!!

gnas@interfree.it

gnas

partition type

Anonymous
on
January 6, 2004 - 1:03pm

I had some similar error with my installation. The thing in my case
was that 2.6 doesn't include the msdos partition driver in the kernel by standard, you have to select it, otherwise it won't be able to mount any filesystemy

hope this helps any other with the same problem

cheers

urs

that solved my problem

Anonymous
on
January 12, 2004 - 9:39am

thanks!

.config

Anonymous
on
January 13, 2004 - 9:14am

Please send it to me too!!!
kafkiano@hotmail.com

David

.config

Anonymous
on
January 14, 2004 - 12:28am

Please can you send me your .config too.
bene_schaef@web.de

Bene

Is there any other solution ?

Anonymous
on
January 14, 2004 - 8:10am

I have a similar problem, I'm on testing/unstable debian and I compiled with the same config as the config of kernel-image-2.6.0-test9 (unstable package) exept I'm on K7 architecture.

Is there anybody which could help me ?

All given solutions does not work for me. I have :

CONFIG_MSDOS_PARTITION=y
and
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=m

My root is /dev/hda7 and it is an ext3 fs...

thanks for any help.

EXT3_FS

Anonymous
on
January 14, 2004 - 9:19am

EXT3_FS
have to be recompiled in the Kernel, not as module... (root can not be mounted)
CONFIG_EXT3_FS=y
really don't know if ...XATTR can give probs...
hope this helps!

it is not the solution...

Anonymous
on
January 20, 2004 - 6:02am

Thanks,

but even with CONFIG_EXT3_FS=y against m it doesn't work :(

have another idea ?

GRZECHu

Anonymous
on
February 29, 2004 - 6:03am

File systems ---> Partition Types --->
[*] PC BIOS (MSDOS partition tables) support

i needed this! Thanks !

********************* TRY TH

Anonymous (not verified)
on
September 9, 2006 - 3:35pm

*********************
TRY THIS FIRST
*********************

Turning on MSDOS partitations in "make menuconfig
" completely fixed my boot problem when upgrading from 2.6.9.4 --> 2.6.17-13

Thanks guys

Same Problem

Anonymous
on
January 14, 2004 - 9:39am

Can you send me your .config ?
I have the same probleme :/
with kernel 2.6.1
ellmout@ellmout.net
thx

Same Problem too :(

Anonymous
on
January 18, 2004 - 1:01pm

I use Mandrake 10(Cooker)on 3 Systems, all have exactly the same Software-Configuration, the same partitions, all runs with XFS.
The Kernel 2.6 Runs perfect on my Notebook and my second Desktop PC, but on my Main-System with the Soyo KT400 Mainboard, i always get "unable to mount root FS".
I have Installed a fresh Mandrake 9.2 on my Harddrive on a new ext3 partition and upgrade to Kernel 2.6, but still the same Problem!

It seems that there is a Problem with VIA KT400 & Kernel2.6

If somebody could help me: Mailto XDimension@GMX.net

Same Problem too :(

Anonymous
on
January 19, 2004 - 1:17am

If you get any replies to this, I'd like to know as well.

Cheers.

Had same problem as you

Johan Wallenborg
on
January 20, 2004 - 12:05am

I had same problem as you, until this morning.

I changed On Chip Serial-ATA to Enhanced mode in BIOS, then my first disk become IDE3 (earlier IDE1), but now i can boot from /dev/sda2 with kernel 2.6.1.

I don't have any problem.

utopiste
on
January 21, 2004 - 5:20pm

Running Reiserfs + All 2.6 kernels since -test3, I didn't have any problem with my VIA KT 400-based mother board.

on Suse

Anonymous
on
January 22, 2004 - 9:26am

Hi -

had the problem with this on Suse 8.1.
didn't compile reiserfs into the kernel
and also didn't configure initrd (init RAM disk under block devices)

Best of luck.

...now off to solve modules problem...

on debian sid

Anonymous
on
January 26, 2004 - 11:41am

same problem... I've been using my floopy to boot to my old kernel, but with 2.6.1 ... still "ill" :_(

floopy

Anonymous
on
January 27, 2004 - 10:56pm

If you used your floppy instead of your floopy it would have worked

append="..."

Anonymous
on
March 2, 2004 - 8:42am

I had the same problem with kernels > 2.4.22. I recently resolved it by adding the following line to my lilo config file :
image=/boot/vmlinuz2.6.3

append="root=303"...


i don't know if it could help someone, but it was the only way for me to boot my brand new kernel...

Weird!!

Anonymous
on
February 11, 2004 - 11:15am

I am facing similar problem. But, I am using 2 different hard-disk on the same system. One boots without any error, while other days "unable to mount root FS". I wonder why 2.6 is so picky....

I have had similar results

Anonymous
on
March 4, 2004 - 9:29am

I also have a soyo kt400 dragon mobo, and got the same error. That and any other kernel will panic if I don't disable the onboard raid controller. sad sad business

I recently changed my mobo an

Anonymous
on
February 4, 2004 - 7:02am

I recently changed my mobo and cpu, and got the same problem.
The kernel I was using before refused to initialize the IDE HDs, claiming they weren't ready (but it seemed to find them though). Then I tried to rebuild the kernel several times, tweaking the config here and there : but the kernel then wouldn't find the HD at all.
I then found your post, and checked the thread you mentioned. I compiled in IDE and EXT3FS, instead of modularize them, and built without initrd image (I believe it is partly causing the troubles).
At first it didn't work, but I forgot to change the compiled in chipset to mine (A7V600 mobo -> VIA82CXXX), so I fixed that, and also unchecked the CONFIG_BLK_DEV_OFFBOARD. I think that last one might be important too, but since I did both last changes together, I can't be certain.

so try :
- not using an initrd image,
- compile in the necessary drivers for your system (IDE support, IDE chipset, FileSystem you are using on your root partition), not as modules
- unchecking CONFIG_BLK_DEV_OFFBOARD

Good luck.

kernel 2.6: unable to mount root fs

asavva
on
February 12, 2004 - 1:08pm

I had this same problem running on two different machines. I am not sure what causes it but the fix I used was to specify the major and minor numbers of the device that holds the root filesystem.

Eg. If "/" is on /dev/hda2 then type "ls -l /dev/hda2" and you will see the major and minor number of the disk, for example on my system I get:


brw-rw---- 1 root disk 3, 2 Sep 15 14:40 /dev/hda2

Therefore the (major, minor) number are (3,2).

Translate this number to hexadecimal and pad to a two digit number, eg: 3,2 becomes 0302 and you have the hexadecimal form of the block device.

Now you can use this in place of "root=/dev/hda2" or "root=LABEL=/" in /etc/grub.conf

Thus you would use "root=0302" in my case. This should also work with lilo but I have not tested this.

re: kernel 2.6: unable to mount root fs

Anonymous
on
February 16, 2004 - 4:38am

i've had the same problem but none of the solutions listed here has worked. for some reason it doesn't seem to recognize ext3 and it thinks it's UFS or UDF.

it's pretty annoying considering that up to at least 2.5.70 worked flawlessly. 2.4.24 works as well but that has other problems.

fwiw,

VIA KT266
Slackware-current

mounting works

Anonymous
on
March 17, 2004 - 1:53pm

Thanks very much for your help, this was the only way to get the root partition mounted.

Just added the "root=2108" instead of /dev/hde8 at the grub bash at startup and the kernel found that partition.
Adding it to /boot/grub/menu.lst solved the problem.

Tried several different kernel configurations already but no one worked.

Thank you asawa!

Anonymous
on
September 27, 2004 - 3:25pm

Your solution worked wonders for me too! Thank you!!

Marcel
Montreal

is upgradepkg a good method ?

Anonymous
on
February 17, 2004 - 11:25pm

I have been trying to upgrade my topologi-linux kernel from 2.4.22 to 2.4.24.2.6.2 and keep getting the error "VFS: Cannot open root device "loop7" on unknown-block(0,0) Please
> append a correct "root=" boot option Kernel panic: VFS: Unable to
> mount root fs on unknown-block(0,0)"
I found this guide http://jetblackz.nabaza.org/UpgradingSlackwareKernel.html and am wondering if this is a recommended way to upgrade? The commands are:
telinit 1
upgradepkg kernel-ide-2.4.24-i486-1.tgz
upgradepkg kernel-modules-2.4.24-i486-1.tgz
upgradepkg kernel-source-2.4.24-noarch-1.tgz
lilo -v (edit grub in my case)
reboot
Have anyone used the upgradepkg method successfully?

Thanks

Lewis

Toshiba Laptop

Anonymous
on
March 23, 2004 - 3:50pm

I had Reiserfs configured like a module. That was the problem. I configured to be part of the kernel and the problem was solved.

linux-2.6.3-gentoo-r1

Regards,

Hector Villarruel
hector@econsulting.com.mx

Gentoo linux-2.6.5

Anonymous
on
April 11, 2004 - 4:31pm

I had a similar problem. What worked for me was to compile Reiserfs into the kernel (I had also compiled it as a module previously) and to include support for dos/x86 partitions in the filesystem section.

Hope this helps some of you.

Etienne

My Fix

Anonymous
on
August 16, 2004 - 10:56pm

I had the following error with kernel 2.6.8.1

VFS: Cannot open root device "303" or unknown block (3,3)
Please append a correct "root=" boot option

My problem was my root partion was of type fd (raid auto-detect). This disk was from a failed RAID setup. I was using /dev/hda3 not /dev/md0 as my root file system.

Not sure if the fix was changing the type to 83 (linux) or removing the /etc/raidtab file (which was starting a failed raid device /dev/md0) as I did them at the same time.

Same problem but with NFS

Anonymous
on
August 17, 2004 - 12:46am

I'm trying to make a diskless client base on fedora 2 and kernel-2.6.7-1.494.2.2.

I have builtin following kernel option:
- Ethernet driver (Realtek 8139)
- DHCP ability
- NFSROOT ability

I have put this in the default file of tftboot :
#########################
prompt=1
label linux
kernel vmlinuz-nfsroot
append "ip=bootp nfsroot=192.168.30.210:/opt/thin/192.168.30.206"
########################"
where 210 is my NFS/DHCP/PXE server
and diskless / part is in /opt/thin/192.168.30.206/ on the NFS server.

So, when I boot the diskless, I have this message :

VFS: Cannot open root device "" or unknow-block(3,2)
Please append a correct "root=" boot option
kernel panic: VFS: Unable to mount root fs on unknow-block(3,2)

If any of you have an idea of what I have to do to solve this, please, give it to me.

Thank you very much.

I had the same problem

Anonymous
on
August 24, 2004 - 5:45pm

I was able to fix it by playing around with my config (make menuconfig). I never did isolate the problem but I have a feeling it was either that I didn't have all of the IDE options turned on or else the MSDOS FS support wasn't turn on. If you read through the posts you'll see these are both necessary.

HW RAID over ATA - cannot mount root=/dev/sda

Anonymous
on
September 8, 2004 - 2:37am

I had a similar problem.
It turns out that the kernel uses SCSI drivers to access the ATA RAID
(in my case PATA RAID1) and loads SCSI support and low level driver MEGARAID. Because it booted from a live CD it loaded those as modules.
genkernel copies the boot config and creates a kernel that loads them as modules - problem is they are needed way before that to mount '/'
Solution is to run genkernel --menuconfig all and include (mark with *) both SCSI support and the MEGARAID.

The irony is that the LiveCD genkernel includes dozens of unneeded modules and fails to include SCSI support for raid.

2.4.26-gentoo-r6

Hi Iam new to Linux.... and i

Anonymous (not verified)
on
February 28, 2006 - 6:56am

Hi Iam new to Linux.... and iam continuously facing this problem for the past 2 days....while rebooting linux-2.6.11.7
Iam unable to reboot and iam getting the following error message
Kernel Panic-VFS:Unable to mount root fs on block(3,2)
my lilo.conf:

prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-2.6.15-mh2
label=2.6.15-mh2
initrd=/boot/initrd-2.6.15-mh2.img
read-only
append="root=LABEL=/"

image=/boot/vmlinuz-2.4.21-27.ELsmp
label=linux
initrd=/boot/initrd-2.4.21-27.ELsmp.img
read-only
append="root=LABEL=/"

image=/boot/vmlinuz-2.4.21-27.EL
label=linux-up
initrd=/boot/initrd-2.4.21-27.EL.img
read-only
append="root=LABEL=/"

1,1 Top

my /etc/fstab

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/disk1 /disk1 ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
none /proc/bus/usb usbfs defaults 0 0

/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

I have made all the ext3 fs as inbuilt but not as modules:

but even then shall post the .config file

CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_CRYPTOLOOP=y
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_SX8=m
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_LBD=y

# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
CONFIG_BLK_DEV_IDE_SATA=y
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_BLK_DEV_IDECS is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set

# File systems
#
# CONFIG_EXT2_FS is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=y
CONFIG_JBD_DEBUG=y
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y

#
# XFS support
#
CONFIG_XFS_FS=y

Also I use lilo and i have given the reference for initrd and bzimage in the lilo.conf

Thanks a zillion

In my case "make defconfig" s

Ryvid (not verified)
on
April 28, 2006 - 12:56am

In my case "make defconfig" sloved this problem (on Debian 3.1 and kernel 2.6.8) Yes, I know it's too easy, but after 2 days of fight my abition was down and I gave up :P

I had the following solution

Anonymous (not verified)
on
April 14, 2005 - 10:55pm

I had the following solution after trying all that has been said here.

I forgot to enable to XFS support.. If you look at the help for that option it (if i'm correct) it says that if you have this as module you will need to use the ramdisk. So building this in the kernel would mean that the ramdisk can be turned off because the fs is useable at boot time. XFS support is in

File Systems -> XFS Support

I enabled it and in lilo i turned of the ram disk (initrd)

now my new kernel boots without any problems

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.