🔴IMPORTANT❗🔴 - Following the steps below could result in the non recoverable loss of data on a drive which is not your intent. Check, Check and Check again before hitting enter after any dd command.
A quick post on the steps I use to write raw CD image ISO files to USB thumb drives in order to take over the world, or at least boot from the IS file. The steps below will entirely overwrite existing data on the thumb drive if done correctly and will overwrite data on another drive if done wrong. Be careful and check your commands before submitting as there is no undo for dd.
Steps to Follow
- Open a shell command window.
- Change to the directory where the ISO file is located, or move the ISO file to the current directory.
- Insert USB thumb drive you wish to overwrite with ISO file.
- Identify device USB drive was detected as. I used the lsblk command, and in the output, I can see my 8G USB drive was detected as device sdg and it currently has two partitions which will be overwritten and lost.
- Prepare the command to do the work. In the below, I am writing an ISO file called install-amd64-minimal-20210203T214504Z.iso to a thumb drive detected as /dev/sdg. To understand the command below, please read the man page for dd, as you should for any command that you do not already fully understand, even commands less likely to destroy data on disk if there is a mistake.
Pressing <Enter> after a dd command with an incorrect target of= will destroy the data on that device. Be certain you have the correct device name identified. Beyond this point, danger awaits the unwary.
Check the command for typos, particularly the device specified as the target for overwrite after the of=. When comfortable everything looks good, check again. When ready to discover your fate, press <Enter> key. Note, I issued a sync command in the below output just to make sure all the writes are committed, likely unneeded, but hurts nothing.
The output should look something like the following when complete.
That’s it for this one. The next time, I need to make a boot able USB thumb drive, hopefully I will remember to refer back to this post.
You can use your Mastodon account to reply to this post.