====== Create bootable USB drive ====== ===== UNetBootin ===== sudo add-apt-repository ppa:gezakovacs/ppa sudo apt-get update sudo apt-get install unetbootin - Select disk image and choose ISO. - Now, Browse to the particular ISO that you want to make as an installation media. - Again, choose the type as USB and select your USB drive. Once you click ok, UNetbootin will install the boot media to your USB. ===== ddrescue ===== sudo apt install gddrescue Find block device of USB stick: sudo fdisk -l ddrescue path/to/.iso /dev/sdx --force -D Replace the x and path/to/.iso with your specific device block name and the path for the iso file. ===== dd ===== sudo umount /dev/sd?? where ?? is a letter followed by a number, look it up by running lsblk. sudo dd bs=4M if=path/to/input.iso of=/dev/sd? conv=fdatasync status=progress sync - where input.iso is the input file, and /dev/sd? is the USB device you're writing to (run lsblk to see all drives to find out what is for your USB). - conv=fdatasync avoids kernel disk caching and ensures write buffers are flushed before dd returns as finished. - The sync bit is important as dd can return before the write operation finishes (in case conv=fdatasync wasn't used). ===== dd/syslinux ===== Sometimes (usually older iso files) dd is not sufficient and the pendrive will not boot. In this case, you may need to install syslinux: sudo apt-get install syslinux and then run the following commands: sudo mkfs -t vfat -I /dev/sdX You want to run that last command to /dev/sdX and not /dev/sdX1. Then, proceed with the following commands: isohybrid /path/to/file.iso --entry 4 --type 0x1c dd if='/path/to/file.iso' of=/dev/sdX bs=8M conv=fdatasync or, to see progress of image write: pv -tpreb /path/to/file.iso | dd of=/dev/sdX bs=8M or instead of dd, you can use cat instead: sudo -s cat /path/to/file.iso > /dev/sdX Rememeber to issue sync command to flush write cache sync ===== Belana etcher ===== GUI from http://etcher.io To install: # download deb from latest release page https://github.com/balena-io/etcher/releases/ e.g.: wget https://github.com/balena-io/etcher/releases/download/v1.18.4/balena-etcher_1.18.4_amd64.deb sudo dpkg -i balena-etcher_1.18.4_amd64.deb To Uninstall: sudo apt-get remove balena-etcher ===== Testing using Qemu ===== To test if everything has gone right, boot your system from the USB drive. To do so you will have to reboot your system. QEMU can help you in this. QEMU is a machine emulator and virtualizer. Make sure qemu is installed apt-get install qemu run the below command and you will see a virtual machine booting from your USB Drive qemu -hda /dev/sdb