Search the Community
Showing results for tags 'fdisk'.
Found 1 result
USB -- Tips
abarbarian posted a topic in Bruno's All Things LinuxThe easiest way to identify USB drive names is to use the “fdisk” command with a “-l” option for listing. >> fdisk -l The “lsusb” command in order to list the USB devices on your machine. >> lsusb To find out your USB stick or flash drive name under Linux, run: >> lsblk To find mountpoints and filesystems on Linux, you can use the findmnt command. >> findmnt /dev/sdb2 TARGET SOURCE FSTYPE OPTIONS /run/media/bloodaxe/Steam-D /dev/sdb2 ext4 rw,nosuid,nodev,relatime,errors=rem To test and detect bad sector in USB flash memory or pen drive, run: This will destroy all data on the drive and you will have to reinstall a file system on the drive afterward with something like gparted # badblocks -w -s /dev/sdX an example You can see that "badblocks" has run one "pattern" and has started another. If left to run "badblocks" will keep on running different "patterns" until you stop the process. In my first run through I let "badblocks" run through four different patterns before I stopped the process. I have no idea how many patterns it would have continued to run and did not wait to see as each pattern took 15 mins to complete on the 8 GB usb stick. Looks like my usb passed with no errors.