LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel panic when rebooting (grub issue?) (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-panic-when-rebooting-grub-issue-626255/)

GeneralDark 03-06-2008 05:29 PM

Kernel panic when rebooting (grub issue?)
 
Hello.
I've just installed a gentoobox that I'm gonna use as a webserver.
I've been working with linux quite some time but still havent got all the basics togheter, however I managed to install gentoo without anyproblems... until I reboot.
According to the gentoo installationguide my grub.conf is correct, but something is wrong when i get:
Code:

VFS: Cannot open root device "hda3" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

fdisk -l:
Code:

Disk /dev/hda: 15.3 GB, 15382241280 bytes
16 heads, 63 sectors/track, 29805 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        969      488344+  83  Linux
/dev/hda2            970        2678      861336  82  Linux swap / Solaris
/dev/hda3  *        2679      29805    13672008  83  Linux

grub.conf:
Code:

timeout 3
default 0
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title  Gentoo Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/hda3

fstab:
Code:

/dev/hda1              /boot          ext3            auto,noatime    1 2
/dev/hda3              /              ext3            auto,noatime    0 1
/dev/hda2              none            swap            sw              0 0
none                    /proc          proc            defaults        0 0

I have been looking for something in the kernel that I've missed. But I just cant find it if that is so. I have support for IDE, I hade support for ext3 and porc filesystems. I have even googled alot before asking here, found several with the same issue but their solution didnt help me either.
Anyone got some ideas?
Thx in advanced

Emerson 03-06-2008 05:58 PM

Quote:

Cannot open root device "hda3" or unknown-block(0,0)
This tells us your kernel does not make it to the hard disk. HDD controller support is missing.

arubin 03-07-2008 02:48 AM

Do you have an initrd.gz?

syg00 03-07-2008 03:05 AM

Quote:

Originally Posted by Emerson (Post 3080509)
This tells us your kernel does not make it to the hard disk. HDD controller support is missing.

... or the filesystem ...
I'd be (more than) mildly surprised if any (moderately) recent Gentoo doesn't have the libata changes included. hda ??? - try sda.

Emerson 03-07-2008 06:37 AM

Quote:

Originally Posted by syg00 (Post 3080858)
... or the filesystem ...
I'd be (more than) mildly surprised if any (moderately) recent Gentoo doesn't have the libata changes included. hda ??? - try sda.

If filesystem support is missing then he'd have some non-zero numbers in the error message. (not unknown-block(0,0))
Gentoo is DIY. In installation process you configure and build your own kernel. Hence it's up to you whether you choose PATA (hdx) or libata (sdx) for your IDE drives.

GeneralDark 03-07-2008 09:59 AM

I have added all the PCI drivers available in the kernel.

I have initrd.gz in the kernel.

I did try sda instead of hda.

I also did try to add pata drivers aswell.

Still not able to boot:(

If I read as high up as I can from the bootscreen its says:
Code:

ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xffa0-0xffaf, BIOS settings: hda:pio, hdb:pio

Is that any help?

Emerson 03-07-2008 10:09 AM

Building every driver in does not help and can cause conflicts. Use lspci to determine the controller type you have and enable it in the kernel. Knowing your hardware before you install an (any) OS makes life much easier.

Edit: initrd is not required when you build your own kernel, it's needed only in very rare cases if there is no in-kernel drivers for booting hardware.

GeneralDark 03-07-2008 04:40 PM

Ok, no wonder I didnt have the correct driver. lspci have showed me "Intel Corporation 82801AA IDE Controller (rev 02)" and therefore I compiled with support for the inteldriver I found. However, by checking the spec of the motherboard it turned out that it actually used the "iTE IT8712F" controller.
So I went back to the kernel and checked for a driver that would fit.
I didnt find a driver for the IT87-series only for 82 series. How do I resolv this? I have generic drivers kompiled into kernel already.
Also, I have tried to boot the two drivers for the older controllers from the 82series separetly but it still results into the same kernel panic.
Once again, thx for looking into this

syg00 03-07-2008 04:56 PM

Boot a liveCD, and do a lsmod to get the driver(s) required. Usually a good starting point.

GeneralDark 03-08-2008 10:28 AM

I did boot on a live cd (gentoo minimal x86 2007) and used rmmod to remove all modules except for: ipv6 and usbcore. So The driver needed is compiled into the kernel I suppose. How do I find out wicth one it is?

Emerson 03-08-2008 10:55 AM

Search in kernel sources brings up this. Does not look as an IDE controller to me.

Code:

 
|  Symbol: IT8712F_WDT [=n]                                                          │ 
  │ Prompt: IT8712F (Smart Guardian) Watchdog Timer                                  │ 
  │  Defined at drivers/watchdog/Kconfig:395                                        │ 
  │  Depends on: WATCHDOG && X86                                                    │ 
  │  Location:                                                                      │ 
  │    -> Device Drivers                                                            │ 
  │      -> Watchdog Timer Support (WATCHDOG [=n])                                  │ 
  │                                                                                  │ 
  │                                                                                  │ 
  │ Symbol: SENSORS_IT87 [=n]                                                        │ 
  │ Prompt: ITE IT87xx and compatibles                                                │ 
  │  Defined at drivers/hwmon/Kconfig:336                                            │ 
  │  Depends on: HWMON                                                              │ 
  │  Location:                                                                      │ 
  │    -> Device Drivers                                                            │ 
  │      -> Hardware Monitoring support (HWMON [=y])                                │ 
  │  Selects: HWMON_VID


Emerson 03-08-2008 12:16 PM

Run lspci -v from a LiveCD and it will tell you what kernel driver is in use for every device. You can also run it with -nv, this will tell you PCI-ID, go to http://kmuto.jp/debian/hcl/ and see what driver can be used.

Hern_28 03-08-2008 12:23 PM

Simplicity.
 
Sorry if this question is too obvious, just ruling out some simple checks.
1.) Are you sure that the filesystem on /dev/sda3 is ext3.
2.) You may also need to change the devices in fstab if the system is registering your devices sda instead of hda.

Good Luck

GeneralDark 03-08-2008 12:30 PM

Ok, after searching the gentoo forums a while it turned out what IDE driver I should use (the one I used before starting expermanting).
Sp, whats left then? Whot is the problem really? I don have support for ext2, ext3, jfs, ROM, former shm fs, /proc/kcore, kernel automounter 4 support. Am I missing anything?

Hern_28 03-08-2008 12:33 PM

Need to compile support.
 
If I am understanding correctly, you need to compile support for filesystems you are using into the kernel, minimal would be ext2 and 3. i usually enable most all of them.


All times are GMT -5. The time now is 05:46 AM.