Monday, January 25, 2016

How to burn .iso to USB drive in Linux

For Command Line Lovers
For command line lovers like me the best utility to burn a .iso to USB drive is "dd". 

  • Insert the USB drive and open terminal (Ctrl+Alt+T)
  • better be a root (sudo -i), don't be afraid believe in yourself
  • use "fdisk -l"  to find the USB device
fdisk-before



  • So in our case its /dev/sdb
  • Make sure the USB device is unmounted


umount /dev/sdb1


  • Assuming the .iso file is in your current working folder, type the below command and wait for it to finish.

dd bs=4M if=ubuntu-12.04.2-server-i386.iso of=/dev/sdb

dd


  • ubuntu-12.04.2-server-i386.iso is your .iso file
  • "bs=4M" is optional. Its just to make it faster
Testing Time....
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. What?! Yes 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 


No comments:

Post a Comment