I used dd to clone the XP c:\ drive and want to use dd to restore XP on a new drive. Will dd copy the MBR to the new drive? jozien -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2012/05/03 23:26 (GMT-0400) Joe Zien composed:
I used dd to clone the XP c:\ drive and want to use dd to restore XP on a new drive. Will dd copy the MBR to the new drive?
Not unless you want it to. The MBR is not part of any partition. Unless you dd a whole disk, you must specify the MBR explicitly to dd if you want it copied. Unless the two disks have identical sector counts and sizes, that's usually a bad idea. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/04/2012 06:11 AM, Felix Miata wrote:
On 2012/05/03 23:26 (GMT-0400) Joe Zien composed:
I used dd to clone the XP c:\ drive and want to use dd to restore XP on a new drive. Will dd copy the MBR to the new drive?
Not unless you want it to. The MBR is not part of any partition. Unless you dd a whole disk, you must specify the MBR explicitly to dd if you want it copied. Unless the two disks have identical sector counts and sizes, that's usually a bad idea.
i.e. if you copied the whole disk like /dev/sda (instead of just a partition like /dev/sda1), then it usually works if your new disk is identical or bigger in size. I did that a few times in the last few years and it usually worked. It won't usually work if you put the new disk into another PC. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-05-04 06:11, Felix Miata wrote:
Not unless you want it to. The MBR is not part of any partition. Unless you dd a whole disk, you must specify the MBR explicitly to dd if you want it copied. Unless the two disks have identical sector counts and sizes, that's usually a bad idea.
It is possible to dd the mbr skipping the partition table bytes if you know the right incantation for dd - which I never remember. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+jorYACgkQIvFNjefEBxr9nACgwUVMY/XdGiBb/sS/lenatMuR 4GsAoMEQbfXRMY9YV0FJJVyXUMH2vdUU =wPjz -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Friday, May 04, 2012 05:34 AM Carlos E. R. wrote:
On 2012-05-04 06:11, Felix Miata wrote:
Not unless you want it to. The MBR is not part of any partition. Unless you dd a whole disk, you must specify the MBR explicitly to dd if you want it copied. Unless the two disks have identical sector counts and sizes, that's usually a bad idea.
It is possible to dd the mbr skipping the partition table bytes if you know the right incantation for dd - which I never remember.
To copy the boot code in the MBR: dd if=<old drive> of=<new drive> bs=440 count=1 Example: dd if=/dev/sda of=/dev/sdb bs=440 count=1 Note that these are drives specified, not partitions (e.g., sda1, sdb1). The "c:\ drive" is not a drive; that is common but stupid MS user terminology that isn't even consistent with MS technical terminology, which is "volume". -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Fri, 04 May 2012, Dennis Gallien wrote:
dd if=/dev/sda of=/dev/sdb bs=440 count=1
bs=1 count=446 But it'd be better to reinstall grub. -dnh -- Optimization matters *only* when it matters. When it matters, it matters a lot, but until you know that it matters, don't waste a lot of time doing it. Even if you know it matters, you need to know *where* it matters. -- Joseph M. Newcomer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2012/05/04 22:35 (GMT+0200) David Haller composed:
On Fri, 04 May 2012, Dennis Gallien wrote:
dd if=/dev/sda of=/dev/sdb bs=440 count=1
bs=1 count=446
But it'd be better to reinstall grub.
Only if MBR is where Grub was installed on the old HD. IOW, when standard MBR code can be used on a system that includes Windows, it should be used, so that when Windows is eventually re-installed, no post-installation MBR "repair" is necessary to get booting back to normal[1]. Of the 30+ systems here, most of which are multiboot with at least 3 installed operating systems, none have Grub installed on any MBR. In the OP's case, if standard MBR code was on the old disk, 'FDISK /MBR' from a DOS floppy boot is probably the easiest MBR fix. If Grub was there, then reinstalling Grub is probably best. [1] http://fm.no-ip.com/PC/install-doz-after.html -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-05-04 22:35, David Haller wrote:
Hello,
On Fri, 04 May 2012, Dennis Gallien wrote:
dd if=/dev/sda of=/dev/sdb bs=440 count=1
bs=1 count=446
But it'd be better to reinstall grub.
If grub was there. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+lA3gACgkQIvFNjefEBxrDBACgrQXL7wXi12Lpdy4vvH0xg6jE u5sAn3SXEdmgnS6TSzTZFcvBU0fan/4z =78Ho -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-05-04 22:35, David Haller wrote:
Hello,
On Fri, 04 May 2012, Dennis Gallien wrote:
dd if=/dev/sda of=/dev/sdb bs=440 count=1
bs=1 count=446
But it'd be better to reinstall grub.
If grub is there. Both bs=440 count=1 and bs=440 count=1 would do the same: copy the first 440 bytes. But the 440 vs 446 difference worries me. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+oF+EACgkQIvFNjefEBxomPgCfeTCGihBBoWGx7v6YNV5riHz3 13gAn25Tp0eRG/8WxEJ16GvVDOy2ZLUM =Dg5N -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Monday, May 07, 2012 02:43 PM Carlos E. R. wrote:
On 2012-05-04 22:35, David Haller wrote:
Hello,
On Fri, 04 May 2012, Dennis Gallien wrote:
dd if=/dev/sda of=/dev/sdb bs=440 count=1
bs=1 count=446
But it'd be better to reinstall grub.
If grub is there.
Both bs=440 count=1 and bs=440 count=1 would do the same: copy the first 440 bytes.
But the 440 vs 446 difference worries me.
A legitimate concern. AFAIK the last 2 bytes are not used and usually null. But the first 4 bytes are the disk signature and have been used for different purposes since Windows NT. On a Windows disk better to leave it alone if possible, or at the least know what's there and its purpose before copying it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 5/3/2012 11:26 PM, Joe Zien wrote:
I used dd to clone the XP c:\ drive and want to use dd to restore XP on a new drive. Will dd copy the MBR to the new drive?
http://lmgtfy.com/?q=dd+mbr -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (7)
-
Bernhard Voelker
-
Brian K. White
-
Carlos E. R.
-
David Haller
-
Dennis Gallien
-
Felix Miata
-
Joe Zien