1 |
On Sunday 15 May 2011 17:45:05 Adam Carter wrote: |
2 |
> I'm cloning a windows disk using gentoo; |
3 |
> |
4 |
> On the old 66GB disk; |
5 |
> # dd if=/dev/sdb of=/root/winmbr.bin bs=512 count=1 |
6 |
> # dd if=/dev/sdb1 bs=10M | gzip -v > winpartition.gz |
7 |
> |
8 |
> Then after swapping in the new 500GB disk; |
9 |
> dd if=/root/winmbr.bin of=/dev/sdb bs=512 count=1 |
10 |
> # gunzip -c winpartition.gz | dd of=/dev/sdb1 bs=10M |
11 |
> dd: writing `/dev/sdb1': No space left on device |
12 |
> 0+306 records in |
13 |
> 0+305 records out |
14 |
> 10137600 bytes (10 MB) copied, 0.109885 s, 92.3 MB/s |
15 |
> # fdisk -l /dev/sdb |
16 |
> |
17 |
> Disk /dev/sdb: 500.1 GB, 500107862016 bytes |
18 |
> 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors |
19 |
> Units = sectors of 1 * 512 = 512 bytes |
20 |
> Sector size (logical/physical): 512 bytes / 512 bytes |
21 |
> I/O size (minimum/optimal): 512 bytes / 512 bytes |
22 |
> Disk identifier: 0xe3f7e3f7 |
23 |
> |
24 |
> Device Boot Start End Blocks Id System |
25 |
> /dev/sdb1 * 206848 117207039 58500096 7 HPFS/NTFS/exFAT |
26 |
> |
27 |
> Why is dd saying no space left after copying 10MB when sdb1 is 65GB? |
28 |
|
29 |
Did you reboot after the first "dd"? |
30 |
Or at least, force a re-read of the partition tables? |
31 |
|
32 |
Linux caches the partition tables and when overwriting the partition table, |
33 |
strange things will happen. |
34 |
|
35 |
-- |
36 |
Joost |