| root:gnalle# apt-get install grub grub-doc
|
| root:gnalle# grub-install /dev/hda
| Probing devices to guess BIOS drives. This may take a long time.
| /dev/ide/host0/bus0/target0/lun0/disc does not have any correspondin
|
| root:gnalle# update-grub
| Searching for GRUB installation directory ... found: /boot/grub .
| /dev/ide/host0/bus0/target0/lun0/part1 does not have any correspondi
Edit /boot/grub/device.map and change the line that says
(hd0) /dev/hda
to
(hd0) /dev/ide/host0/bus0/target0/lun0/disc
gracefully as it ought.
-----------------------------------------------
Red Hat 3 Enterprise Linux Issue:
Symptom:
When the first disk of a software RAID has been removed, the second drive is not bootable. Performing a grub-install fails with the error message: '/dev/hdx does not have any corresponding BIOS drive'.
Solution:
Please note that before performing any of these steps, you should have a recent backup of your important data. If for any reason the primary drive becomes unbootable, you should have your Red Hat Enterprise Linux CD #1 available in order to load the rescue environment.
If you are attempting to run grub-install inside of a rescue environment, you will need to first manually mount the corresponding disk partitions. You can view the partitions with the command:
|
You need to mount any partitions of type Linux or Linux RAID autodetect. In the following example of fdisk output, the /boot partition is /dev/hda1 and the / partition is /dev/hda2:
|
In this example, you would mount the partitions and chroot using the following commands:
|
The next step is to edit the file /etc/grub.conf (which is a symbolic link to /boot/grub/grub.conf). Uncomment the following line by removing the pound sign (#) at the beginning of the line:
|
Now, to make the drive bootable, GRUB must be installed to the master boot record (MBR) of the disk. To do this, execute the following command (as root) to enter a GRUB shell:
|
Now, from the GRUB shell prompt, execute the following commands:
|
The setup command within this shell actually writes GRUB to the MBR, which makes the drive bootable.
----------------------------------------------------------------------------------------
Q. After windows XP installation I lost my Grub boot loader and now when I try to run grub-install command to restore Grub in master boot record. But I am getting an error that read as follows:
/dev/sda does not have any corresponding BIOS drive
How do I fix this problem?
A. grub-install is use to install GRUB on your drive. If you are getting error try to recheck device map.
Type the command as follows:# grub-install --recheck /dev/sda
Where,
- --recheck: Probe a device map even if it already exists
- /dev/sda : Replace /dev/sda with your actual device name.
Above command should fix the problem.
---------------------------------------------------------------------------------------Restore Debian Linux Grub boot loader
Recently my hard disk went bad (some bad sectors developed), my boot.ini (Windows XP boot file) corrupted. I was using NT boot loader to load Linux. So I need to repair the Grub i.e. restore Grub in master boot record (MBR).1) Press ALT+F2 (or ALT+CTRL+F2) to get shell prompt
2) Then get the partition tables for the devices using fdisk command:
# fdisk -l
3)When you type fdisk -l, you should see your partition name: /dev/scsi/host0/bus0/target0/lun0/part1 (for IDE disk it display same device file in IDE directory)
4)Once you identified your device file, mount disk using mount command:# mkdir /mydisk
# mount /dev/scsi/host0/bus0/target0/lun0/part1 /mydisk
5) Next use chroot command to start interactive shell with special root directory i.e. /mydisk will act as root directory.# chroot /mydisk
6)Use grub-install command to reinstall grub (SCSI disk):# grub-install /dev/sda
If you have IDE device following command :# grub-install /dev/hda
Again replace /dev/hda and /dev/sda with your actual device names.
7)Type exit and reboot the system. You should see your GRUB and Linux again.# exit
No comments:
Post a Comment