Hello,
I'm using Debian Sarge and I have 4 hard disks in my system. The first was partitionad during the install and the other 3 were added after the system was installed. All of the 4 are the same type and size.
I tried to copy the partitioning schema with the following command:
Code:
sfdisk -d /dev/hda | sfdisk /dev/hdc
But I got an error:
Code:
debian:~# sfdisk -d /dev/hda | sfdisk /dev/hdc
Checking that no-one is using this disk right now ...
OK
Disk /dev/hdc: 8322 cylinders, 16 heads, 63 sectors/track
Old situation:
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hdc1 0 - 0 0 0 Empty
/dev/hdc2 0 - 0 0 0 Empty
/dev/hdc3 0 - 0 0 0 Empty
/dev/hdc4 0 - 0 0 0 Empty
New situation:
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/hdc1 * 63 257039 256977 83 Linux
/dev/hdc2 257040 8385929 8128890 5 Extended
/dev/hdc3 0 - 0 0 Empty
/dev/hdc4 0 - 0 0 Empty
/dev/hdc5 257103 626534 369432 82 Linux swap / Solaris
/dev/hdc6 626598 8385929 7759332 83 Linux
Warning: partition 2 does not end at a cylinder boundary
sfdisk: I don't like these partitions - nothing changed.
(If you really want this, use the --force option.)
debian:~#
If I try to call it with --force options than it create a different schema.
Code:
debian:~# sfdisk -l /dev/hda
Disk /dev/hda: 8322 cylinders, 16 heads, 63 sectors/track
Warning: The partition table looks like it was made
for C/H/S=*/255/63 (instead of 8322/16/63).
For this listing I'll assume that geometry.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 15 16- 128488+ 83 Linux
/dev/hda2 16 521 506 4064445 5 Extended
/dev/hda3 0 - 0 0 0 Empty
/dev/hda4 0 - 0 0 0 Empty
/dev/hda5 16+ 38 23- 184716 82 Linux swap / Solaris
/dev/hda6 39+ 521 483- 3879666 83 Linux
debian:~# sfdisk -l /dev/hdc
Disk /dev/hdc: 8322 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hdc1 * 0+ 254 255- 128488+ 83 Linux
/dev/hdc2 255 8319- 8065- 4064445 5 Extended
/dev/hdc3 0 - 0 0 0 Empty
/dev/hdc4 0 - 0 0 0 Empty
/dev/hdc5 255+ 621- 367- 184716 82 Linux swap / Solaris
/dev/hdc6 621+ 8319- 7698- 3879666 83 Linux
debian:~#
I think the problem is the:
Code:
Disk /dev/hda: 8322 cylinders, 16 heads, 63 sectors/track
Warning: The partition table looks like it was made
for C/H/S=*/255/63 (instead of 8322/16/63).
How can I solve this problem and make an exact copy from the first HDD?
Thanks!