Changes

Talk:Partition and Format a USB Flash Drive with Linux

1,625 bytes added, 20:52, 4 December 2020
/* wipe your flash drive */ new section
The following lines were added (+) and removed (-):
== ext4 on usb flash ==ext4 I use the ext4 file system and turn off journaling in USB drives and memory cards. I also set the mount option 'noatime' in /etc/fstab in an installed system. See these links,Installation/UEFI-and-BIOSPendrive lifetimeLifespan a flash drive running Ubuntu? # sudo mkfs.ext4 /dev/sdc1 mke2fs 1.42.13 (17-May-2015) /dev/sdc1 contains a vfat file system Proceed anyway? (y,n) y /dev/sdc1 is mounted; will not make a filesystem here! # umount /dev/sdc1 # sudo mkfs.ext4 /dev/sdc1 mke2fs 1.42.13 (17-May-2015) /dev/sdc1 contains a vfat file system Proceed anyway? (y,n) y Creating filesystem with 31358720 4k blocks and 7839744 inodes== wipe your flash drive ==Have you tried fdisk? In a terminal, run sudo fdisk /dev/sdxwhere /dev/sdx should be replaced with the device file for your flash drive. Once you get fdisk open, type p to list the partition table, and if the mysterious partition is listed, you can use d # to delete it. (# is the number of the partition, so e.g. d 1, d 2) w writes the partition table back to the disk and q quits. (hit m for help)If even fdisk fails, I guess you could just try zeroing out the first sector, which I think contains the partition table. sudo dd if=/dev/zero of=/dev/sdx bs=512 count=1where, again, /dev/sdx should be replaced with the actual device for your flash drive, will do that for you. You can increase the count= number to write zeros to more of the disk, or omit it entirely to overwrite the entire disk. Needless to say, if you do this, you irretrievably lose any files that may have been stored on the disk.
Bureaucrat, administrator
16,195
edits