Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel is not recognizeing boot location
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
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Wed Feb 27, 2008 9:53 pm    Post subject: Kernel is not recognizeing boot location Reply with quote

I just added some hard drives to my system. Now when I boot up, the GRUB loads successfully. But when I pick Gentoo to load, I get a Kernel Panic- Kernel can not load. How can I fix this?
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Wed Feb 27, 2008 10:29 pm    Post subject: Reply with quote

Wait, grub can't load the kernel, or the kernel loads and then kernel panics (probably by not finding the root filesystem)?

If you added a hard drive, it may have changed the hard drive ordering for grub, since it numbers by the drives which are present, not including cdroms or not-present devices.

So, if you had, say a hard drive at hda, cdrom at hdc, and a linux drive at hdd, the linux drive would be (hd1). If you add a hard drive on hdb, then the linux drive would become (hd2).
Back to top
View user's profile Send private message
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Wed Feb 27, 2008 10:47 pm    Post subject: Reply with quote

The kernel loads and then kernel panics by not finding the root file system. Everything was until I added the extra HD's. The boot drive is still in the original location. Grub loads fine, and so does Windows XP. I have linux originally on hd0,1(Because Linux boot is on the second partition). Nothing has changed. The drive is still hd0, or else GRUB wouldn't boot, correct? I don't know exactly what to change since the drive is still hd0 and the boot partition is still hd0..
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Wed Feb 27, 2008 11:12 pm    Post subject: Reply with quote

OK, what about the kernel line in grub? I.e., the root="<blah>" part.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 27, 2008 11:21 pm    Post subject: Reply with quote

dman777,

Many BIOS's identify the boot frive to grub as (hd0), regardless of thich drive it is.
Its therefore possible for your drives to be reordered for the kernel but not the BIOS.
This would produce your symptoms. Its easy to check.

At the grub splash screen, press e
find the root (hd0,1) line, make ot read
Code:
root (hd
press tab and grub will list your drives
pick a drive and enter it so your have
Code:
root (hd0,
and press tab. grub lists the partitions on that drive.
By repeating for all your drives, you may well discover which is which.
_________________
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
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Thu Feb 28, 2008 6:25 am    Post subject: Reply with quote

NeddySeagoon, the problem doesn't seem to be with grub, but with the kernel itself not finding the drive anymore. I don't think the device to the kernel would have changed, but perhaps something is messing up and it isn't finding it at all now.

I seem to remember this type of thing happening with some odd jumper settings... the bios would find the drives fine but then linux wouldn't... make sure the jumpers are master/slave and not cs for a cable with two devices and maybe it will help. Also, check the kernel boot messages for what it says about the drives (shift+pageup if you can't see them).

This does seem to be a bit of an odd problem though.
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Thu Feb 28, 2008 7:42 am    Post subject: Reply with quote

BradN wrote:
NeddySeagoon, the problem doesn't seem to be with grub, but with the kernel itself not finding the drive anymore.


Umm, yeah, that's what he said.

Quote:

I don't think the device to the kernel would have changed, but perhaps something is messing up and it isn't finding it at all now.


Actually, that's likely what happened. If the kernel can't find the root file system, then the "root=" parameter is wrong. Grub works because the BIOS is told to boot off that drive first, but the new drives have changed how the kernel sees things. I'm guessing that the original drive was plugged into a connector labeled, say, SATA2 or something like that. With no other drives, it would be called sda. But then the new drives got plugged into SATA0 and SATA1, or whatever, so now those are considered to be sda and sdb, with the original drive now assigned sdc. That's the general idea anyway.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Thu Feb 28, 2008 7:50 am    Post subject: Reply with quote

Ahh, I missed that part of his comment, but still discussing grub is beside the point since grub's identifiers haven't seemed to change (if they had, it wouldn't be able to load the kernel anymore).

Does kernel sata dynamically assign identifiers like that? I've never experimented to find out... I've always had two hard drives plugged into the two ports on my motherboard.
Back to top
View user's profile Send private message
Diezel
l33t
l33t


Joined: 04 Feb 2003
Posts: 600
Location: Karjaa, Finland

PostPosted: Thu Feb 28, 2008 9:13 am    Post subject: Reply with quote

Correct me if I'm wrong, but if grub loads the kernel everything is fine until it's done loading. So the problem should be the part that says
Code:

kernel /vmlinuz root=/dev/hda??

Linux can't for some reason find your root filesystem.
What I would do is boot of the LiveCD and use mount /dev/hd(sd) autocomplete to check which drives it finds. After that mount your Linux / partition, using the LiveCD, and check if /etc/fstab is as it should be. If it's ok mount the /boot partition(if it's not the same as /) and check that grub.conf is ok.
_________________
A bus station is where a bus stops, a train station is where a train stops. On
my desk I have a work station..
Nixadmins.net
FLUG member 473
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Thu Feb 28, 2008 3:22 pm    Post subject: Reply with quote

The other usual suspect is that the filesystem you are using hasn't been compiled into your kernel.
Back to top
View user's profile Send private message
jburns
Veteran
Veteran


Joined: 18 Jan 2007
Posts: 1227
Location: Massachusetts USA

PostPosted: Thu Feb 28, 2008 8:24 pm    Post subject: Reply with quote

If you are using the SATA/PATA drivers ( /dev/sdxx ) then adding drives can change the device used to access your drives. What does it display when it can't find the root partition?
Back to top
View user's profile Send private message
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Thu Feb 28, 2008 11:10 pm    Post subject: Reply with quote

I had to change my SDA to SDD in the grub.conf and fstab files. Thanks for all the help!
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