Restore the size of an USB Drive (Linux)

Overwrite the first few sectors (32KB is more than enough) with zeroes, then open cfdisk or fdisk or gparted and create a new partition table in the format you like (gpt or mbr).

dd if=/dev/zero of=/dev/sdb bs=32k count=1

And for that side node, you can only dd an ISO to a USB and boot from it if it is a hybrid ISO, i. e. an ISO that starts with a MBR or GPT partition table, and whose content is laid out that it has both a traditional filesystem and an ISO filesystem where the same file names point to the same files. (Also the bootloader has to detect that case and boot from USB or CD properly depending on what drive is present).

Tags:

Linux

Usb