I'm having a weird issue trying to create a bootable USB stick using dd. I ran a few commands to write an image but most of the time, it just finished quickly without changing anything on the USB. Here are the commands I've tried:
1. `dd if=./ of=/dev/sdb1 bs=4M status=progress oflag=direct`
2. `dd if=./ of=/dev/sdb1 bs=4M status=progress oflag=sync`
3. `dd if=./ of=/dev/sdb1 bs=4M status=progress conv=fsync`
4. `dd if=./ of=/dev/sdb1 bs=4M status=progress`
I also ran `sync` after each attempt and even tried removing `/dev/sdb` after unmounting the USB and rebooting the system. The process succeeded only once, but the rest of the time it just progressed really quickly and exited. This has never happened to me in the past two decades of using dd. Has anyone experienced something like this before?
2 Answers
I think the command you used, `rm /dev/sdb`, raises a red flag. Removing device files like that can cause issues; it might have created a regular file instead of affecting the actual block device. So it's possible that dd ended up copying a regular file instead of writing to your USB stick. Double-check that!
I've had a similar issue with USB drives where I couldn't repartition or format them. Ultimately, using GNOME Disk Utility helped me out, but I had to unmount and remount the drive a few times. It seemed like the boot block was causing the problem. My USB is still working fine now!

Yeah, that could definitely mess things up!