bugGNU GRUB - Bugs: bug #4245, Copying a hard drive and making...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #4245: Copying a hard drive and making the copy bootable is hard

Submitted by:  None
Submitted on:  Wed 09 Jul 2003 09:37:28 AM UTC  
 
Category: NoneSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: 
Originator Email: -unavailable-Open/Closed: Closed
Release: GNU GRUB 0.93Release: None
Reproducibility: Every TimePlanned Release: None

Sat 15 Dec 2007 12:23:15 PM UTC, comment #3:

Unfortunately we do not currently have the resources to track down wishlist requests. Please reopen this bug if you can provide a patch, or if you're willing to work on this feature.

Thanks

Robert Millan <robertmh>
Project Administrator
Thu 20 May 2004 08:53:13 PM UTC, comment #2:

I would say that copying a drive and installing GRUB to make the copy bootable is impossible, or that's been my experience.

I did basically the same process, except that I'm going hda -> hdc (it's on a laptop). I'm doing:

...
mount /dev/hdc3 /tmp/b
mount /dev/hdc1 /tmp/b/boot
"copy files / to /tmp/b with tar"
chroot /tmp/b grub-install /dev/hdc

I always get back "/dev/hdc is not known to the BIOS". (something like that, I don't have it on the screen now)

I tried adjusting my grub/device.map file by adding the line:

(0x81) /dev/hdc

but that did not help.

And I think (hope!) this is only a doc (FAQ) fix, not a code fix. An example here would be sooooooo useful!

Thanks,
Kevin
-unavailable-

Anonymous
Thu 10 Jul 2003 04:49:01 PM UTC, comment #1:

Just after this line:
grub-install --root-directory=/mnt/hdb3 hdb
You can add this line:
vi /mnt/hdb3/boot/grub/menu.lst
and change hdb3 to hda3 inside this file since your hard disk become hda when you remove the first disk.

Anonymous
Wed 09 Jul 2003 09:37:28 AM UTC, original submission:

I'm making copies of my hard drive. To do this, I turn off my computer, plug in another hard drive, turn it on, and type:
fdisk /dev/hdb (create hdb1 (/boot), hdb3 (/))
mke2fs -j /dev/hdb1
mke2fs -j /dev/hdb3
mkdir /mnt/hdb3
mount /dev/hdb3 /mnt/hdb3
mkdir /mnt/hdb3/boot
mount /dev/hdb1 /mnt/hdb3/boot
tar cl / | (cd /mnt/hdb3; tar xp)
cd /boot
tar cl . | (cd /mnt/hdb3/boot; tar xp)
grub-install --root-directory=/mnt/hdb3 hdb
umount /mnt/hdb3/boot
umount /mnt/hdb3
shutdown -r 0

What I want to happen is for the new hard drive to become bootable when it's the only hard drive (hda).

What I sometimes get is an error saying that it can't find hdb in the bios list. On other occasions, it clobbers the grub on hda hard disk so that it boots to the grub command line. As these are serial-console machines, it appears that the machine just isn't booting at all, but in reality, it's booting to the non-existent screen on the non-existent graphics card.

What I'd like is a fool-proof method of making /dev/hdb bootable when it becomes /dev/hda in a new computer. A FAQ entry would be enough.

Thanks!
--
-unavailable-

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by robertmh (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 15 Dec 2007 12:23:15 PM UTCrobertmhOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1