A very important tool in our everyday life are the LiveUSB GNU/Linux flash drives.
We keep an updated collection of several GNU/Linux flavors/distributions (Fedora, CentOS, (L/X)Ubuntu, Kali etc.) that are used depending on the scenario.
The command we use is the following:
sudo dd bs=4M if=path/to/OS.iso of=/dev/sdX conv=fdatasync;
dd allows you to convert and copy a file and we use it to copy the ISO file of the operating system onto the USB flash drive.
Notes:
- You need to
unmountthe USB flash drive before formatting it, e.g.:
sudo umount /dev/sdXY; - You need to use the device filename and not a partition filename:
e.g. You need to use/dev/sdXand NOT/dev/sdX1 - You need to use either the
rootaccount or execute the command withsudo - If you do not know the filename associated with your flash drive, use an application like the following ones to determine which
/devfile is mapped to the USB flash drive:
gnome-disks;or
lsblk;or
sudo fdisk -l;
The parameters we use are the following:
bs=SIZE_IN_BYTESdefines up to how many bytes should be read and written at a time.
In our case we used 4 Megabytes (4M).if=INPUT_FILEdefines the file to be read, we use this parameter to point to the OS ISO file that we want to write on the USB drive.of=OUTPUT_FILEdefines the filename where the data is to be written in.
In GNU/Linux, devices are accessible like files as well so we used/dev/sdXhere that happened to be the device file assigned to our USB device.conv=CONVSconverts the file as per the comma separated symbol list
fdatasyncphysically writes output file data before finishing, we use this parameter to be sure that all I/O operations are done well beforeddterminates, this way we are certain that our USB device will be ready to use as soon as the application is done.
This post is also available in: Greek


