[sclug] dd question without blowing myself away

David Given dg at tao-group.com
Sat Oct 25 09:05:33 UTC 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 31 January 2003 3:18 pm, Pieter Claassen wrote:
> I think you confirm what I thought (dd will fry the disk if the disk is not
> exactly the same size (same geometry?) between two copies)
>
> What I have is:
> 1. MBR in /dev/hda
> 2. Linux system 1 on /dev/hda1 which contains lilo.conf that wrote MBR
> 3. Linux system 2 on /dev/hda2 which wrote its own copy of partition table
> to /dev/hda2 with lilo

Partition table? hda2? The partition table lives in the MBR. They're 
meaningless elsewhere (although extended partitions contain something 
similar). Are you confusing it with the partition's boot sector?

[...]
> The question is just whether it is possible to use dd to make a partition
> that can be restored to a disk that is slightly larger that the one you
> made it from.

Yes, that'll work fine. You'll waste the extra space, of course, and you need 
to make extremely sure that your disk has no bad sectors. Anywhere. Otherwise 
Bad Things will happen.

[...]
> What will happen if I change the block (or sector) size on a partition and
> then use dd to overwrite this disk?

If you're using ATA, you can't; all ATA discs have a sector size of 512 bytes. 
On anything else... I'm not entirely sure. I think Linux and dd are 
intelligent enough that you'll end up with a bitwise copy on the new device, 
blocksize notwithstanding.

- -- 
+- David Given --McQ-+ "I must have spent at least ten minutes out of my
|  dg at cowlark.com    | life talking to this joker like he was a sane
| (dg at tao-group.com) | person. I want a refund." --- Louann Miller, on
+- www.cowlark.com --+ rasfw
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE+OqDIf9E0noFvlzgRAurVAKCshsDxI6HgHYcgeN4HwjZUwZ6R/gCgvCvU
B3F5J2g/EXSZNljuLDvxkBU=
=cmFW
-----END PGP SIGNATURE-----




More information about the Sclug mailing list