LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-16-2004, 06:52 AM   #1
rickthemick
Member
 
Registered: Aug 2003
Location: Sweden
Distribution: Debian
Posts: 52

Rep: Reputation: 15
Kernel Panic: Cannot open root device "hda1"


Hi!
I've made a custom kernel on my Debian system (kernel 2.4.25). I create it using the kernel-package package. In short I do:

$> make-kpkg clean
$> make-kpkg --append-to-verions=.041116 kernel_image
$> dpkg -i <mykernel.deb>

It seems to update /boot/grub/menu.lst correctly but when loading the new kernel (it appear correctly in grub when rebooting) I get kernel panic: It says:


...
VFS: Cannot open root device "hda1" or 03:01
Please append a correct "root=" boot option
Kernel panic: unable to mount root fs on 03:01


My menu.lst look like this (two kernels plus one recovery mode on each):
default 0
timeout 5
color cyan/blue white/blue

title Debian GNU/Linux, kernel 2.4.27-1-386
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-1-386 root=/dev/hda1 ro
initrd /boot/initrd.img-2.4.27-1-386
savedefault
boot

title Debian GNU/Linux, kernel 2.4.27-1-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-1-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.4.27-1-386
savedefault
boot

title Debian GNU/Linux, kernel 2.4.25.041116
root (hd0,0)
kernel /boot/vmlinuz-2.4.25.041116 root=/dev/hda1 ro
savedefault
boot

title Debian GNU/Linux, kernel 2.4.25.041116 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.4.25.041116 root=/dev/hda1 ro single
savedefault
boot


The two uppemost items are my old kernel and runs perfectly, the 2.4.25 kernel is the one getting the kernel panic...

I have also checked that the kernel configuration support IDE disks. (ok, I dont know all parameters but it seems ok and the config file was copied from /boot/ into /usr/src/linux and then I ran "make oldconfig")

Any ideas of what can be wrong? All items use the same root=... so it can't be that going wrong, can it? I don't understand the samantics of root (hd0,0), what is this parameter? Can it be the kernel configuration?

Best Regards
Rick

Last edited by rickthemick; 11-16-2004 at 07:16 AM.
 
Old 11-17-2004, 01:36 AM   #2
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Rep: Reputation: Disabled
don't know anything about debian but you have either missed out your new initrd line or you have compiled everything in and have not compiled enough.....so its either a missing line in your grub file or its a mucked up kernel.

2) root (hd0,0) says that hda1 is your /boot partition or because you claim root=/dev/hda1 we know you made / on hda1 and /boot is a sub-folder to it.

grub needs to know where to find the rest of the files. you can have grub files on every linux partition and point to them on different boot ups.
 
Old 11-17-2004, 01:58 AM   #3
rickthemick
Member
 
Registered: Aug 2003
Location: Sweden
Distribution: Debian
Posts: 52

Original Poster
Rep: Reputation: 15
Why do I need a initial ram disk (initrd)?, my default kernel (2.4.27) that I got uses one as can be seen in my menu.lst file (in the first post). I thought that this was need if one uses SCSI disk etc, I removed SCSI support when I did my second (2.4.25) kernel, and thought that this was the reason that I didnt get any initrd line this time...
 
Old 11-17-2004, 06:43 PM   #4
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Rep: Reputation: Disabled
I am sure an expert can give you a better answer, but its bit like an initial system for stuff you forgot to compile into your kernel but NEED now on boot up.

do as a favour and modify your grub line ok?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub = Kernel panic iirish Linux - Newbie 4 04-22-2005 09:11 AM
Kernel Panic Mounting issue Mr_Munkey Linux - Hardware 1 02-21-2005 01:44 PM
Grub Kernel Panic CloudBuilder Linux - General 3 02-07-2005 05:11 PM
Grub configuration issue, tha3rdman Linux - Software 1 04-15-2004 10:50 PM
Linux kernel panic - configuration? Vicis Linux - General 5 02-19-2004 12:14 PM


All times are GMT -5. The time now is 04:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration