Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Kernel Panic - Unable to mount root fs (again...)
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
alnvidal
n00b
n00b


Joined: 22 Jun 2006
Posts: 7

PostPosted: Thu Jun 22, 2006 4:31 pm    Post subject: [SOLVED] Kernel Panic - Unable to mount root fs (again...) Reply with quote

* [SOLVED] - Just needed to enable SMP.

Hi, I have been trying to install Gentoo on a SATA HD, but I stops at the classic Kernel Panic:

It takes near 30 seconds in this step:
Code:

ata1: dev 0 ATA-7, max UDMA 7, 156301488 sector: LBA48

(I'm not sure about the spacing)

And then...:
Code:

VFS: Cannot open root device "sda3" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)


My chipset is VIA, and the SATA controller (VT8237), too. It supports RAID, but I don't use it.
However, I compiled as built-in this and some other chipsets, but it didn't work, always giving the same error message.
I'm NOT using the /boot in a separated partition, and trying with kernel 2.6.19-r9 (gentoo-sources).

I tried to builtin SATA deprecated support, compile ALL the drivers in the low-level drivers section, enabled RAID... but the same problem.
Using genkernel, it works, but I don't want to use it permanently.
What's wrong?

Here are the parts of the config related to SCSI, SATA and ReiserFS (I'm using it):
Code:

# CONFIG_BLK_DEV_IDESCSI is not set

...

# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set

...

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
CONFIG_CHR_DEV_SG=y
# CONFIG_CHR_DEV_SCH is not set

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set

#
# SCSI Transport Attributes
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set

#
# SCSI low-level drivers
#
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
CONFIG_SCSI_DPT_I2O=m
# CONFIG_SCSI_IN2000 is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA_AHCI=y
# CONFIG_SCSI_SATA_SVW is not set
CONFIG_SCSI_ATA_PIIX=y
# CONFIG_SCSI_SATA_MV is not set
# CONFIG_SCSI_SATA_NV is not set
# CONFIG_SCSI_PDC_ADMA is not set
# CONFIG_SCSI_SATA_QSTOR is not set
# CONFIG_SCSI_SATA_PROMISE is not set
CONFIG_SCSI_SATA_SX4=y
CONFIG_SCSI_SATA_SIL=y
CONFIG_SCSI_SATA_SIL24=y
CONFIG_SCSI_SATA_SIS=y
CONFIG_SCSI_SATA_ULI=y
CONFIG_SCSI_SATA_VIA=y
# CONFIG_SCSI_SATA_VITESSE is not set
CONFIG_SCSI_SATA_INTEL_COMBINED=y
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
CONFIG_SCSI_IPR=m
# CONFIG_SCSI_IPR_TRACE is not set
# CONFIG_SCSI_IPR_DUMP is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_SIM710 is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set

#
# File systems
#
CONFIG_REISERFS_FS=y
CONFIG_REISERFS_CHECK=y
CONFIG_REISERFS_PROC_INFO=y
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y


/boot/grub/grub.conf
Code:

default 0
timeout 30

title Gentoo
root (hd0,2)
kernel /boot/gentoo root=/dev/sda3


And the useful part of /etc/fstab
Code:

/dev/sda3         /         reiserfs      noatime, notail      0 1
/dev/sda4         none      swap      sw               0 0
/dev/cdroms/cdrom0   /mnt/cdrom   iso9660      noauto,ro         0 0
proc               /proc      proc         defaults            0 0
shm               /dev/shm      tmpfs      nodev,nosuid,noexec   0 0


Just to confirm that the problem isn't me, to change the old and wrong kernel with the recent compiled one:
Code:

mount /dev/sda3 /mnt/gentoo
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
cd /usr/src/linux
make menuconfig
..... save and exit
make && make modules_install
rm -rf /boot/gentoo-with-problem
cp arch/i386/boot/bzImage /boot/new-gentoo
(in this case, change the grub.conf)
exit
umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo
reboot

All right?

Thanks in advance.


Last edited by alnvidal on Sat Jun 24, 2006 1:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Thu Jun 22, 2006 4:52 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Kernel & Hardware.
Kernel problem, so moved here
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
noup
l33t
l33t


Joined: 21 Mar 2003
Posts: 917

PostPosted: Thu Jun 22, 2006 6:36 pm    Post subject: Reply with quote

Allan, isn't it possible to instruct GenKernel to generate a .config file based on the hardware detection (i've never used GenKernel, so i can't tell)?
_________________
noup.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4727
Location: Angra do Heroísmo (PT)

PostPosted: Thu Jun 22, 2006 6:48 pm    Post subject: Re: Kernel Panic - Unable to mount root fs (again...) Reply with quote

Hi and welcome to the forums.
alnvidal wrote:
Hi, I have been trying to install Gentoo on a SATA HD, but I stops at the classic Kernel Panic:
Code:

VFS: Cannot open root device "sda3" or unknown-block(0,0)

I tried to builtin SATA deprecated support, compile ALL the drivers in the low-level drivers section, enabled RAID... but the same problem.

Your problem is likely related to having enabled the SATA deprecated support. Boot with the live-cd, mount your partitions, chroot, change your kernel config with make menuconfig, rebuild the kernel make && make modules_install, copy the kernel to your /boot dir/partition and reboot.
Does it work now?
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
alnvidal
n00b
n00b


Joined: 22 Jun 2006
Posts: 7

PostPosted: Thu Jun 22, 2006 9:30 pm    Post subject: Reply with quote

noup :P, I think it is possible, but I'd like to have a kernel configured by myself.
I used partimage to save an image of the Gentoo instalation right before the Kernel part, to save time.
Then I tried /proc/config.gz as the configuration file, it works, but just at the first compilation. After this, I tried the menuconfig again, disabled some options not related to the SCSI support, but the same error. Then I tried to simply copy /proc/config.gz again, recompiling, but the error was there again :?
But with this config the little freeze ("ata1: dev 0 ATA-7, max UDMA 7, 156301488 sector: LBA48") disappeared.

jmbsvicetto, I'm not using the deprecated SATA support right now, I just tried it once (with no success).

Anyway, I'll keep on trying...
Back to top
View user's profile Send private message
noup
l33t
l33t


Joined: 21 Mar 2003
Posts: 917

PostPosted: Thu Jun 22, 2006 11:08 pm    Post subject: Reply with quote

alnvidal wrote:
noup :P, I think it is possible, but I'd like to have a kernel configured by myself.

The idea is precisely to start with a working config and incrementally remove features, or just to compare that config with yours to see what's missing. But from what genkernel seems to make, i think the difference might not be in the kernel config but instead somewhere else. :?

Quote:

I used partimage to save an image of the Gentoo instalation right before the Kernel part, to save time.
Then I tried /proc/config.gz as the configuration file, it works, but just at the first compilation. After this, I tried the menuconfig again, disabled some options not related to the SCSI support, but the same error. Then I tried to simply copy /proc/config.gz again, recompiling, but the error was there again :?

What is that config.gz file related to? That does look odd.
_________________
noup.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4727
Location: Angra do Heroísmo (PT)

PostPosted: Thu Jun 22, 2006 11:51 pm    Post subject: Reply with quote

If you're not using the deprecated support, please post the output of the following:
Code:
lspci
grep -i sata /usr/src/linux/.config | grep -v ^#

_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
alnvidal
n00b
n00b


Joined: 22 Jun 2006
Posts: 7

PostPosted: Fri Jun 23, 2006 12:38 am    Post subject: Reply with quote

noup, this is exactly what I'm doing now, I tried to remove only the options that I REALLY wouldn't use from the config, like ISDN, NFS... And changed the processor type from 486 to K7. Not even with just these simple changes it worked...
Now I'm trying again, without changing the "processor type" (sorry, I don't remember how it is written in menuconfig), but with all that alterations related to ISDN, for instance.

jmbsvicetto, I will do this soon, and then I post the answer.
Back to top
View user's profile Send private message
alnvidal
n00b
n00b


Joined: 22 Jun 2006
Posts: 7

PostPosted: Fri Jun 23, 2006 1:55 am    Post subject: Reply with quote

A little question:
I downloaded and installed a stage3-i686. Is there any problem if I use the kernel as K7, or I should reinstall the stage using a x86 file in order to do this?
Back to top
View user's profile Send private message
baomike
n00b
n00b


Joined: 23 May 2006
Posts: 11
Location: Oregon

PostPosted: Fri Jun 23, 2006 5:41 am    Post subject: using live-cd to solve Kernel panic ? Reply with quote

That was my thought , boot the live-cd and check out fstab and some other things.
but I was told that to mount /dev/sda3 I had to be root. WHAT is the root password?

I have made the assumption the the live-cd can be used to edit the system, is that correct?
Back to top
View user's profile Send private message
noup
l33t
l33t


Joined: 21 Mar 2003
Posts: 917

PostPosted: Fri Jun 23, 2006 11:55 am    Post subject: Reply with quote

alnvidal wrote:
A little question:
I downloaded and installed a stage3-i686. Is there any problem if I use the kernel as K7, or I should reinstall the stage using a x86 file in order to do this?

I think you're alright. Still, taken from the Handbook:
Quote:

In most cases, the command uname -m can be used to help you decide which stage file to download.

_________________
noup.
Back to top
View user's profile Send private message
noup
l33t
l33t


Joined: 21 Mar 2003
Posts: 917

PostPosted: Fri Jun 23, 2006 11:57 am    Post subject: Re: using live-cd to solve Kernel panic ? Reply with quote

baomike wrote:
That was my thought , boot the live-cd and check out fstab and some other things.
but I was told that to mount /dev/sda3 I had to be root. WHAT is the root password?

I have made the assumption the the live-cd can be used to edit the system, is that correct?

You mean, booting your live cd and chrooting into your gentoo installation (to edit fstab and other things), right? You don't need the root password to chroot. (As a note, that's precisely what you do when you forget your root password, you chroot into your installation and change it.)
_________________
noup.
Back to top
View user's profile Send private message
baomike
n00b
n00b


Joined: 23 May 2006
Posts: 11
Location: Oregon

PostPosted: Fri Jun 23, 2006 2:22 pm    Post subject: Re: using live-cd to solve Kernel panic ? Reply with quote

Still have the same problem. You can't chroot to /dev/sda3, it has to be mounted first.
To mount it you have to be root.
Which leads me back to same problem, of a unkown (unknowable?) password for the root on the live-cd.
Back to top
View user's profile Send private message
alnvidal
n00b
n00b


Joined: 22 Jun 2006
Posts: 7

PostPosted: Fri Jun 23, 2006 2:48 pm    Post subject: Reply with quote

After 3 days trying, about 40 kernel compilations, and it finally worked!!
I had to enable SMP. I don't know why, since I have only a simple Athlon XP 2200+... But now it's working.
I would never figure this out, since the first option I used to disable was... SMP.
Thanks for the help :wink:

baomike, you don't need the root password to became root, in the livecd, all terminals are "logged" as root. Just mount the partition (mount /dev/sda3 /mnt/gentoo, and also proc and dev, as the handbook says), forgetting for a while all that multi-user scheme. (Please, correct me if I said something wrong)
Back to top
View user's profile Send private message
noup
l33t
l33t


Joined: 21 Mar 2003
Posts: 917

PostPosted: Fri Jun 23, 2006 3:06 pm    Post subject: Reply with quote

alnvidal wrote:
After 3 days trying, about 40 kernel compilations, and it finally worked!!
I had to enable SMP. I don't know why, since I have only a simple Athlon XP 2200+... But now it's working.
I would never figure this out, since the first option I used to disable was... SMP.
Thanks for the help :wink:

Man, i'm glad it worked for you, but that makes no sense to me. :P Perhaps enabling SMP gets to enable other things that actually make that work... or perhaps not. :)
_________________
noup.
Back to top
View user's profile Send private message
alnvidal
n00b
n00b


Joined: 22 Jun 2006
Posts: 7

PostPosted: Fri Jun 23, 2006 3:25 pm    Post subject: Reply with quote

Yep, it's weird... maybe a kernel bug?
I just hope I don't have problems in the future. Now, let's emerge the funny part :D
Back to top
View user's profile Send private message
noup
l33t
l33t


Joined: 21 Mar 2003
Posts: 917

PostPosted: Fri Jun 23, 2006 4:33 pm    Post subject: Reply with quote

alnvidal wrote:
Yep, it's weird... maybe a kernel bug?
I just hope I don't have problems in the future. Now, let's emerge the funny part :D

Allan, try doind a diff between the new kernel config (with SMP) and the faulty one, see if the difference is only on the SMP part.
_________________
noup.
Back to top
View user's profile Send private message
alnvidal
n00b
n00b


Joined: 22 Jun 2006
Posts: 7

PostPosted: Fri Jun 23, 2006 7:11 pm    Post subject: Reply with quote

No doubt. I've tried twice, using the /proc/config.gz, with and without SMP. Later, I tried my own config, with and without SMP again. Both, without SMP, don't boot.
Back to top
View user's profile Send private message
baomike
n00b
n00b


Joined: 23 May 2006
Posts: 11
Location: Oregon

PostPosted: Sat Jun 24, 2006 7:06 pm    Post subject: Re: using live-cd to solve Kernel panic (success) Reply with quote

I used the live-cd to compile a new kernel. And now that I have the correct scsi driver in
the kernel it can find /dev/sda3 and mount it as root.

Problems encountered:
must be root to mount drives
used "sudo" ie sudo mount /dev/hda3 /mnt/gentoo

Had to mount proc. using sudo as above allows this.

I also forgot to mount /dev/sda1 on /mnt/gentoo/boot
which meant /boot ( after chroot) was empty.

never could figure out how to get out (reboot gracefully) from
where I was after chroot. I used the command "sync" a couple of times
waited a few second and killed power. no ill effects.

I now have a functional gentoo system .
Tnx for help provided both to me and others.
Back to top
View user's profile Send private message
cnagel
n00b
n00b


Joined: 07 Sep 2006
Posts: 7

PostPosted: Thu Sep 07, 2006 7:34 pm    Post subject: Kernel Panic - unable to mount root fs Reply with quote

Well, I'm resurrecting this thread because I've spent a day and a half attempting to get a kernel and a grub.conf that work together.

What gets me is why the LiveCD works so easily, lets me use all the filesystems to compile, etc., but the newly compiled kernel cannot. Maybe I should just copy the kernel from the CD?...

I'm a little newish to this, but I don't plan to give up! :-) I have tried all the suggestions in this thread, but none have worked. What is the strangest to me is that the panic happens after PAGES of output. Since grub tanks if it cannot find the kernel file, I'm assuming /dev/sda1 is already mounted. It's /dev/sda3 that is un-sync-able...

Not sure what I can post to more clearly explicate the issue, or what (more) I should disable to "start clean". Any suggestions?

Thanks,
Chris
Back to top
View user's profile Send private message
cnagel
n00b
n00b


Joined: 07 Sep 2006
Posts: 7

PostPosted: Thu Sep 07, 2006 10:01 pm    Post subject: [Solution] Reply with quote

Well, I was able to get past the kernel panic by compiling in the IDE/SATA support (yeah, the DEPRECATED one). Now my fs mounts fine.

Just that udev won't mount now....

Chris
Back to top
View user's profile Send private message
jeancf
n00b
n00b


Joined: 05 Jul 2004
Posts: 5
Location: Brussels, Belgium

PostPosted: Sat Jan 06, 2007 10:38 pm    Post subject: Reply with quote

I've been looking for a solution for this for hours. I found it here: http://kerneltrap.org/node/1955

Quote:
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.

_________________
JC
Back to top
View user's profile Send private message
zanzer7
n00b
n00b


Joined: 11 Oct 2004
Posts: 30
Location: Denmark

PostPosted: Thu Apr 10, 2008 5:41 pm    Post subject: Reply with quote

A year later, and I get this same problem after a fresh install. I've tried all the solutions posted in this thread, and I've also tried whatever I came across with google searches.

After loading grub correctly, and about 30 seconds into the (otherwise successful boot), I get this:
Code:
VFS: Cannot open root device "sda7" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)

Note that the (apparently working) boot partition uses ReiserFS just like the (not working) root partition.

I have tried various combinations of in-compiling just the deprecated SATA support, as well as just the sata_nv (I have an nVidia Forceware motherboard) support, both, neither - I still get the same error.

Could this be related to my boot and root being on an extended partition? I installed grub on /boot/, so does this mean it isn't in the actual MBR? The grub menu works fine, so does the booting all the way until the error above.

My partition scheme looks like this:
Code:
/dev/sda1   Windows XP (ntfs)
/dev/sda2   Storage (ntfs)
/dev/sda3   Extended partition (holds sda5, sda6 and sda7)
/dev/sda5   Boot partition (reiserfs)
/dev/sda6   Swap
/dev/sda7   Root partition (reiserfs)


I don't know what files would be helpful to paste here, so please name them if any.
_________________
Will divide by zero for food
Back to top
View user's profile Send private message
zanzer7
n00b
n00b


Joined: 11 Oct 2004
Posts: 30
Location: Denmark

PostPosted: Sat Apr 19, 2008 7:44 am    Post subject: Reply with quote

I managed to solve my problem.

It turns out I had forgotten to enable SCSI disk support.

The relevant kernel config is:

Code:
< > ATA/ATAPI/MFM/RLL support
SCSI device support -->
  <*> SCSI disk support
<*> Serial ATA (prod) and Parallel ATA (experimental) drivers -->
  <*> NVIDIA SATA support


Obviously, you will have to enable something else than NVIDIA SATA support, if you don't have an nVidia motherboard.
_________________
Will divide by zero for food
Back to top
View user's profile Send private message
cry4dawn_2000
n00b
n00b


Joined: 10 Oct 2010
Posts: 6

PostPosted: Sun Oct 10, 2010 3:24 am    Post subject: Reply with quote

zanzer7 wrote:
I managed to solve my problem.

It turns out I had forgotten to enable SCSI disk support.

The relevant kernel config is:

Code:
< > ATA/ATAPI/MFM/RLL support
SCSI device support -->
  <*> SCSI disk support
<*> Serial ATA (prod) and Parallel ATA (experimental) drivers -->
  <*> NVIDIA SATA support


Obviously, you will have to enable something else than NVIDIA SATA support, if you don't have an nVidia motherboard.


I had the same problem with an emachines ET1331G-07w and this is what fixed it thanx :D
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