Monday, March 24, 2025

Linux: Burning an OS ISO image using "dd" utility

To write the installation ISO image to a flash drive in Linux, follow these steps:

1. Insert the flash drive into the USB port and run "lsblk" or "sudo fdisk -l", find the flash drive in the list based on its size (for example "/dev/sdX", where X is the letter).

2. Unmount the flash drive if it is mounted:
sudo umount /dev/sdX1

where X — the drive letter and the number — the number of the partition that was mounted.

3. Write the image with the "dd" command:
sudo dd bs=4M if=path_to_image.iso of=/dev/sdX status=progress oflag=sync

where bs=4M — the block size (speeds up writing);
if=... — the path to the downloaded image;
of=/dev/sdX — the flash drive device (replace X with your letter, but be very careful, if you mix up the letter, your data on the computer may be DESTROYED!!!);
status=progress — displays the progress;
oflag=sync — ensures correct writing.

4. Wait until the recording is finished and check the flash drive:
lsblk -f /dev/sdX

You should see partitions with the "iso9660" file system on the flash drive.

No comments:

Post a Comment