Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 80
- down vote
- The Command-Line Way
- In case you can't get your device formatted from the GUI, try this way.
- Open the Terminal (Ctrl + Alt + T)
- List your block storage devices by issuing the command lsblk
- Then identify your pen drive by it's SIZE. In my case its /dev/sdb
- enter image description here
- Erase everything in the pen drive (OPTIONAL):
- sudo dd if=/dev/zero of=**/dev/sdb** bs=4k && sync
- Replace /dev/sdb with your corresponding device. This will take some time. It will pretend to be stuck. Just be patient.
- for example:
- dd if=/dev/zero of=/dev/sdb bs=4k && sync
- dd: error writing '/dev/sdb': No space left on device
- 1984257+0 records in
- 1984256+0 records out
- 8127512576 bytes (8.1 GB) copied, 1236.37 s, 6.6 MB/s
- Make a new partition table in the device:
- sudo fdisk /dev/sdb
- Then press letter o to create a new empty DOS partition table.
- Make a new partition:
- Press letter n to add a new partition. You will be prompted for the size of the partition. Making a primary partition when prompted, if you are not sure.
- Then press letter w to write table to disk and exit.
- Format your new partition.
- See your new partition label with the command lsblk
- In my case it is /dev/sdb1
- lsblk output
- Issue the command below to format the new volume:
- sudo mkfs.vfat **/dev/sdb1**
- Please replace /dev/sdb1 with your corresponding device.
- Eject the device:
- sudo eject /dev/sdb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement