Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Wrap security around cp or dd when flashing iso file to USB

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
sudodus
Posts: 1
Joined: 2015-03-16 08:49

Wrap security around cp or dd when flashing iso file to USB

#1 Post by sudodus »

The recommendation to use cp to 'Prepare a USB stick using a hybrid CD or DVD image' is very short, elegant and efficient.
The CD or DVD image you choose should be written directly to the USB stick, overwriting its current contents. For example, when using an existing GNU/Linux system, the CD or DVD image file can be written to a USB stick as follows, after having made sure that the stick is unmounted:

Code: Select all

# cp debian.iso /dev/sdX
# sync
But it is easy to write to another device, for example a drive with valuable data. A simple typing error or mistake when identifying and selecting the target device is enough to create big problems.

I made the shellscript mkusb to wrap security around dd for this purpose. It is a GUI application, which uses zenity. It works smoothly in Wheezy, while it needs the normal user to be added in the sudo group to work in Jessie. There is a command line version, mkusb-nox, which works smoothly also in Jessie, when running as root, and it does the same job without the eye candy of zenity.

Code: Select all

# mkusb-nox debian.iso
These shellscripts are available for Ubuntu via PPAs, and for other linux distros via the following link

https://help.ubuntu.com/community/mkusb ... phillw.net

mkusb and mkusb-nox are FOSS, and I would be happy, if they can help also you, users of Debian, to flash your iso files into USB sticks in a safe way.

Post Reply