# Open a terminal and create directory in Downloads folder
cd Downloads
mkdir debian
cd debian
# Download SHA512SUMS and SHA512SUMS.sign
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/SHA512SUMS
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/SHA512SUMS.sign
# if you need to import the debian gpg signing key
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys DA87E80D6294BE9B
# identify the flash drive using fdisk -l
# it’ll probably show up as /dev/sda, but at least make sure the size matches that of the drive
sudo fdisk -l
Disk /dev/sda: 15.55 GiB, 16693329920 bytes, 32604160 sectors
Disk model: BOOT DISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc3072e18
Device Boot Start End Sectors Size Id Type
/dev/sda1 240 32604159 32603920 15.5G c W95 FAT32 (LBA)
# So we're going to run the follow commands as the flash drive above we are using has mounted partitions
sudo umount /dev/sda1
# Identify the size of the ISO image using the stat command
# Replace the 12.11.0 with the latest version of debian in the command below
curl -s -L -I https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.11.... | grep 'content-length\|Content-Length'
# Along with the above number output use the head command to check the portion of the disk we've written
# the ISO to Prior to running this command it isn't a bad idea to unplug the USB drive and connect it again
sudo head -c 3942645760 /dev/sda | sha512sum
# Make sure the output above matches what is in the SHA512SUMS file we downloaded earlier
cat SHA512SUMS