LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 01-10-2006, 09:11 AM   #1
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,244

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Solved -- grub-install "/dev/hdx does not have any corresponding BIOS drive" error


Sorry if a similar thread already has been posted. There are a zillion threads about Grub, but I could not find this specific error.

Subtitle: how to clone a linux disk

This happened after I did a disk clone on a disk of dissimilair size.

I connected the empty disk to the secondary IDE. It became /dev/hdc. With cfdisk I created the partitions as I liked them, and formatted them to ext3 with mkfs.

(If you do this, don't forget to inititalize a swap partition with mkswap, and tell the kernel about it with swapon once you booted from the new disk)

Then using the dd command, I copied every partition to the new disk:

dd if=/dev/hda1 of=/dev/hdc1 bs=8192
...etc for the other partitions I have.

I mounted /dev/hdc1 to /mnt/hdc1 in the current tree. /dev/hdc1 is the partition which contains the /boot dir.

At the very last I made a grub install on /dev/hdc with this command:

# grub-install --root-directory=/mnt/hdc1 /dev/hdc

This gives the error:
"/dev/hdc does not have any corresponding BIOS drive"

To solve this, add this line to the /mnt/hdc1/boot/grub/device.map:
(hd2) /dev/hdc

The important thing is that you have to edit the device.map which is in <root-directory>/boot/grub, and NOT the file on the drive you booted from.

You can also clone the MBR using the dd command, but I consider this more safe. If you make a mistake with dd here, you delete the partition table and you have to start over again.

(I can't imagine that on some other platforms you have to struggle with Norton Ghost etc. )

jlinkels
 
Old 01-10-2006, 09:20 AM   #2
T.Hsu
Member
 
Registered: Jan 2005
Posts: 178

Rep: Reputation: 31
Hi, congratulations, I had same problem before then checked the manpage found grub-install has a "--recheck" option to probe a device map even if it already exists.

Regards.
 
Old 01-10-2006, 09:33 AM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,244

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Missed that -- that is, I did not understand that using --recheck would lead to this.

Thanks for the tip
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cant install grub: /dev/hda no corresponding bios drive qwijibow Linux - General 4 01-16-2005 12:30 PM
Will "grub-install /dev/hda" kill Windows XP MBR? Zullocrit Linux - Newbie 3 09-25-2004 10:50 AM
"GRUB error 15" after hard drive removal maxfacta Linux - General 2 08-31-2004 09:59 AM
error message when pressing "Next" "BIOS Problems" , help ! HeRCuLeSX Fedora 3 07-21-2004 03:37 PM
Error at boot after GRUB : last message "apm:BIOS version 1.2 flags 0x03" OmniXBro Mandriva 2 04-10-2004 01:34 AM


All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration