On Monday 16 May 2011 02:01:13 Adam Carter wrote: > WRT why it stopped after 10MB, if i specified a smaller size it would just > stop after whatever was specified, so its just doing a single chunk equal > to whatever bs has been specified as.
I recall zeroing drives/partitions and getting this message on the *second* run, when the partition table had already been deleted. Recreating a partition table with fdisk allowed another run by dd. Floppies did not have this problem (no partition tables on them). What I suggested was to experiment with another bs just in case that was causing the problem of writing only one block. > I think the re-read of the partition table is probably the problem - so > thanks for that suggestion. This is the most likely cause, but I cannot understand why it will write only one block and not the lot. > To check my understanding - would it be correct to say that; > 1. Using dd to copy the first 512 bytes (MBR) is ALL that is needed to > setup the partitions - that is i wont need to run fdisk etc afterward. This is correct if you only have primary partitions. It will not copy the extended partition and any logical partitions in it. They reside in the first sector of the extended partition, which is not a boot sector, but contains the logical partition table. (I found this out the hard way!) Have a look at this to see how you can back up the extended partition tables with sfdisk (there's more than one of these, if you have more than one logical partition) : http://www.partimage.org/Partimage-manual_Backup-partition-table > 2. Using dd in this way of course will not update the kernel's knowledge of > the partition table so a partprobe is necessary Yes, or a reboot. > 3. When using fdisk to write a partition table and exit, it calls a re-read > of the partition table by the kernel so any changes should be ready > straight away. (there's a message about calling ioctl when it exits - so i > guess that is the update) They are ready (i.e. written) but not yet read by the OS. Tools like gparted (part)probe the device to re-read the partition table after saving changes to disk. -- Regards, Mick
signature.asc
Description: This is a digitally signed message part.