Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-13-2006, 11:53 AM
|
#1
|
LQ Newbie
Registered: May 2006
Posts: 20
Rep:
|
Hard disk woes......please help
Recently I had a problem with one of my IDE drives.../dev/hda1. So I decided to replace it with a nice new sata drive. I am not using raid. I installed the drive....booted up and it was recognized by the BIOS as the 2nd drive. Grub pops up and I select my kernel and grub can't find it. Here is what I see (running Gentoo)
root (hd4,0)
Filesystem type is reiserfs, partition type 0xa5
kernel /boot/newkren root=/dev/sda3
Error 15: File not found
Press any key to continue
For further clarity:
/dev/sda1 = /boot
/dev/sda2 = swap
/dev/sda3 = /
grub-install has confirmed that sda is hd4...boot partition of course being hd40.
At any rate, I got out my Gentoo install CD...booted off it and noticed Linux does see all my partitions and everything looks good. So I mount /dev/sda1 to /mnt/Getnoo/boot and go over and look at my kernel newkern sitting right there in /boot. Everything worked fine prior to me installing the new SATA drive. Any ideas?
|
|
|
05-13-2006, 03:18 PM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
I think I see the problem.
You have /boot in it's own partition, seperate from / (the root of the filesystem).
Your grub config doesn't tell grub where to find the rest of itself in /dev/sda1. Root is now in /dev/sda3 (hd4,2 in grub speak).
root (hd4,0)
Filesystem type is reiserfs, partition type 0xa5
kernel /boot/newkren root=/dev/sda3
Try editing the config so that it looks like this:
root (hd4,2)
Filesystem type is reiserfs, partition type 0xa5
kernel (hd4,0)/boot/newkren root=/dev/sda3
The addition of the /boot partition location in the kernel line is how it's shown in a SUSE installation. It may work in Gentoo as well.
Last edited by bigrigdriver; 05-13-2006 at 03:20 PM.
|
|
|
05-13-2006, 07:50 PM
|
#3
|
LQ Newbie
Registered: May 2006
Posts: 20
Original Poster
Rep:
|
Quote:
Originally Posted by bigrigdriver
I think I see the problem.
You have /boot in it's own partition, seperate from / (the root of the filesystem).
Your grub config doesn't tell grub where to find the rest of itself in /dev/sda1. Root is now in /dev/sda3 (hd4,2 in grub speak).
root (hd4,0)
Filesystem type is reiserfs, partition type 0xa5
kernel /boot/newkren root=/dev/sda3
Try editing the config so that it looks like this:
root (hd4,2)
Filesystem type is reiserfs, partition type 0xa5
kernel (hd4,0)/boot/newkren root=/dev/sda3
The addition of the /boot partition location in the kernel line is how it's shown in a SUSE installation. It may work in Gentoo as well.
|
Thank you for your help. I now get:
root (hd4,2)
Error 22: No such partition.
As a further point of clarification, this is not a new install. This grub config worked prior to me adding a new disk that currently has not been partitioned or even a file system built on it.Completely in the raw. I totally don't understand why this would cause grub not to boot.
Last edited by SMGEG; 05-13-2006 at 07:52 PM.
|
|
|
05-13-2006, 08:15 PM
|
#4
|
Moderator
Registered: Aug 2002
Posts: 26,521
|
IMO grub uses a file called device.map (/boot/grub/device.map) that looks similar in your case to the following:
Code:
# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hda
.
.
(hd4) /dev/sda
It is used due to the fact that grub sometimes has problems guessing devices from the BIOS. When you removed the IDE drive the mapping changed and grub is now looking in the wrong place. Removing the old IDE device and reordering the devices should get you back in business.
This should also rebuild the device.map file
delete the old device.map file and invoke grub like:
grub --device-map=/boot/grub/device.map
Last edited by michaelk; 05-13-2006 at 08:17 PM.
|
|
|
05-13-2006, 08:33 PM
|
#5
|
LQ Newbie
Registered: May 2006
Posts: 20
Original Poster
Rep:
|
Quote:
Originally Posted by michaelk
IMO grub uses a file called device.map (/boot/grub/device.map) that looks similar in your case to the following:
Code:
# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hda
.
.
(hd4) /dev/sda
It is used due to the fact that grub sometimes has problems guessing devices from the BIOS. When you removed the IDE drive the mapping changed and grub is now looking in the wrong place. Removing the old IDE device and reordering the devices should get you back in business.
This should also rebuild the device.map file
delete the old device.map file and invoke grub like:
grub --device-map=/boot/grub/device.map
|
Thank you. I do appreciate all your help. I cheated. I simply:
emerge --unmerge grub
emerge lilo
Back in business. Always was fond of lilo anyway.
That however is not to say this is all for not. Just out of curiosity, you mention grub is now looking in the wrong place. When you say that though, since we are speaking of the act of booting up the kernel, I almost wondered if for a moment you thought my kernel was on /dev/hda? My kernel was actually on /dev/sda1. I did remove /dev/hda though. I just wanted to clarify because this would be good to know going forward on other machines I have running grub still. If grub will fail to work on the removal of any drive, regardless of if it has a kernel on it or not...due to changes in the device map, that is good information.
Last edited by SMGEG; 05-13-2006 at 09:25 PM.
|
|
|
All times are GMT -5. The time now is 12:12 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|