You are here

Create a bootable Ubuntu setup disk

Submitted by Alan Mels on Thu, 10/24/2024 - 16:51

1. Get iso file:

wget https://releases.ubuntu.com/24.04.1/ubuntu-24.04.1-live-server-amd64.iso

2. Find out the name of your USB drive with the lsblk command:

lsblk

3. Check allocation with fdisk -l:

  1. Disk /dev/sdc: 8053 MB, 8053063680 bytes, 15728640 sectors
  2. Units = sectors of 1 * 512 = 512 bytes
  3. Sector size (logical/physical): 512 bytes / 512 bytes
  4. I/O size (minimum/optimal): 512 bytes / 512 bytes
  5. Disk label type: dos
  6. Disk identifier: 0x44cea56d
  7.  
  8. Device Boot Start End Blocks Id System
  9. /dev/sdc1 * 64 15728639 7864288 b W95 FAT32

4. Format the flash drive (only for used drives as new ones come already empty):

sudo dd if=/dev/zero of=/dev/sdc bs=1M status=progress && sync

5. Write the iso file to it:

sudo dd bs=4M if=ubuntu-24.04.1-live-server-amd64.iso of=/dev/sdc conv=fdatasync  status=progress

The result should look like:

  1. sudo dd bs=4M if=ubuntu-24.04.1-live-server-amd64.iso of=/dev/sdc conv=fdatasync status=progress
  2. 2772434944 bytes (2.8 GB) copied, 105.753066 s, 26.2 MB/s
  3. 661+1 records in
  4. 661+1 records out
  5. 2773874688 bytes (2.8 GB) copied, 191.183 s, 14.5 MB/s

https://www.reddit.com/r/datarecovery/comments/g0fgmj/zerofilling_drive_...
https://superuser.com/questions/1505715/why-does-dd-give-me-an-error-at-...
https://linuxize.com/post/how-to-create-a-bootable-centos-7-usb-stick-on...
https://superuser.com/questions/1859777/the-dd-command-always-gives-me-a...
https://askubuntu.com/questions/372607/how-to-create-a-bootable-ubuntu-u...