hd cloning
Hello...
is it possible to clone an entire HD to another one (with exactly the same space/sectors/heads etc) without reinstalling grub ?
I'm doing:
dd if=/dev/hda of=/dev/hdb
dd if=/dev/hda of=hda.mbr bs=512 count=1
sfdisk -d /dev/hda > hda.sf
to clone the HD, save the MBR and partition table, and then:
dd if=hda.mbr of=/dev/hdb
sfdisk /dev/hdb < hda.sf
to restore the MBR and partition table on the target drive.
As this seems not to work (at least on i386), do I need to backup something else ? Of course, the original HD start with a perfectly working grub.
thanks in advance,
Giampaolo
On i386 are several things that may lead to fail...
First you should use same computer (only replace HD), if this does not work (with unchanged bios setup), then it cannot work on other computer. (I mention this, because you don't write that you use it on one computer.)
Second, bios must access HD with same parameters in bios, i.e. same mode (LBA/CHS/LARGE) and same number of sectors/heads/cylinders (!This may be different than how linux sees this numbers!).
I think that it should work under conditions mentioned above, but I'm not sure. It will be better if you specify if you install grub in mbr or in some partition (like hda1), and how it does not work. The text that it writes on screen is useful to know if some part of grub was loaded, or your problem is 'generic' (i.e. any boot loader will fail this way...).
Anyway, I'm responding to this, because I don't know where is the right place for this question. This (development list of grub2) is not.
Quoted 26 lines
is it possible to clone an entire HD to another one (with exactly the same space/sectors/heads etc) without reinstalling grub ?
I'm doing:
dd if=/dev/hda of=/dev/hdb
dd if=/dev/hda of=hda.mbr bs=512 count=1
sfdisk -d
/dev/hda> hda.sfto clone the HD, save the MBR and partition table, and then:
dd if=hda.mbr of=/dev/hdb
sfdisk
/dev/hdb< hda.sfto restore the MBR and partition table on the target drive.
As this seems not to work (at least on i386), do I need to backup something else ? Of course, the original HD start with a perfectly working grub.
thanks in advance,
Giampaolo
Signature · 2 lines
Tomas 'Ebi' Ebenlendr
http://get.to/ebikQuoted 6 lines
partition (like hda1), and how it does not work. The text that it writes on screen is useful to know if some part of grub was loaded, or your problem is 'generic' (i.e. any boot loader will fail this way...).
Anyway, I'm responding to this, because I don't know where is the right place for this question. This (development list of grub2) is not.
Something close to grub dev that I am surprised doesn't exist yet, mainly to assist in grub(2) dev: some way to display what is installed on a HD.
Are there some signatures or such that can be looked for? maybe in the new version of grub, the parameters could be stored somewhere for later retrieval, just for debugging both grub-dev and grub usage. Human readable would be great, assuming there is room.
Carl K
Giampaolo Bellini <[email protected]> writes:
Hi,
Quoted 2 lines
is it possible to clone an entire HD to another one (with exactly the same space/sectors/heads etc) without reinstalling grub ?
How is this related to the development of GRUB 2?
I think such questions belong on bug-grub. This list is about the development of GRUB 2. You are using GRUB Legacy.
--
Marco