How to use dd to create a bootable USB stick ?

ยท 226 words ยท 2 minute read

Using dd needs a geek or a developer! if you want to use graphical tools instead, use rufus , popsicle or ventoy .

If you sure you want to use dd, here is the step by step guide.

First, identify your USB stick (a.k.a USB drive) on your system using this command sudo fdisk โ€“l.

list all connected storage devices

The USB stick in my case is /dev/sdb as you can see in the picture. So let’s unmount it via this command umount /dev/sdb*. Unmounting is nothing but an removing device from directory tree. Which prevents device from data loss.

Then, format the USB stick by this command mkfs.vfat /dev/sdb โ€“I. This command create FAT file system on the flash drive (USB stick).

After that, we use this command to create the bootable USB stick.

dd if=~/Downloads/Ubuntu2004.iso of=/dev/sdb

if (input file) : the ISO image of the operating system. of (output file) : the USB stick mount point.

To monitor dd progress use this command pgrep โ€“l โ€˜^dd$โ€™ which will print a process id. stop / kill this process id after finishing dd work by this command kill โ€“USR1 process-id for example kill โ€“USR1 6762.

That’s it. Your USB stick is bootable and ready to be used.

If you used the USB stick and want to format it to be normal storage device, just use this command sudo mkfs.vfat /dev/sdb โ€“I.

Share:
waffarx cash back