What is the best formatting tool for a USB flash drive?

Discussion in 'Computer Software and Operating Systems' started by Bean_BR, Dec 9, 2015.

  1. Bean_BR
    OP

    Bean_BR GBAtemp Regular

    Member
    236
    20
    Feb 2, 2011
    Brazil
    I have a Kingston DT101 G2 USB flash drive (8GB), and I'd like to know what is the most recommended tool to properly format it. I've found a format tool on their site but the model of my USB flash drive isn't listed on it. I was wondering if could use Panasonic SD formatter, as I believe it's the same type of flash memory, or I'm wrong?
    Thanks in advance.
     
  2. MarcusD

    MarcusD nobody's hero

    Member
    1,141
    2,200
    Oct 16, 2015
    Hungary
    a pixel between life and death
    Correct me if I'm wrong, but fully formatting a flashdrive isn't a good idea. There's something called dynamic wearing (search for it on Wikipedia) that makes your drive last longer by instead of overwriting the data, it displaces the data to a non-used place, and updates a reference to the new place. All this is needed because the flash memories have a limited erease cycle count (that's why very full flashdrives corrupt significantly faster than empty ones). So idk how the sdformatter works, but if you want to try to use that, you should try the "erease" option, because it may be the least bad to try. If that doesn't work, try your operating system's formatting utility, but never do a full format, because depending on the method, it may significantly faster corrupt the drive, so if you only want to delete all the files, use quick-fomat, because that only invalidates the file entries
     
    Last edited by MarcusD, Dec 9, 2015
  3. Bean_BR
    OP

    Bean_BR GBAtemp Regular

    Member
    236
    20
    Feb 2, 2011
    Brazil
    I'll research more about this before doing anything.
    Thanks!
     
  4. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,180
    8,922
    Nov 21, 2005
    It depends what you want to do, however I will assume it is just you want something basic to start from rather than because the police (who also happen to be signals intelligence for your country and are willing to use the crazy restore techniques) are about to kick down your door and you need to get rid of the evidence on one and burning the thing is not an option. If you just want to hand it to someone like me that knows about recuva and http://www.cgsecurity.org/wiki/PhotoRec then a full format (rather than a quick format) will do 99% of it, if you want you can use a file shredder that overwrites things and makes that even harder but a full format will do. Even deleting everything and then making a file to fill up the remaining space will do, though I might be able to recover some file names in some cases.
    Yeah I would not fully format a flash drive every week if I really wanted it to stand a chance of outliving me but if you want to do it just to start from scratch then you are far more likely to lose it, stand on it or otherwise have it be unavailable before you run out of sector lifetime. It is defragmenting that is the bigger worry for people. People have tested SD card endurance (which is basically the same tech as USB flash -- it is all NAND chips) though http://forum.embeddedarm.com/showthread.php?3-SD-card-endurance-test

    For most purposes plain old windows format will do the job. Maybe bump it up to the diskmgmt.msc program if you want to get really fancy or use some options plain old format decided was not useful to the average user (some of the sector sizes and file system types, especially on larger devices). The panasonic SD formatter (not sure what it is called these days but that search should find it) is a great tool though.

    If you have Linux (or one of the other X86 compatible non windows, non mac operating systems) then gparted is a wonderful tool. It is far more powerful than just a basic format tool though and is aimed more at sorting partitions of drives. It might not be installed with the basic OS but it should be in the repos and if you have any kind of rescue disc it will almost certainly be on that, or if you want it standalone then you can do that as well http://gparted.org/download.php . Indeed short of needing the forensic stuff or crazy recovery tools it is probably the best I know of, I certainly would not pay for something unless I needed it for a crazy file system for my server (and in most cases there I would wait a few months and gparted would probably get it or it would come with my server install media).
     
  5. Bean_BR
    OP

    Bean_BR GBAtemp Regular

    Member
    236
    20
    Feb 2, 2011
    Brazil
    There's nothing I want to hide LOL, what I want to do is just start from scratch. I will not be doing this full format for a long time, as I don't want to reduce it's perfomance. So, just to clarify, even the Panasonic SD formatter being aimed to SD cards, it can also be used on USB flash drives (pendrive, for example) without problem?
     
  6. MarcusD

    MarcusD nobody's hero

    Member
    1,141
    2,200
    Oct 16, 2015
    Hungary
    a pixel between life and death
    Yes, just try out the "erease" function, and not the overwrite one. If it's complaining about not being compatible, just do a quick format from the file manager
     
  7. Bean_BR
    OP

    Bean_BR GBAtemp Regular

    Member
    236
    20
    Feb 2, 2011
    Brazil
    Well, the Panasonic SD formatter worked on it. I don't know why it's not mentioned on the manual/guide that it also works on USB drives. I did a full(erase) format, but it detected that my USB drive didn't support, so it automatically did a quick format (which I believe is equivalent to manually deleting files). I also tried full(overwrite) and it took more time, but worked. Also, a question: I know that on SD cards (and USB drives on this case) have a "invisible" area where deleted data could be retrieved using specific tools. So, does using the overwrite option means that it fills this "invisible" area with random data, making impossible to retrieve deleted data? And why it's not a good option?
     
  8. MarcusD

    MarcusD nobody's hero

    Member
    1,141
    2,200
    Oct 16, 2015
    Hungary
    a pixel between life and death
    Yes, the overwrite deletes everything, but it's not recommended. It may cause multiple writes to a section, whereas the "erease" only does it once.
    And the only reason it's not recommended, because it may erease a sector multiple times, if the block size is not equivalent to the minimal ereasable area's size. It also writes a block multiple times, if the flush frequency is not equal to the minimal ereasable area size.

    Edit: so if the minimal ereasable area's size is 8192, and the clustersize is 4096, then you reprogram a block twice if you invalidate each cluster. And if you flush after every byte you write, it reprograms the area 8192 times!
     
    Last edited by MarcusD, Dec 9, 2015
  9. Bean_BR
    OP

    Bean_BR GBAtemp Regular

    Member
    236
    20
    Feb 2, 2011
    Brazil
    Well, I'm a noob at those details, so the best is to use full erase whenever it's possible, correct? Otherwise, just use quick format, right?
     
  10. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,180
    8,922
    Nov 21, 2005
    I thought you said we were not playing government level information security type stuff? Nobody is going to want to try getting around a simple full overwrite/full format.
    Anyway this stuff goes into two areas, possibly three, though they can be similar.
    The chips do not exist at the size they say they are -- the foundry will make them hoping they all work but know now all will. To that end when one comes out with not enough sectors to make it a 64 gig chip but enough to make it 32 it gets binned as 32 gigs (they may also bin it that low if there is a massive demand for 32 gig chips but in the end it is the same thing really). Flash tends to fail not by becoming inaccessible but by refusing to write within so many attempts. Theoretically you could then read "dead" sectors back for info. Some consider the failure stuff separate to the dead sector stuff.
    Basic wear levelling. MarcusD seems a bit paranoid about the well being of and/or respecting of his flash memory (the modern stuff is pretty good here, unless you get some very specialist gear or really really thrash it) but the underlying theory is as he said. Flash memory will cycle between the extra data it might have to effectively mean each sector experiences fewer writes, it tends not to overwrite the old data when it does this so something could be floating around to those that know how to look. This is not the sort of thing you recover with an even a deep scan with recuva or photorec and you will want a proper NAND reader and some skills in computing (for SD cards you might be able to work around it with SPI mode or possibly debug pins but let us not go there now). We did see some things like this for console hacking where programming/debug firmwares were left in the console and choice strings, debug info and unecrypted data was left in those.
     
  11. MarcusD

    MarcusD nobody's hero

    Member
    1,141
    2,200
    Oct 16, 2015
    Hungary
    a pixel between life and death
    My flashdrive died approx. a week ago, and almost half of my projects got corrupted and/or totally lost. It was >99% full, and I repeatedly compiled stuff on it, so it died. It was a very old Adata.

    When possible, yes, but it looks like it doesn't work for flashdrives. Also, don't worry, if you don't use your flashdrive as a RAM, and you don't format it regularly, it'll last a long time. Today's modern flashdrives' chips' regions can be reprogrammed 10k-100k times before they die, so don't worry :D

    That's why I bought a WD external harddrive, because the hard discs last much more longer if it's not influenced by mechanical shocks, and I can compile my programs a gajillion times without worrying about wear leveling, because hard discs don't require wear leveling.
     
    Last edited by MarcusD, Dec 9, 2015
  12. Bean_BR
    OP

    Bean_BR GBAtemp Regular

    Member
    236
    20
    Feb 2, 2011
    Brazil
    I'll not be abusing the use of my SD cards and USB drives, so it's all fine.
    Thanks for all the info!