Jump to content

Recover full space of USB


corsarul2012
 Share

Recommended Posts

Hello,

I decided to install Windows via USB and i don't know what happened, but after re-formatting my USB, it had less space than before. Initially it was having 7,89 GB and now it has olnly 7,44 GB. What could I do, to recover the lost space?(I have treid command with clean and create partition primary with cmd, but it had no effect).

Thanks in advance!post-49803-0-46466200-1433699035_thumb.j

P.S: I wouldn't like to resoft the USB, but if I have to do so...

Edited by corsarul2012
Link to comment
Share on other sites

You may need to repartition it, use Windows Disk Management (diskmgmt.msc) to look at the drive partitioning and re-partition..

Windows does not see multiple partitions on USB thumb drives.

To the OP: Hook it up to a linux box and wipe it with dd at least the first few sectors. Then you should be able to reformat it and have all the space available.

Link to comment
Share on other sites

I'm not responsible for any damages so make sure you know what your doing! but you might try

$ sudo apt-get install gparted

$ sudo gparted

find which drive your usb is (/dev/sdc, /dev/sdd, etc) so you don't nuke your hard drive

exit gparted, then

$ sudo dd if=/dev/zero of=/dev/ofyourusbdevice bs=1M

then go back to gparted, recreate the partition table, then format it how you want, (for windows probably fat32 or ntfs)

Link to comment
Share on other sites

Easier option with Ubuntu:

lsblk

Will list block devices and associated partitions if they are recognized. Example of output:

protocol@Zion-VM:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0    80G  0 disk 
├─sda1   8:1    0    78G  0 part /
├─sda2   8:2    0     1K  0 part 
└─sda5   8:5    0     2G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom  
protocol@Zion-VM:~$ 

Find your sd[X] for the one matching thumb drive. Make sure to use the name of the type "disk" and not "part". Wiping out the partitions will not help you. If I wanted to wipe out my hard disk with the above output, I would use sda instead of sd[X] below. Chances are your USB drive will be /dev/sdb or /dev/sdc.

sudo dd if=/dev/zero of=/dev/sd[X] count=5

It will default to 512 block size, and you really only need count=1, but a few extra won't hurt.

Make sure to wait until the program returns "Records In" and "Records Out". It tends to hang a bit when writing to removable media due to the "lazy write"/write cache.

Then just reboot the computer just to make sure it actually wrote the data, and format with whatever OS you want. Should do the trick.

If that doesn't fix it, I would begin to think there are hardware issues with it.

Link to comment
Share on other sites

  • 1 month later...

I know I'm late BUT everything could actually be done from Windows ;)

  1. Press WinKey + R (Opens a run box)
  2. Type "dispart", press "OK"
  3. Grant Admin priviledges
  4. Type the following commands, each line represents a return:
  5. list disk
    select disk [disk number that matches your drive size]
    clean
    convert mbr
    create partition primary
    format quick
    

    Done! :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...