View previous topic :: View next topic |
Author |
Message |
dman777 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Wed Feb 27, 2008 9:53 pm Post subject: Kernel is not recognizeing boot location |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
BradN Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/gallery/StarCraft/starcraft_protoss_observer.gif)
Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Wed Feb 27, 2008 10:29 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
dman777 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Wed Feb 27, 2008 10:47 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
didymos Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1790706086435438446060f.jpg)
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Wed Feb 27, 2008 11:12 pm Post subject: |
|
|
OK, what about the kernel line in grub? I.e., the root="<blah>" part. _________________ Thomas S. Howard |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54829 Location: 56N 3W
|
Posted: Wed Feb 27, 2008 11:21 pm Post subject: |
|
|
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
press tab and grub will list your drives
pick a drive and enter it so your have
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 |
|
![](templates/gentoo/images/spacer.gif) |
BradN Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/gallery/StarCraft/starcraft_protoss_observer.gif)
Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Thu Feb 28, 2008 6:25 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
didymos Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1790706086435438446060f.jpg)
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Thu Feb 28, 2008 7:42 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
BradN Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/gallery/StarCraft/starcraft_protoss_observer.gif)
Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Thu Feb 28, 2008 7:50 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Diezel l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/78009112043a54ea0ba451.gif)
Joined: 04 Feb 2003 Posts: 600 Location: Karjaa, Finland
|
Posted: Thu Feb 28, 2008 9:13 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mikegpitt Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/320581971410bd37710af6.jpg)
Joined: 22 May 2004 Posts: 3224
|
Posted: Thu Feb 28, 2008 3:22 pm Post subject: |
|
|
The other usual suspect is that the filesystem you are using hasn't been compiled into your kernel. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jburns Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 18 Jan 2007 Posts: 1227 Location: Massachusetts USA
|
Posted: Thu Feb 28, 2008 8:24 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
dman777 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Thu Feb 28, 2008 11:10 pm Post subject: |
|
|
I had to change my SDA to SDD in the grub.conf and fstab files. Thanks for all the help! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|