Create Bootable USB Disk For Linux With "dd" Command
Bootable USB Disk creation is one of the common thing that Linux users will do often in their Linux Life.. ☻
There's a several ways are available to create bootable USB Disk for Linux (such as UNetbootin, Linux live usb.. etc..).
"dd" command is one of the simple way to create bootable USB disk for Linux through Linux Command Line..and also, The most Linux distros comes with "dd" tool pre-installed.
Today i am going to show how to create bootable USB with "dd" command..
Now see how to create one with dd command....
The first thing you have to do is , identifying your USB device label.. it's very important, Because if we identify it wrongly.. we will end up with data loss.. So be careful with while identifying which one is your intended USB disk for this operation.. Just see following example..
Just note that... sdb is my pen drive/device (sdb1 is partition present in my pendrive /dev/sdb). That is assigned by Linux operating system automatically while inserting pen drive into our system. You can identify it by typing following command
sudo fdisk -l
After identifying our intended device to create bootable USB disk, we need to format our pen drive/device..
Before formatting the device/pen drive , we have to unmount all of its mounted partitions ..
So , unmount it first with following command..
sudo umount /dev/sdb1
Now format the pen drive to FAT32 disk format..
sudo mkfs.vfat -I /dev/sdb
The above command will format the pen drive and makes FAT filesystem.
After that use dd command to create bootable USB disk..
sudo dd if=/path to iso/name_of_the_iso.iso of=/dev/sdb bs=1M; sync
For example, here i am going to create bootable USB disk from ubuntu-16.04-desktop-amd64.iso which is stored at ~/Downloads/os/.
sudo dd if=~/Downloads/os/ubuntu-16.04-desktop-amd64.iso of=/dev/sdb bs=1M; sync
Here,
If stands for input file. It is used to specify the location of the ISO file.
Of stands for output file. It specifies where to write the ISO file. In our case, it's /dev/sdb
It takes some time to copy one disk to another disk. dd tool does not show progressing status.
That’s all. You can use the same procedure to make any OS to make bootable USB drive.
Note that..While creating bootable USB by using above method, dd tool will make several partition on that pen drive. So after using bootable USB, It is best to format and use the pen drive for making another bootable ISO.
Don't forget to unmount the USB ... after unmounting the usb drive, run the following command to format it..
sudo mkfs.vfat -I /dev/sdb
That's all for now... and guys, Don't forget to share it with fellow Linux friends..