PolarSPARC |
Quick Tip :: Format and Burn ISO to USB in Ubuntu Linux
Bhaskar S | 02/08/2020 |
This quick tip shows how one can burn an ISO image to an USB device on a desktop running Ubuntu 18.04 LTS Linux.
For this demonstration, we are using a 16GB USB storage .
The following are the steps to wipe clean, format, and burn the Fedora Linux ISO image to the USB media using the command line:
Removable storage is typically mounted to the directory /media. To determine the device execute the following command:
$ df -h | grep media
The following will be the typical output:
/dev/sdd1 1.8G 1.8G 0 100% /media/polarsparc/LEXAR
From Output.1 above, we infer the device is /dev/sdd1.
Unmount the device by executing the following command:
$ sudo umount /dev/sdd1
This step is OPTIONAL.
To securely wipe all the data from the removeable media, execute the following command:
$ sudo dd if=/dev/zero of=/dev/sdd1 bs=4M status=progress oflag=sync
Note this step can take a while to complete depending on the size of the removable media.
The following will be the typical output:
16001269760 bytes (16 GB, 15 GiB) copied, 1716 s, 9.3 MB/s dd: error writing '/dev/sdd1': No space left on device 3817+0 records in 3816+0 records out 16007561216 bytes (16 GB, 15 GiB) copied, 1718.06 s, 9.3 MB/s
To format the removable media as a FAT32 file system with a volume label of LEXAR, execute the following command:
$ sudo mkfs.vfat -F32 /dev/sdd1 -n LEXAR -v
The following will be the typical output:
mkfs.fat 4.1 (2017-01-24) /dev/sdd1 has 64 heads and 32 sectors per track, hidden sectors 0x0800; logical sector size is 512, using 0xf8 media descriptor, with 31264768 sectors; drive number 0x80; filesystem has 2 32-bit FATs and 16 sectors per cluster. FAT size is 15264 sectors, and provides 1952138 clusters. There are 32 reserved sectors. Volume ID is 4fa35edf, volume label LEXAR .
This steps assumes that one has already downloaded the Fedora Server ISO image called Fedora-Server-dvd-x86_64-31-1.9.iso (at the time of this article) to the directory $HOME/Downloads.
To burn the Fedora Server ISO image to the USB storage, execute the following command:
$ sudo dd bs=4M if=$HOME/Downloads/Fedora-Server-dvd-x86_64-31-1.9.iso of=/dev/sdd1 status=progress oflag=sync
The following will be the typical output:
2138046464 bytes (2.1 GB, 2.0 GiB) copied, 233 s, 9.2 MB/s 509+1 records in 509+1 records out 2138046464 bytes (2.1 GB, 2.0 GiB) copied, 233.312 s, 9.2 MB/s
Finally, to safely remove the USB storage, execute the following command:
$ sudo eject /dev/sdd1