Sometimes is this blog just my own collection of things that I learned and found in other blogs. That's why this small tutorial is just a shameless copy of Taro Satos post Creating Debian Wheezy Installation USB Stick.
We need to start with identification of the USB flash drive. We can do that with the following command and the USB flash drive pluged in.
sudo fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
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: 0x00000001
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 943314943 943312896 449.8G 83 Linux
/dev/sda2 943316990 976771071 33454082 16G 5 Extended
/dev/sda5 943316992 976771071 33454080 16G 82 Linux swap / Solaris
Disk /dev/sdb: 3.8 GiB, 4007657472 bytes, 7827456 sectors
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: 0x00000002
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 62 7826383 7826322 3.7G 83 Linux
The important part for me was at the end of the output. I need to use the
device /dev/sdb
.
I hope you have already downloaded the Debian image from the offical Debian
page
Downloading Debian CD/DVD images via HTTP/FTP.
The resulting file for me was debian-9.2.1-amd64-netinst.iso
.
The following command will transfer the image to the USB flash device.
sudo dd if=debian-9.2.1-amd64-netinst.iso of=/dev/sdb bs=4M; sync
72+1 records in
72+1 records out
304087040 bytes (304 MB, 290 MiB) copied, 0.246045 s, 1.2 GB/s