A question about burning USB stick
Colin Law
clanlaw at googlemail.com
Fri Jan 7 12:58:24 UTC 2011
Hi
I have an image that I wish to burn to a USB stick using dd. When I
insert the stick it is mounted (it already has valid partitions on it)
and
sudo fdisk -l
shows that it is mounted as sdb. The command I am going to use to burn it is
sudo dd if=myfile.bin of=/dev/sdb bs=10M
but it does not seem right to burn it while it is mounted. However if
I eject it then it is no longer /dev/sdb and the dd command fails.
So the first question is, is it correct just to go ahead and run dd
with the stick mounted?
Once the burn is complete then there is a similar question, should I
'eject' it before unplugging it? The reason I ask is that I am
concerned that the system may be confused about whether it is
unmounting and ejecting the original image or the one I have
re-written.
The reason I am asking the questions in the first place is that I have
some problems and am not sure whether it is what I am doing that is
wrong or if the stick is faulty.
The symptom is that when I burn it then success is reported and it
says it has written 4022337024 bytes (which is the size of the image
file). If I immediately (without ejecting) dump it back again using
sudo dd if=/dev/sdb of=dumpfile.bin bs=10M
it again reports success with the same number of bytes transferred.
However if I diff the original file and the dumped one the contents
are different (they are the same size).
If I 'eject' the stick and re-insert it and then dump it again using
dd then I get an I/O error at about 3.6GB of the 4GB stick.
I have two sticks doing basically the same thing (both SanDisk Cruzer
Blade) though both have had some use. I trying to determine whether I
am doing something wrong or whether I need to get a new stick.
Colin
More information about the ubuntu-users
mailing list