How to make a USB drive bootable (in Linux distros) ?

Greeting folks,

Things you need to make a bootable USB drive are –

  • a USB drive with minimum 2 GB space
  • a machine with any Linux machine

First, you need to download the desired ISO file.

Once your downloading work is finished, open Disks in your system and select your USB drive.

Now format your USB to fat 32 ( be careful while selecting and formatting your USB ).

Now open Startup disk creator in your machine, select your ISO file and click on Make Startup Disk button. It will take some time, wait till it finishes.

Finally, you are done with it.

Yeah, this method is very easy for beginners but what if someone wants to do through terminal ? Developers might feel to do everything using the terminal, right ?    😛

So developers, open  your terminal and do :

$ sudo apt-get install syslinux mtools

Create a mount point and mount Linux ISO image using the following command.

$ sudo mkdir /media/iso
$ sudo mount -o loop /opt/Ubuntu.iso /media/iso

Now connect your USB. In case it is not mounted the to mount it, do :

$ sudo mount /dev/sdc /medma/usb

Copy all files from mounted iso to the USB drive.

$ sudo cp -ra /media/iso/* /media/usb

Finally, we need to make this USB bootable. Copy ldlinux.sys file to USB drive to make it bootable.

$ sudo syslinux -s /dev/sdd1

Now rename some required files and directories as like below. Navigate to USB drive

$ cd /medma/usb
$ mv isolinux syslinux
$ cd syslinux
$ mv isolinux.cfg syslinux.cfg

Now you can connect this USB to the computer which you need to install Linux operating system and boot it from USB.