USB flash drive showing less GiB of capacity (no partition)Partition Bootable Flash DriveMissing space on...

How do I color the graph in datavisualization?

Has any country ever had 2 former presidents in jail simultaneously?

What is Cash Advance APR?

What should you do when eye contact makes your subordinate uncomfortable?

Start making guitar arrangements

What should you do if you miss a job interview (deliberately)?

Symbol used to indicate indivisibility

Why does the Sun have different day lengths, but not the gas giants?

How to follow the Halacha?

Aragorn's "guise" in the Orthanc Stone

New brakes for 90s road bike

What does routing an IP address mean?

Problem with TransformedDistribution

Are the IPv6 address space and IPv4 address space completely disjoint?

Non-trope happy ending?

It grows, but water kills it

"Spoil" vs "Ruin"

Added a new user on Ubuntu, set password not working?

Creepy dinosaur pc game identification

How to indicate a cut out for a product window

Which one is correct as adjective “protruding” or “protruded”?

Why did the EU agree to delay the Brexit deadline?

L1 and Ln cache: when are they written?

What was the exact wording from Ivanhoe of this advice on how to free yourself from slavery?



USB flash drive showing less GiB of capacity (no partition)


Partition Bootable Flash DriveMissing space on Flash drive (USB) - Can't reformat it alsoHow to create a bootable Memtest86+ on USB flash drive?USB flash drive showing up as two disksUnable to format RAW USB Flash DriveUbuntu: Computer/Properties drive size doesn't match disk/partition sizeKali won't boot without USB flash driveFiles from Mac are not showing on USB flash drive in WindowsBroke(?) my USB flash drive while burning a Windows 10 ISO from LinuxRead bytes from usb flash drive













1















Ok so my problem is that I had a Jetflash 32 GB USB flashdrive which used to have 32,000,000,000 bytes, or in other words its capacity was 29.8 GiB. I used to be able to right click on windows and see 29.8 as a number.



Now I did make a bootable USB via Linux to install Manjaro on somebody's computer. I can't remember what exactly I did back then to the flash drive. Long story short, when I formatted the USB in my computer (which happened a few weeks after the aforementioned incident) my flash drive now has 28 GiB of storage.



So I lost almost 2 GiB! I don't see any partitions nor unallocated space using any Windows tool or gparted in Linux.



Is there any low level tool that can delete any mbr/lba or whatever flag data and check my sectors one by one to determine my original capacity?



I did not find anything on the Internet. All the "my USB pen shows less GB" related topics are for solving issues where there was a smaller partition showing up and the rest of the space was just unallocated but "visible" to diskmanager or partitionmanager or gparted etc which is not my case.










share|improve this question

























  • You can use MKUSB > Restore to a standard storage device (Debian/Ubuntu and derivatives only). If it still shows the same then it's possible some sectors were deemed as bad and marked "not for use" in one of the formats.

    – user772515
    Sep 22 '17 at 8:11













  • What does gparted show now? Maybe Windows is just ignoring any extra partitions, but gparted shoudln't... There are proprietary programs to "re-flash" flash memory devices (USB drives, SD cards, etc), they're often used by scammers to sell a small (8-32GB) card that looks & kind of behaves like a much bigger card (128-256GB) but trying to write to the whole card will spot the fake. Last I read the programs were in Chinese...

    – Xen2050
    Sep 22 '17 at 9:06











  • @MichaelBay I'll try that mk USB and get back to you but I dont think that it would do anything different than rightclick>format on windows but I have nothing to lose tying it either.

    – papajo
    Sep 22 '17 at 9:12
















1















Ok so my problem is that I had a Jetflash 32 GB USB flashdrive which used to have 32,000,000,000 bytes, or in other words its capacity was 29.8 GiB. I used to be able to right click on windows and see 29.8 as a number.



Now I did make a bootable USB via Linux to install Manjaro on somebody's computer. I can't remember what exactly I did back then to the flash drive. Long story short, when I formatted the USB in my computer (which happened a few weeks after the aforementioned incident) my flash drive now has 28 GiB of storage.



So I lost almost 2 GiB! I don't see any partitions nor unallocated space using any Windows tool or gparted in Linux.



Is there any low level tool that can delete any mbr/lba or whatever flag data and check my sectors one by one to determine my original capacity?



I did not find anything on the Internet. All the "my USB pen shows less GB" related topics are for solving issues where there was a smaller partition showing up and the rest of the space was just unallocated but "visible" to diskmanager or partitionmanager or gparted etc which is not my case.










share|improve this question

























  • You can use MKUSB > Restore to a standard storage device (Debian/Ubuntu and derivatives only). If it still shows the same then it's possible some sectors were deemed as bad and marked "not for use" in one of the formats.

    – user772515
    Sep 22 '17 at 8:11













  • What does gparted show now? Maybe Windows is just ignoring any extra partitions, but gparted shoudln't... There are proprietary programs to "re-flash" flash memory devices (USB drives, SD cards, etc), they're often used by scammers to sell a small (8-32GB) card that looks & kind of behaves like a much bigger card (128-256GB) but trying to write to the whole card will spot the fake. Last I read the programs were in Chinese...

    – Xen2050
    Sep 22 '17 at 9:06











  • @MichaelBay I'll try that mk USB and get back to you but I dont think that it would do anything different than rightclick>format on windows but I have nothing to lose tying it either.

    – papajo
    Sep 22 '17 at 9:12














1












1








1








Ok so my problem is that I had a Jetflash 32 GB USB flashdrive which used to have 32,000,000,000 bytes, or in other words its capacity was 29.8 GiB. I used to be able to right click on windows and see 29.8 as a number.



Now I did make a bootable USB via Linux to install Manjaro on somebody's computer. I can't remember what exactly I did back then to the flash drive. Long story short, when I formatted the USB in my computer (which happened a few weeks after the aforementioned incident) my flash drive now has 28 GiB of storage.



So I lost almost 2 GiB! I don't see any partitions nor unallocated space using any Windows tool or gparted in Linux.



Is there any low level tool that can delete any mbr/lba or whatever flag data and check my sectors one by one to determine my original capacity?



I did not find anything on the Internet. All the "my USB pen shows less GB" related topics are for solving issues where there was a smaller partition showing up and the rest of the space was just unallocated but "visible" to diskmanager or partitionmanager or gparted etc which is not my case.










share|improve this question
















Ok so my problem is that I had a Jetflash 32 GB USB flashdrive which used to have 32,000,000,000 bytes, or in other words its capacity was 29.8 GiB. I used to be able to right click on windows and see 29.8 as a number.



Now I did make a bootable USB via Linux to install Manjaro on somebody's computer. I can't remember what exactly I did back then to the flash drive. Long story short, when I formatted the USB in my computer (which happened a few weeks after the aforementioned incident) my flash drive now has 28 GiB of storage.



So I lost almost 2 GiB! I don't see any partitions nor unallocated space using any Windows tool or gparted in Linux.



Is there any low level tool that can delete any mbr/lba or whatever flag data and check my sectors one by one to determine my original capacity?



I did not find anything on the Internet. All the "my USB pen shows less GB" related topics are for solving issues where there was a smaller partition showing up and the rest of the space was just unallocated but "visible" to diskmanager or partitionmanager or gparted etc which is not my case.







usb-flash-drive formatting






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 14 mins ago









fixer1234

19k144982




19k144982










asked Sep 22 '17 at 7:51









papajopapajo

1278




1278













  • You can use MKUSB > Restore to a standard storage device (Debian/Ubuntu and derivatives only). If it still shows the same then it's possible some sectors were deemed as bad and marked "not for use" in one of the formats.

    – user772515
    Sep 22 '17 at 8:11













  • What does gparted show now? Maybe Windows is just ignoring any extra partitions, but gparted shoudln't... There are proprietary programs to "re-flash" flash memory devices (USB drives, SD cards, etc), they're often used by scammers to sell a small (8-32GB) card that looks & kind of behaves like a much bigger card (128-256GB) but trying to write to the whole card will spot the fake. Last I read the programs were in Chinese...

    – Xen2050
    Sep 22 '17 at 9:06











  • @MichaelBay I'll try that mk USB and get back to you but I dont think that it would do anything different than rightclick>format on windows but I have nothing to lose tying it either.

    – papajo
    Sep 22 '17 at 9:12



















  • You can use MKUSB > Restore to a standard storage device (Debian/Ubuntu and derivatives only). If it still shows the same then it's possible some sectors were deemed as bad and marked "not for use" in one of the formats.

    – user772515
    Sep 22 '17 at 8:11













  • What does gparted show now? Maybe Windows is just ignoring any extra partitions, but gparted shoudln't... There are proprietary programs to "re-flash" flash memory devices (USB drives, SD cards, etc), they're often used by scammers to sell a small (8-32GB) card that looks & kind of behaves like a much bigger card (128-256GB) but trying to write to the whole card will spot the fake. Last I read the programs were in Chinese...

    – Xen2050
    Sep 22 '17 at 9:06











  • @MichaelBay I'll try that mk USB and get back to you but I dont think that it would do anything different than rightclick>format on windows but I have nothing to lose tying it either.

    – papajo
    Sep 22 '17 at 9:12

















You can use MKUSB > Restore to a standard storage device (Debian/Ubuntu and derivatives only). If it still shows the same then it's possible some sectors were deemed as bad and marked "not for use" in one of the formats.

– user772515
Sep 22 '17 at 8:11







You can use MKUSB > Restore to a standard storage device (Debian/Ubuntu and derivatives only). If it still shows the same then it's possible some sectors were deemed as bad and marked "not for use" in one of the formats.

– user772515
Sep 22 '17 at 8:11















What does gparted show now? Maybe Windows is just ignoring any extra partitions, but gparted shoudln't... There are proprietary programs to "re-flash" flash memory devices (USB drives, SD cards, etc), they're often used by scammers to sell a small (8-32GB) card that looks & kind of behaves like a much bigger card (128-256GB) but trying to write to the whole card will spot the fake. Last I read the programs were in Chinese...

– Xen2050
Sep 22 '17 at 9:06





What does gparted show now? Maybe Windows is just ignoring any extra partitions, but gparted shoudln't... There are proprietary programs to "re-flash" flash memory devices (USB drives, SD cards, etc), they're often used by scammers to sell a small (8-32GB) card that looks & kind of behaves like a much bigger card (128-256GB) but trying to write to the whole card will spot the fake. Last I read the programs were in Chinese...

– Xen2050
Sep 22 '17 at 9:06













@MichaelBay I'll try that mk USB and get back to you but I dont think that it would do anything different than rightclick>format on windows but I have nothing to lose tying it either.

– papajo
Sep 22 '17 at 9:12





@MichaelBay I'll try that mk USB and get back to you but I dont think that it would do anything different than rightclick>format on windows but I have nothing to lose tying it either.

– papajo
Sep 22 '17 at 9:12










1 Answer
1






active

oldest

votes


















1














I used a dd-inspired tool like mkusb on a flash drive before, like the mkusb Ubuntu help page says they:




'use the whole device', actually only the head end (size of the iso file), but the rest of the device is not available. mkusb simply clones the ISO 9660 file system with its content from the iso file. This ISO 9660 file system works from CD/DVD disks, and also from USB drives. After using a USB pendrive like this, you make a new partition table and file system, if you want to use it for another purpose.




Down the the link chain leads to Help to Format a USB pendrive. Creating a new partition table, then partition(s) should do the trick, unless you run into the "special cases" of a problem flash device. The one I had just wouldn't really listen and would occasionally pick up remnants of the old ISO filesystem months after formatting & reusing it.



Overwriting the first gigabyte (where the ISO originally was) solved my problem, but if you wanted to overwrite the entire USB that should work too (at the expense of one less lifetime writes to the flash memory), or just the first megabyte is supposed to work too...



Using plan dd from linux should do it. First make 100% certain you have the correct device (like /dev/sdx, using lsblk or gparted or gnome-disk-utility or watching dmesg/the syslog when plugging in the device should tell you)





  • To overwrite just the first megabyte (1M, where M =1024*1024) you'd do



    dd if=/dev/zero of=/dev/sdx bs=1M count=1


    To overwrite more M's use a larger count.




  • To overwrite the first gigabyte (1G, where G =1024*1024*1024) do



    dd if=/dev/zero of=/dev/sdx bs=1G count=1



  • To overwrite the entire device, don't use any bs or count, just do



    dd if=/dev/zero of=/dev/sdx


    When it's finished dd will tell you how much it was able to write before reaching the end of the device, giving you an idea of how much is really writeable, similar to this:



    1+0 records in
    1+0 records out
    1048576 bytes (1.0 MB) copied, 0.000838339 s, 1.3 GB/s



If dd is taking a long time you can "Send a USR1 signal to a running 'dd' process mak[ing] it print I/O statistics to standard error and then resume copying." Use kill and pgrep or ps pkill or htop or maybe even killall if you're careful, or see man dd for an example like:



$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid

18335302+0 records in 18335302+0 records out 9387674624 bytes (9.4 GB) copied,
34.6279 seconds, 271 MB/s




Once dd is finished, write a new partition table and make a new partition and format it. I'd use gparted, it's got a create partition table option in a menu, and usually works well.






share|improve this answer
























  • bs=1M will just create blocks of 1MB size not write from the first sector and if I use bs=1G it will write blocks of 1GB which will make my USB drive very slow for copying files less than 1GB (which would the usual thing) are you sure about that?

    – papajo
    Sep 22 '17 at 10:42











  • Those "blocks" are just what dd uses, it doesn't change the device, just writes to it in chunks that size. Unless you use other flags like seek= or skip= then dd should start reading & writing at the "start" of each device. You might be thinking of the device's/drive's sector size, I'm pretty sure you can't change that - dd definitely can't

    – Xen2050
    Sep 22 '17 at 11:11













  • Seriously, use wipefs unless you are determined to do a full zero out. An arbitrary partial zero out makes little sense. Also it doesn't wipe the backup GPT.

    – Tom Yan
    Sep 22 '17 at 13:50











  • @TomYan Like the multiple linked help pages suggest, even gparted alone should be fine with a normal drive, but this is a special case / problem drive. And where's the backup GPT kept, somewhere that overwriting every sector of the drive can't touch it? If it's on the drive & writable, then dd will overwrite it.

    – Xen2050
    Sep 22 '17 at 16:33













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1252711%2fusb-flash-drive-showing-less-gib-of-capacity-no-partition%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I used a dd-inspired tool like mkusb on a flash drive before, like the mkusb Ubuntu help page says they:




'use the whole device', actually only the head end (size of the iso file), but the rest of the device is not available. mkusb simply clones the ISO 9660 file system with its content from the iso file. This ISO 9660 file system works from CD/DVD disks, and also from USB drives. After using a USB pendrive like this, you make a new partition table and file system, if you want to use it for another purpose.




Down the the link chain leads to Help to Format a USB pendrive. Creating a new partition table, then partition(s) should do the trick, unless you run into the "special cases" of a problem flash device. The one I had just wouldn't really listen and would occasionally pick up remnants of the old ISO filesystem months after formatting & reusing it.



Overwriting the first gigabyte (where the ISO originally was) solved my problem, but if you wanted to overwrite the entire USB that should work too (at the expense of one less lifetime writes to the flash memory), or just the first megabyte is supposed to work too...



Using plan dd from linux should do it. First make 100% certain you have the correct device (like /dev/sdx, using lsblk or gparted or gnome-disk-utility or watching dmesg/the syslog when plugging in the device should tell you)





  • To overwrite just the first megabyte (1M, where M =1024*1024) you'd do



    dd if=/dev/zero of=/dev/sdx bs=1M count=1


    To overwrite more M's use a larger count.




  • To overwrite the first gigabyte (1G, where G =1024*1024*1024) do



    dd if=/dev/zero of=/dev/sdx bs=1G count=1



  • To overwrite the entire device, don't use any bs or count, just do



    dd if=/dev/zero of=/dev/sdx


    When it's finished dd will tell you how much it was able to write before reaching the end of the device, giving you an idea of how much is really writeable, similar to this:



    1+0 records in
    1+0 records out
    1048576 bytes (1.0 MB) copied, 0.000838339 s, 1.3 GB/s



If dd is taking a long time you can "Send a USR1 signal to a running 'dd' process mak[ing] it print I/O statistics to standard error and then resume copying." Use kill and pgrep or ps pkill or htop or maybe even killall if you're careful, or see man dd for an example like:



$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid

18335302+0 records in 18335302+0 records out 9387674624 bytes (9.4 GB) copied,
34.6279 seconds, 271 MB/s




Once dd is finished, write a new partition table and make a new partition and format it. I'd use gparted, it's got a create partition table option in a menu, and usually works well.






share|improve this answer
























  • bs=1M will just create blocks of 1MB size not write from the first sector and if I use bs=1G it will write blocks of 1GB which will make my USB drive very slow for copying files less than 1GB (which would the usual thing) are you sure about that?

    – papajo
    Sep 22 '17 at 10:42











  • Those "blocks" are just what dd uses, it doesn't change the device, just writes to it in chunks that size. Unless you use other flags like seek= or skip= then dd should start reading & writing at the "start" of each device. You might be thinking of the device's/drive's sector size, I'm pretty sure you can't change that - dd definitely can't

    – Xen2050
    Sep 22 '17 at 11:11













  • Seriously, use wipefs unless you are determined to do a full zero out. An arbitrary partial zero out makes little sense. Also it doesn't wipe the backup GPT.

    – Tom Yan
    Sep 22 '17 at 13:50











  • @TomYan Like the multiple linked help pages suggest, even gparted alone should be fine with a normal drive, but this is a special case / problem drive. And where's the backup GPT kept, somewhere that overwriting every sector of the drive can't touch it? If it's on the drive & writable, then dd will overwrite it.

    – Xen2050
    Sep 22 '17 at 16:33


















1














I used a dd-inspired tool like mkusb on a flash drive before, like the mkusb Ubuntu help page says they:




'use the whole device', actually only the head end (size of the iso file), but the rest of the device is not available. mkusb simply clones the ISO 9660 file system with its content from the iso file. This ISO 9660 file system works from CD/DVD disks, and also from USB drives. After using a USB pendrive like this, you make a new partition table and file system, if you want to use it for another purpose.




Down the the link chain leads to Help to Format a USB pendrive. Creating a new partition table, then partition(s) should do the trick, unless you run into the "special cases" of a problem flash device. The one I had just wouldn't really listen and would occasionally pick up remnants of the old ISO filesystem months after formatting & reusing it.



Overwriting the first gigabyte (where the ISO originally was) solved my problem, but if you wanted to overwrite the entire USB that should work too (at the expense of one less lifetime writes to the flash memory), or just the first megabyte is supposed to work too...



Using plan dd from linux should do it. First make 100% certain you have the correct device (like /dev/sdx, using lsblk or gparted or gnome-disk-utility or watching dmesg/the syslog when plugging in the device should tell you)





  • To overwrite just the first megabyte (1M, where M =1024*1024) you'd do



    dd if=/dev/zero of=/dev/sdx bs=1M count=1


    To overwrite more M's use a larger count.




  • To overwrite the first gigabyte (1G, where G =1024*1024*1024) do



    dd if=/dev/zero of=/dev/sdx bs=1G count=1



  • To overwrite the entire device, don't use any bs or count, just do



    dd if=/dev/zero of=/dev/sdx


    When it's finished dd will tell you how much it was able to write before reaching the end of the device, giving you an idea of how much is really writeable, similar to this:



    1+0 records in
    1+0 records out
    1048576 bytes (1.0 MB) copied, 0.000838339 s, 1.3 GB/s



If dd is taking a long time you can "Send a USR1 signal to a running 'dd' process mak[ing] it print I/O statistics to standard error and then resume copying." Use kill and pgrep or ps pkill or htop or maybe even killall if you're careful, or see man dd for an example like:



$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid

18335302+0 records in 18335302+0 records out 9387674624 bytes (9.4 GB) copied,
34.6279 seconds, 271 MB/s




Once dd is finished, write a new partition table and make a new partition and format it. I'd use gparted, it's got a create partition table option in a menu, and usually works well.






share|improve this answer
























  • bs=1M will just create blocks of 1MB size not write from the first sector and if I use bs=1G it will write blocks of 1GB which will make my USB drive very slow for copying files less than 1GB (which would the usual thing) are you sure about that?

    – papajo
    Sep 22 '17 at 10:42











  • Those "blocks" are just what dd uses, it doesn't change the device, just writes to it in chunks that size. Unless you use other flags like seek= or skip= then dd should start reading & writing at the "start" of each device. You might be thinking of the device's/drive's sector size, I'm pretty sure you can't change that - dd definitely can't

    – Xen2050
    Sep 22 '17 at 11:11













  • Seriously, use wipefs unless you are determined to do a full zero out. An arbitrary partial zero out makes little sense. Also it doesn't wipe the backup GPT.

    – Tom Yan
    Sep 22 '17 at 13:50











  • @TomYan Like the multiple linked help pages suggest, even gparted alone should be fine with a normal drive, but this is a special case / problem drive. And where's the backup GPT kept, somewhere that overwriting every sector of the drive can't touch it? If it's on the drive & writable, then dd will overwrite it.

    – Xen2050
    Sep 22 '17 at 16:33
















1












1








1







I used a dd-inspired tool like mkusb on a flash drive before, like the mkusb Ubuntu help page says they:




'use the whole device', actually only the head end (size of the iso file), but the rest of the device is not available. mkusb simply clones the ISO 9660 file system with its content from the iso file. This ISO 9660 file system works from CD/DVD disks, and also from USB drives. After using a USB pendrive like this, you make a new partition table and file system, if you want to use it for another purpose.




Down the the link chain leads to Help to Format a USB pendrive. Creating a new partition table, then partition(s) should do the trick, unless you run into the "special cases" of a problem flash device. The one I had just wouldn't really listen and would occasionally pick up remnants of the old ISO filesystem months after formatting & reusing it.



Overwriting the first gigabyte (where the ISO originally was) solved my problem, but if you wanted to overwrite the entire USB that should work too (at the expense of one less lifetime writes to the flash memory), or just the first megabyte is supposed to work too...



Using plan dd from linux should do it. First make 100% certain you have the correct device (like /dev/sdx, using lsblk or gparted or gnome-disk-utility or watching dmesg/the syslog when plugging in the device should tell you)





  • To overwrite just the first megabyte (1M, where M =1024*1024) you'd do



    dd if=/dev/zero of=/dev/sdx bs=1M count=1


    To overwrite more M's use a larger count.




  • To overwrite the first gigabyte (1G, where G =1024*1024*1024) do



    dd if=/dev/zero of=/dev/sdx bs=1G count=1



  • To overwrite the entire device, don't use any bs or count, just do



    dd if=/dev/zero of=/dev/sdx


    When it's finished dd will tell you how much it was able to write before reaching the end of the device, giving you an idea of how much is really writeable, similar to this:



    1+0 records in
    1+0 records out
    1048576 bytes (1.0 MB) copied, 0.000838339 s, 1.3 GB/s



If dd is taking a long time you can "Send a USR1 signal to a running 'dd' process mak[ing] it print I/O statistics to standard error and then resume copying." Use kill and pgrep or ps pkill or htop or maybe even killall if you're careful, or see man dd for an example like:



$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid

18335302+0 records in 18335302+0 records out 9387674624 bytes (9.4 GB) copied,
34.6279 seconds, 271 MB/s




Once dd is finished, write a new partition table and make a new partition and format it. I'd use gparted, it's got a create partition table option in a menu, and usually works well.






share|improve this answer













I used a dd-inspired tool like mkusb on a flash drive before, like the mkusb Ubuntu help page says they:




'use the whole device', actually only the head end (size of the iso file), but the rest of the device is not available. mkusb simply clones the ISO 9660 file system with its content from the iso file. This ISO 9660 file system works from CD/DVD disks, and also from USB drives. After using a USB pendrive like this, you make a new partition table and file system, if you want to use it for another purpose.




Down the the link chain leads to Help to Format a USB pendrive. Creating a new partition table, then partition(s) should do the trick, unless you run into the "special cases" of a problem flash device. The one I had just wouldn't really listen and would occasionally pick up remnants of the old ISO filesystem months after formatting & reusing it.



Overwriting the first gigabyte (where the ISO originally was) solved my problem, but if you wanted to overwrite the entire USB that should work too (at the expense of one less lifetime writes to the flash memory), or just the first megabyte is supposed to work too...



Using plan dd from linux should do it. First make 100% certain you have the correct device (like /dev/sdx, using lsblk or gparted or gnome-disk-utility or watching dmesg/the syslog when plugging in the device should tell you)





  • To overwrite just the first megabyte (1M, where M =1024*1024) you'd do



    dd if=/dev/zero of=/dev/sdx bs=1M count=1


    To overwrite more M's use a larger count.




  • To overwrite the first gigabyte (1G, where G =1024*1024*1024) do



    dd if=/dev/zero of=/dev/sdx bs=1G count=1



  • To overwrite the entire device, don't use any bs or count, just do



    dd if=/dev/zero of=/dev/sdx


    When it's finished dd will tell you how much it was able to write before reaching the end of the device, giving you an idea of how much is really writeable, similar to this:



    1+0 records in
    1+0 records out
    1048576 bytes (1.0 MB) copied, 0.000838339 s, 1.3 GB/s



If dd is taking a long time you can "Send a USR1 signal to a running 'dd' process mak[ing] it print I/O statistics to standard error and then resume copying." Use kill and pgrep or ps pkill or htop or maybe even killall if you're careful, or see man dd for an example like:



$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid

18335302+0 records in 18335302+0 records out 9387674624 bytes (9.4 GB) copied,
34.6279 seconds, 271 MB/s




Once dd is finished, write a new partition table and make a new partition and format it. I'd use gparted, it's got a create partition table option in a menu, and usually works well.







share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 22 '17 at 9:33









Xen2050Xen2050

11.2k31637




11.2k31637













  • bs=1M will just create blocks of 1MB size not write from the first sector and if I use bs=1G it will write blocks of 1GB which will make my USB drive very slow for copying files less than 1GB (which would the usual thing) are you sure about that?

    – papajo
    Sep 22 '17 at 10:42











  • Those "blocks" are just what dd uses, it doesn't change the device, just writes to it in chunks that size. Unless you use other flags like seek= or skip= then dd should start reading & writing at the "start" of each device. You might be thinking of the device's/drive's sector size, I'm pretty sure you can't change that - dd definitely can't

    – Xen2050
    Sep 22 '17 at 11:11













  • Seriously, use wipefs unless you are determined to do a full zero out. An arbitrary partial zero out makes little sense. Also it doesn't wipe the backup GPT.

    – Tom Yan
    Sep 22 '17 at 13:50











  • @TomYan Like the multiple linked help pages suggest, even gparted alone should be fine with a normal drive, but this is a special case / problem drive. And where's the backup GPT kept, somewhere that overwriting every sector of the drive can't touch it? If it's on the drive & writable, then dd will overwrite it.

    – Xen2050
    Sep 22 '17 at 16:33





















  • bs=1M will just create blocks of 1MB size not write from the first sector and if I use bs=1G it will write blocks of 1GB which will make my USB drive very slow for copying files less than 1GB (which would the usual thing) are you sure about that?

    – papajo
    Sep 22 '17 at 10:42











  • Those "blocks" are just what dd uses, it doesn't change the device, just writes to it in chunks that size. Unless you use other flags like seek= or skip= then dd should start reading & writing at the "start" of each device. You might be thinking of the device's/drive's sector size, I'm pretty sure you can't change that - dd definitely can't

    – Xen2050
    Sep 22 '17 at 11:11













  • Seriously, use wipefs unless you are determined to do a full zero out. An arbitrary partial zero out makes little sense. Also it doesn't wipe the backup GPT.

    – Tom Yan
    Sep 22 '17 at 13:50











  • @TomYan Like the multiple linked help pages suggest, even gparted alone should be fine with a normal drive, but this is a special case / problem drive. And where's the backup GPT kept, somewhere that overwriting every sector of the drive can't touch it? If it's on the drive & writable, then dd will overwrite it.

    – Xen2050
    Sep 22 '17 at 16:33



















bs=1M will just create blocks of 1MB size not write from the first sector and if I use bs=1G it will write blocks of 1GB which will make my USB drive very slow for copying files less than 1GB (which would the usual thing) are you sure about that?

– papajo
Sep 22 '17 at 10:42





bs=1M will just create blocks of 1MB size not write from the first sector and if I use bs=1G it will write blocks of 1GB which will make my USB drive very slow for copying files less than 1GB (which would the usual thing) are you sure about that?

– papajo
Sep 22 '17 at 10:42













Those "blocks" are just what dd uses, it doesn't change the device, just writes to it in chunks that size. Unless you use other flags like seek= or skip= then dd should start reading & writing at the "start" of each device. You might be thinking of the device's/drive's sector size, I'm pretty sure you can't change that - dd definitely can't

– Xen2050
Sep 22 '17 at 11:11







Those "blocks" are just what dd uses, it doesn't change the device, just writes to it in chunks that size. Unless you use other flags like seek= or skip= then dd should start reading & writing at the "start" of each device. You might be thinking of the device's/drive's sector size, I'm pretty sure you can't change that - dd definitely can't

– Xen2050
Sep 22 '17 at 11:11















Seriously, use wipefs unless you are determined to do a full zero out. An arbitrary partial zero out makes little sense. Also it doesn't wipe the backup GPT.

– Tom Yan
Sep 22 '17 at 13:50





Seriously, use wipefs unless you are determined to do a full zero out. An arbitrary partial zero out makes little sense. Also it doesn't wipe the backup GPT.

– Tom Yan
Sep 22 '17 at 13:50













@TomYan Like the multiple linked help pages suggest, even gparted alone should be fine with a normal drive, but this is a special case / problem drive. And where's the backup GPT kept, somewhere that overwriting every sector of the drive can't touch it? If it's on the drive & writable, then dd will overwrite it.

– Xen2050
Sep 22 '17 at 16:33







@TomYan Like the multiple linked help pages suggest, even gparted alone should be fine with a normal drive, but this is a special case / problem drive. And where's the backup GPT kept, somewhere that overwriting every sector of the drive can't touch it? If it's on the drive & writable, then dd will overwrite it.

– Xen2050
Sep 22 '17 at 16:33




















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1252711%2fusb-flash-drive-showing-less-gib-of-capacity-no-partition%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...