Bootable Linux USB stick: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 118: Line 118:
=== generating images and copies of the stick ===
=== generating images and copies of the stick ===


fill empty part of all partitions on the stick with “zeros”: for each partition, do
Fill empty part of all partitions on the stick with “zeros”: for each partition, do
  dd if=/dev/zero of=/mountpoint/delete.me bs=65536  # this will stop when filesystem full
  dd if=/dev/zero of=/mountpoint/delete.me bs=65536  # this will stop when filesystem full
  rm /mountpoint/delete.me
  rm /mountpoint/delete.me
Better: use the (enhanced) SECURITY ERASE UNIT feature of hdparm (quicker, and nicer for the device, but tricky to use).


save a compressed disk image - we use the parallel gzip program called pigz:
This also seems to result in faster writes afterwards i.e. it is a way to restore the write speed of a USB stick.
 
Save a compressed disk image - we use the parallel gzip program called pigz:
  dd if=/dev/sd? | pigz -c usbstick.img.gz
  dd if=/dev/sd? | pigz -c usbstick.img.gz
(time: ~180 secs speed: ~175MB/s, size of image: 1.8 GB)
(time: ~180 secs speed: ~175MB/s, size of image: 1.8 GB)
1,330

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu