Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel panic/grub error after compiling new kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
sealine
n00b
n00b


Joined: 25 Jul 2004
Posts: 2

PostPosted: Sun Jul 25, 2004 7:01 pm    Post subject: Kernel panic/grub error after compiling new kernel Reply with quote

I know this is a common error/problem, but I scoured these forums all night, and it seems that everybody else's problem is more complex to mine due to dual-booting or custom partitions. My problem *should* be an easy fix -- but I cannot figure out for the life of what the heck could possibly be wrong. Hopefully somebody else will see something obvious I'm missing.

I emerged and compiled gentoo-dev-sources 2.6.7-r8 last night. I mounted the boot partition, copied the new bzImage over to it after backing up my old one, edited my grub.conf, umounted /boot, and rebooted. When I reboot and try to boot into the new kernel, I get the following error:

Code:
VFS: Cannot open root device "hda3" or hda3
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on hda3


When I reboot and try to boot into the *old* backup kernel, it boots up absolutely fine with no problems.

For reference, my grub.conf is as follows:

Code:
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux 2.6.7
root (hd0,0)
kernel (hd0,0)/boot/bzImage root=/dev/hda3

title=Gentoo Kernel Backup
root (hd0,0)
kernel (hd0,0)/boot/bzImage.bak.working root=/dev/hda3


My fstab reads as follows:
Code:
/dev/hda1               /boot           ext2            noauto,noatime                  1 2
/dev/hda3               /               ext3            noatime                 0 1
/dev/hda2               none            swap            sw                      0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,user             0 0
/dev/fd0                /mnt/floppy     auto            noauto,user                     0 0

# NOTE: The next line is critical for boot!
none                    /proc           proc            defaults                0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none                    /dev/shm        tmpfs           defaults                0 0


I'm baffled as to why it complains about the root being hda3, since that actually seems to be the correct root partition and the old kernel boots fine with the same setting specified. Incidentally, the contents of boot also read the proper file names for the kernels, bzImage and bzImage.bak.working. I'm at a total loss. This seems so silly. If I've missed something overly obvious, please let me know ... thanks in advance.
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Sun Jul 25, 2004 7:40 pm    Post subject: Reply with quote

Hmm... there could be a few things here. Firstly, have you made sure you compiled ext3 support into the kernel? Also, have you got support for your IDE controller compiled in? Try using the diff command to see the difference between your old kernel config (if you kept it) and the new one, and see what's different.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Jul 25, 2004 7:44 pm    Post subject: Reply with quote

sealine,

How did you config your new kerenl?
Provided you old one was a 2.6, the bast way without messing something up is to copy the .config file from the old to the new trees, the run make oldconfig in the new tree.
You will be asked to answer new thing only.

You can do the same thing moving from 2.4 to 2.6 but theres a lot of changes. You must not just copy the .config.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sealine
n00b
n00b


Joined: 25 Jul 2004
Posts: 2

PostPosted: Sun Jul 25, 2004 11:20 pm    Post subject: Reply with quote

I configured the new kernel manually with make menuconfig, I didn't use genkernel or anything. I haven't compared the new config file against the old one, but I did re-make menuconfig, make sure all necessary items were selected, such as the ext3 file system, and recompiled the kernel. It's still giving the same kernel panic when I install it, and reboot.

I may attempt comparing the new and old config files tomorrow when I have more energy.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Mon Jul 26, 2004 5:57 pm    Post subject: Reply with quote

sealine,

Is your grub entry for the new kernel OK?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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