How to restore original size and unboot my bootable USB pendriveHow to fix USB flash on Ubuntu?unable to open /dev/sdb: Read-only file systemHow to restore the original size of this flash drive?corrupted bootable usb stickCan't format bootable USB stick [Ubuntu 19.04]Not able to format PendriveCan't format my usb drive. I have already tried with mkdosfs and gpartedHow to create a OS X Mountain Lion Bootable USB drive on Ubuntu?Cannot repair a corrupted usb flash driveMy pendrive size decreased from 32GB to 2.25MB after booting it with Ubuntu 14.04 LTSUSB wrong size after formattingProblems creating bootable USB-(SSD)-DriveProblems with USB on Ubuntu 16.04Bootable USB for Windows 10

Is a vector space naturally isomorphic to its dual?

Physical interpretation of complex numbers

Does quickening a spell change the kind of action it grants?

Is it a good idea to contact a candidate?

Do Macs come with any programming language available from the Terminal?

50k job is offering 90k worth of shares. Scam?

Speaking German abroad and feeling condescended to

How to draw the following image in TikZ?

Does a symmetric positive definite matrix also have A = L^T * L, (L is lower triangular matrix)?

How to get out of the Ice Palace in Zelda A link to the Past?

Why did Leia not want to tell Han about Luke being her twin brother?

Do rainbows show spectral lines from the sun?

Will a nuclear country use nuclear weapons if attacked by conventional means by another nuclear country?

Could you fly a Boeing 747 on Venus?

What is the meaning of "Ya con hotra y como se yama mijo"?

Slimy whey in store-bought yoghurt

Is it sportsmanlike to waste opponents' time by giving check at the end of the game?

What is the difference between diminished fifth and augmented fourth?

Calculate the sum of interior angles of a polygon

A professor commented that my research is too simple as compared to my colleagues. What does that mean about my future prospects?

Do airplanes need brakes in the air?

How do the Martian rebels defeat Earth when they're grossly outnumbered and outgunned?

Was the whistle-blower's (12 Aug 2019) complaint deemed credible?

Could the Ancient Egyptian hieroglyphs have been deciphered without the Rosetta Stone with modern tech?



How to restore original size and unboot my bootable USB pendrive


How to fix USB flash on Ubuntu?unable to open /dev/sdb: Read-only file systemHow to restore the original size of this flash drive?corrupted bootable usb stickCan't format bootable USB stick [Ubuntu 19.04]Not able to format PendriveCan't format my usb drive. I have already tried with mkdosfs and gpartedHow to create a OS X Mountain Lion Bootable USB drive on Ubuntu?Cannot repair a corrupted usb flash driveMy pendrive size decreased from 32GB to 2.25MB after booting it with Ubuntu 14.04 LTSUSB wrong size after formattingProblems creating bootable USB-(SSD)-DriveProblems with USB on Ubuntu 16.04Bootable USB for Windows 10






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2

















I recently made my pen-drive bootable with Ubuntu 14.04. But I need to unboot my pen-drive now. I formatted my pen-drive once,But the size of the pen-drive still shows 2.25 MB. Whereas,this is an 8GB pen-drive. How can I get rid of this problem. I'm still using Windows 7.










share|improve this question




























  • Tried to remove the files?

    – Gunnar Hjalmarsson
    Jul 11 '14 at 5:41











  • Try to fix it from Windows Disk Management Tool.

    – Nischay
    Jul 11 '14 at 5:44

















2

















I recently made my pen-drive bootable with Ubuntu 14.04. But I need to unboot my pen-drive now. I formatted my pen-drive once,But the size of the pen-drive still shows 2.25 MB. Whereas,this is an 8GB pen-drive. How can I get rid of this problem. I'm still using Windows 7.










share|improve this question




























  • Tried to remove the files?

    – Gunnar Hjalmarsson
    Jul 11 '14 at 5:41











  • Try to fix it from Windows Disk Management Tool.

    – Nischay
    Jul 11 '14 at 5:44













2












2








2


1






I recently made my pen-drive bootable with Ubuntu 14.04. But I need to unboot my pen-drive now. I formatted my pen-drive once,But the size of the pen-drive still shows 2.25 MB. Whereas,this is an 8GB pen-drive. How can I get rid of this problem. I'm still using Windows 7.










share|improve this question

















I recently made my pen-drive bootable with Ubuntu 14.04. But I need to unboot my pen-drive now. I formatted my pen-drive once,But the size of the pen-drive still shows 2.25 MB. Whereas,this is an 8GB pen-drive. How can I get rid of this problem. I'm still using Windows 7.







usb windows-7






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Oct 12 '16 at 14:51









karel

69.9k15 gold badges157 silver badges182 bronze badges




69.9k15 gold badges157 silver badges182 bronze badges










asked Jul 11 '14 at 5:34









PrattoyPrattoy

121 silver badge4 bronze badges




121 silver badge4 bronze badges















  • Tried to remove the files?

    – Gunnar Hjalmarsson
    Jul 11 '14 at 5:41











  • Try to fix it from Windows Disk Management Tool.

    – Nischay
    Jul 11 '14 at 5:44

















  • Tried to remove the files?

    – Gunnar Hjalmarsson
    Jul 11 '14 at 5:41











  • Try to fix it from Windows Disk Management Tool.

    – Nischay
    Jul 11 '14 at 5:44
















Tried to remove the files?

– Gunnar Hjalmarsson
Jul 11 '14 at 5:41





Tried to remove the files?

– Gunnar Hjalmarsson
Jul 11 '14 at 5:41













Try to fix it from Windows Disk Management Tool.

– Nischay
Jul 11 '14 at 5:44





Try to fix it from Windows Disk Management Tool.

– Nischay
Jul 11 '14 at 5:44










1 Answer
1






active

oldest

votes


















3


















If you want to know how to reformat your 8GB flash drive from Windows 7, then ask how to do it on Superuser Q&A, not here. The following commands are run from the terminal in Ubuntu. The results of these steps are reproducible. I reformatted 2 USB flash drives with the following steps after writing Ubuntu ISOs to them with dd



  1. Remove all of your USB devices except for the 8GB USB flash drive that you want to reformat, so you won't get confused about the device name of the USB pendrive later on.



  2. List all the partitions.



    sudo fdisk -l


    Search the results of the command for output that looks like this:



    Disk /dev/sdc: 7864 MB, 7864320000 bytes
    30 heads, 33 sectors/track, 15515 cylinders, total 15360000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00016288

    Device Boot Start End Blocks Id System
    /dev/sdc1 * 2048 15359999 7678976 b W95 FAT32


    If you see something like 7864 MB (8GB) in the output (see the example output above), then that is your 8GB USB flash drive. In this example it is called /dev/sdc. Now open the Disks application from the Dash and check again to make sure that the device name of your 8GB pendrive is the same as what you got from running the command: sudo fdisk -l.




  3. Create a partition table on the disk of type msdos, sometimes known as MBR or Master Boot Record.



    sudo parted /dev/sdc mklabel msdos


    In this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. I can't stress strongly enough how important it is to verify the device name before running this step!



    Warning: If you type the wrong device name you may overwrite your operating system or another one of your partitions containing important personal files!!! So be careful and check the device name a second time. Open the Disks application and check the device name of your 8GB USB flash drive in Disks. It should be the same device name!!! Now check again! You don't want to accidentally type the wrong device name!




  4. Add an empty "primary" partition, which will hold a FAT filesystem later.



    sudo parted -a none /dev/sdc mkpart primary fat32 0 8192 


    Once again in this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. The command specifies the start point (from 0 MB) to the end point (8192 MB). If the 8GB USB flash drive does not have the full 8192 MB space, parted will adjust it automatically. If the terminal returns a message that the start point can't start at 0 MB and you have to use some other small number close to 0 MB, type Y to accept this. Note the command is creating a single, primary partition on the whole disk.



    This newly created partition will have the ID /dev/sdc1. That is because the device name in this example is /dev/sdc and the 1 at the end is because it is the first partition on that device.




  5. Create a FAT filesystem on the /dev/sdc1 partition by formatting the partition.



    mkfs.vfat -n "8GB-USB" /dev/sdc1


    /dev/sdc1 is the partition ID from step 4. "8GB-USB" is the partition label, which can be your own choice of label, just enclose the label inside two double quote characters.



You now have a ready-to-use reformatted USB flash drive with an 8GB FAT partition.






share|improve this answer




























  • You can also/instead suggest to plug the device, do a dmesg and look for USB in last lines. Or dmesg | grep USB. It would be option 2b or something like that.

    – CijcoSistems
    Jul 11 '14 at 9:12












  • This does nothing for the read only problem. You can not format a USB drive in Ubuntu that is read only by this method. This answer is for how to format a usb drive that is not read only. FAT32 when read only cannot be oer written. You could try NFTS but first you migh need something like DD

    – lewis
    Sep 19 '17 at 3:42







  • 1





    I've done this with method successfully twice and the instructions in the my answer came from my own notes which I wrote while I was reformatting the USB flash drives. In both cases dd was the culprit that caused the USB flash drives to become temporarily unusable.

    – karel
    Sep 19 '17 at 4:00











  • +1 :-) This is explaining what should be done manually or automatically like in mkusb, with the menu option 'Restore to a standard storage device'. In addition mkusb starts by wiping the first mibibyte to remove data, that might confuse the tools, that create a partition table and file system. - But there can be other problems, for example that the drive itself is failing (hardware or built-in software failure). See the analysis and methods in this link.

    – sudodus
    May 14 '18 at 5:17











  • Next time I make an Ubuntu Minimal USB I'll try making it with mkusb.

    – karel
    May 14 '18 at 5:20












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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/4.0/"u003ecc by-sa 4.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%2faskubuntu.com%2fquestions%2f496309%2fhow-to-restore-original-size-and-unboot-my-bootable-usb-pendrive%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









3


















If you want to know how to reformat your 8GB flash drive from Windows 7, then ask how to do it on Superuser Q&A, not here. The following commands are run from the terminal in Ubuntu. The results of these steps are reproducible. I reformatted 2 USB flash drives with the following steps after writing Ubuntu ISOs to them with dd



  1. Remove all of your USB devices except for the 8GB USB flash drive that you want to reformat, so you won't get confused about the device name of the USB pendrive later on.



  2. List all the partitions.



    sudo fdisk -l


    Search the results of the command for output that looks like this:



    Disk /dev/sdc: 7864 MB, 7864320000 bytes
    30 heads, 33 sectors/track, 15515 cylinders, total 15360000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00016288

    Device Boot Start End Blocks Id System
    /dev/sdc1 * 2048 15359999 7678976 b W95 FAT32


    If you see something like 7864 MB (8GB) in the output (see the example output above), then that is your 8GB USB flash drive. In this example it is called /dev/sdc. Now open the Disks application from the Dash and check again to make sure that the device name of your 8GB pendrive is the same as what you got from running the command: sudo fdisk -l.




  3. Create a partition table on the disk of type msdos, sometimes known as MBR or Master Boot Record.



    sudo parted /dev/sdc mklabel msdos


    In this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. I can't stress strongly enough how important it is to verify the device name before running this step!



    Warning: If you type the wrong device name you may overwrite your operating system or another one of your partitions containing important personal files!!! So be careful and check the device name a second time. Open the Disks application and check the device name of your 8GB USB flash drive in Disks. It should be the same device name!!! Now check again! You don't want to accidentally type the wrong device name!




  4. Add an empty "primary" partition, which will hold a FAT filesystem later.



    sudo parted -a none /dev/sdc mkpart primary fat32 0 8192 


    Once again in this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. The command specifies the start point (from 0 MB) to the end point (8192 MB). If the 8GB USB flash drive does not have the full 8192 MB space, parted will adjust it automatically. If the terminal returns a message that the start point can't start at 0 MB and you have to use some other small number close to 0 MB, type Y to accept this. Note the command is creating a single, primary partition on the whole disk.



    This newly created partition will have the ID /dev/sdc1. That is because the device name in this example is /dev/sdc and the 1 at the end is because it is the first partition on that device.




  5. Create a FAT filesystem on the /dev/sdc1 partition by formatting the partition.



    mkfs.vfat -n "8GB-USB" /dev/sdc1


    /dev/sdc1 is the partition ID from step 4. "8GB-USB" is the partition label, which can be your own choice of label, just enclose the label inside two double quote characters.



You now have a ready-to-use reformatted USB flash drive with an 8GB FAT partition.






share|improve this answer




























  • You can also/instead suggest to plug the device, do a dmesg and look for USB in last lines. Or dmesg | grep USB. It would be option 2b or something like that.

    – CijcoSistems
    Jul 11 '14 at 9:12












  • This does nothing for the read only problem. You can not format a USB drive in Ubuntu that is read only by this method. This answer is for how to format a usb drive that is not read only. FAT32 when read only cannot be oer written. You could try NFTS but first you migh need something like DD

    – lewis
    Sep 19 '17 at 3:42







  • 1





    I've done this with method successfully twice and the instructions in the my answer came from my own notes which I wrote while I was reformatting the USB flash drives. In both cases dd was the culprit that caused the USB flash drives to become temporarily unusable.

    – karel
    Sep 19 '17 at 4:00











  • +1 :-) This is explaining what should be done manually or automatically like in mkusb, with the menu option 'Restore to a standard storage device'. In addition mkusb starts by wiping the first mibibyte to remove data, that might confuse the tools, that create a partition table and file system. - But there can be other problems, for example that the drive itself is failing (hardware or built-in software failure). See the analysis and methods in this link.

    – sudodus
    May 14 '18 at 5:17











  • Next time I make an Ubuntu Minimal USB I'll try making it with mkusb.

    – karel
    May 14 '18 at 5:20















3


















If you want to know how to reformat your 8GB flash drive from Windows 7, then ask how to do it on Superuser Q&A, not here. The following commands are run from the terminal in Ubuntu. The results of these steps are reproducible. I reformatted 2 USB flash drives with the following steps after writing Ubuntu ISOs to them with dd



  1. Remove all of your USB devices except for the 8GB USB flash drive that you want to reformat, so you won't get confused about the device name of the USB pendrive later on.



  2. List all the partitions.



    sudo fdisk -l


    Search the results of the command for output that looks like this:



    Disk /dev/sdc: 7864 MB, 7864320000 bytes
    30 heads, 33 sectors/track, 15515 cylinders, total 15360000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00016288

    Device Boot Start End Blocks Id System
    /dev/sdc1 * 2048 15359999 7678976 b W95 FAT32


    If you see something like 7864 MB (8GB) in the output (see the example output above), then that is your 8GB USB flash drive. In this example it is called /dev/sdc. Now open the Disks application from the Dash and check again to make sure that the device name of your 8GB pendrive is the same as what you got from running the command: sudo fdisk -l.




  3. Create a partition table on the disk of type msdos, sometimes known as MBR or Master Boot Record.



    sudo parted /dev/sdc mklabel msdos


    In this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. I can't stress strongly enough how important it is to verify the device name before running this step!



    Warning: If you type the wrong device name you may overwrite your operating system or another one of your partitions containing important personal files!!! So be careful and check the device name a second time. Open the Disks application and check the device name of your 8GB USB flash drive in Disks. It should be the same device name!!! Now check again! You don't want to accidentally type the wrong device name!




  4. Add an empty "primary" partition, which will hold a FAT filesystem later.



    sudo parted -a none /dev/sdc mkpart primary fat32 0 8192 


    Once again in this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. The command specifies the start point (from 0 MB) to the end point (8192 MB). If the 8GB USB flash drive does not have the full 8192 MB space, parted will adjust it automatically. If the terminal returns a message that the start point can't start at 0 MB and you have to use some other small number close to 0 MB, type Y to accept this. Note the command is creating a single, primary partition on the whole disk.



    This newly created partition will have the ID /dev/sdc1. That is because the device name in this example is /dev/sdc and the 1 at the end is because it is the first partition on that device.




  5. Create a FAT filesystem on the /dev/sdc1 partition by formatting the partition.



    mkfs.vfat -n "8GB-USB" /dev/sdc1


    /dev/sdc1 is the partition ID from step 4. "8GB-USB" is the partition label, which can be your own choice of label, just enclose the label inside two double quote characters.



You now have a ready-to-use reformatted USB flash drive with an 8GB FAT partition.






share|improve this answer




























  • You can also/instead suggest to plug the device, do a dmesg and look for USB in last lines. Or dmesg | grep USB. It would be option 2b or something like that.

    – CijcoSistems
    Jul 11 '14 at 9:12












  • This does nothing for the read only problem. You can not format a USB drive in Ubuntu that is read only by this method. This answer is for how to format a usb drive that is not read only. FAT32 when read only cannot be oer written. You could try NFTS but first you migh need something like DD

    – lewis
    Sep 19 '17 at 3:42







  • 1





    I've done this with method successfully twice and the instructions in the my answer came from my own notes which I wrote while I was reformatting the USB flash drives. In both cases dd was the culprit that caused the USB flash drives to become temporarily unusable.

    – karel
    Sep 19 '17 at 4:00











  • +1 :-) This is explaining what should be done manually or automatically like in mkusb, with the menu option 'Restore to a standard storage device'. In addition mkusb starts by wiping the first mibibyte to remove data, that might confuse the tools, that create a partition table and file system. - But there can be other problems, for example that the drive itself is failing (hardware or built-in software failure). See the analysis and methods in this link.

    – sudodus
    May 14 '18 at 5:17











  • Next time I make an Ubuntu Minimal USB I'll try making it with mkusb.

    – karel
    May 14 '18 at 5:20













3














3










3









If you want to know how to reformat your 8GB flash drive from Windows 7, then ask how to do it on Superuser Q&A, not here. The following commands are run from the terminal in Ubuntu. The results of these steps are reproducible. I reformatted 2 USB flash drives with the following steps after writing Ubuntu ISOs to them with dd



  1. Remove all of your USB devices except for the 8GB USB flash drive that you want to reformat, so you won't get confused about the device name of the USB pendrive later on.



  2. List all the partitions.



    sudo fdisk -l


    Search the results of the command for output that looks like this:



    Disk /dev/sdc: 7864 MB, 7864320000 bytes
    30 heads, 33 sectors/track, 15515 cylinders, total 15360000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00016288

    Device Boot Start End Blocks Id System
    /dev/sdc1 * 2048 15359999 7678976 b W95 FAT32


    If you see something like 7864 MB (8GB) in the output (see the example output above), then that is your 8GB USB flash drive. In this example it is called /dev/sdc. Now open the Disks application from the Dash and check again to make sure that the device name of your 8GB pendrive is the same as what you got from running the command: sudo fdisk -l.




  3. Create a partition table on the disk of type msdos, sometimes known as MBR or Master Boot Record.



    sudo parted /dev/sdc mklabel msdos


    In this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. I can't stress strongly enough how important it is to verify the device name before running this step!



    Warning: If you type the wrong device name you may overwrite your operating system or another one of your partitions containing important personal files!!! So be careful and check the device name a second time. Open the Disks application and check the device name of your 8GB USB flash drive in Disks. It should be the same device name!!! Now check again! You don't want to accidentally type the wrong device name!




  4. Add an empty "primary" partition, which will hold a FAT filesystem later.



    sudo parted -a none /dev/sdc mkpart primary fat32 0 8192 


    Once again in this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. The command specifies the start point (from 0 MB) to the end point (8192 MB). If the 8GB USB flash drive does not have the full 8192 MB space, parted will adjust it automatically. If the terminal returns a message that the start point can't start at 0 MB and you have to use some other small number close to 0 MB, type Y to accept this. Note the command is creating a single, primary partition on the whole disk.



    This newly created partition will have the ID /dev/sdc1. That is because the device name in this example is /dev/sdc and the 1 at the end is because it is the first partition on that device.




  5. Create a FAT filesystem on the /dev/sdc1 partition by formatting the partition.



    mkfs.vfat -n "8GB-USB" /dev/sdc1


    /dev/sdc1 is the partition ID from step 4. "8GB-USB" is the partition label, which can be your own choice of label, just enclose the label inside two double quote characters.



You now have a ready-to-use reformatted USB flash drive with an 8GB FAT partition.






share|improve this answer
















If you want to know how to reformat your 8GB flash drive from Windows 7, then ask how to do it on Superuser Q&A, not here. The following commands are run from the terminal in Ubuntu. The results of these steps are reproducible. I reformatted 2 USB flash drives with the following steps after writing Ubuntu ISOs to them with dd



  1. Remove all of your USB devices except for the 8GB USB flash drive that you want to reformat, so you won't get confused about the device name of the USB pendrive later on.



  2. List all the partitions.



    sudo fdisk -l


    Search the results of the command for output that looks like this:



    Disk /dev/sdc: 7864 MB, 7864320000 bytes
    30 heads, 33 sectors/track, 15515 cylinders, total 15360000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00016288

    Device Boot Start End Blocks Id System
    /dev/sdc1 * 2048 15359999 7678976 b W95 FAT32


    If you see something like 7864 MB (8GB) in the output (see the example output above), then that is your 8GB USB flash drive. In this example it is called /dev/sdc. Now open the Disks application from the Dash and check again to make sure that the device name of your 8GB pendrive is the same as what you got from running the command: sudo fdisk -l.




  3. Create a partition table on the disk of type msdos, sometimes known as MBR or Master Boot Record.



    sudo parted /dev/sdc mklabel msdos


    In this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. I can't stress strongly enough how important it is to verify the device name before running this step!



    Warning: If you type the wrong device name you may overwrite your operating system or another one of your partitions containing important personal files!!! So be careful and check the device name a second time. Open the Disks application and check the device name of your 8GB USB flash drive in Disks. It should be the same device name!!! Now check again! You don't want to accidentally type the wrong device name!




  4. Add an empty "primary" partition, which will hold a FAT filesystem later.



    sudo parted -a none /dev/sdc mkpart primary fat32 0 8192 


    Once again in this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. The command specifies the start point (from 0 MB) to the end point (8192 MB). If the 8GB USB flash drive does not have the full 8192 MB space, parted will adjust it automatically. If the terminal returns a message that the start point can't start at 0 MB and you have to use some other small number close to 0 MB, type Y to accept this. Note the command is creating a single, primary partition on the whole disk.



    This newly created partition will have the ID /dev/sdc1. That is because the device name in this example is /dev/sdc and the 1 at the end is because it is the first partition on that device.




  5. Create a FAT filesystem on the /dev/sdc1 partition by formatting the partition.



    mkfs.vfat -n "8GB-USB" /dev/sdc1


    /dev/sdc1 is the partition ID from step 4. "8GB-USB" is the partition label, which can be your own choice of label, just enclose the label inside two double quote characters.



You now have a ready-to-use reformatted USB flash drive with an 8GB FAT partition.







share|improve this answer















share|improve this answer




share|improve this answer








edited Jan 12 at 19:53

























answered Jul 11 '14 at 6:49









karelkarel

69.9k15 gold badges157 silver badges182 bronze badges




69.9k15 gold badges157 silver badges182 bronze badges















  • You can also/instead suggest to plug the device, do a dmesg and look for USB in last lines. Or dmesg | grep USB. It would be option 2b or something like that.

    – CijcoSistems
    Jul 11 '14 at 9:12












  • This does nothing for the read only problem. You can not format a USB drive in Ubuntu that is read only by this method. This answer is for how to format a usb drive that is not read only. FAT32 when read only cannot be oer written. You could try NFTS but first you migh need something like DD

    – lewis
    Sep 19 '17 at 3:42







  • 1





    I've done this with method successfully twice and the instructions in the my answer came from my own notes which I wrote while I was reformatting the USB flash drives. In both cases dd was the culprit that caused the USB flash drives to become temporarily unusable.

    – karel
    Sep 19 '17 at 4:00











  • +1 :-) This is explaining what should be done manually or automatically like in mkusb, with the menu option 'Restore to a standard storage device'. In addition mkusb starts by wiping the first mibibyte to remove data, that might confuse the tools, that create a partition table and file system. - But there can be other problems, for example that the drive itself is failing (hardware or built-in software failure). See the analysis and methods in this link.

    – sudodus
    May 14 '18 at 5:17











  • Next time I make an Ubuntu Minimal USB I'll try making it with mkusb.

    – karel
    May 14 '18 at 5:20

















  • You can also/instead suggest to plug the device, do a dmesg and look for USB in last lines. Or dmesg | grep USB. It would be option 2b or something like that.

    – CijcoSistems
    Jul 11 '14 at 9:12












  • This does nothing for the read only problem. You can not format a USB drive in Ubuntu that is read only by this method. This answer is for how to format a usb drive that is not read only. FAT32 when read only cannot be oer written. You could try NFTS but first you migh need something like DD

    – lewis
    Sep 19 '17 at 3:42







  • 1





    I've done this with method successfully twice and the instructions in the my answer came from my own notes which I wrote while I was reformatting the USB flash drives. In both cases dd was the culprit that caused the USB flash drives to become temporarily unusable.

    – karel
    Sep 19 '17 at 4:00











  • +1 :-) This is explaining what should be done manually or automatically like in mkusb, with the menu option 'Restore to a standard storage device'. In addition mkusb starts by wiping the first mibibyte to remove data, that might confuse the tools, that create a partition table and file system. - But there can be other problems, for example that the drive itself is failing (hardware or built-in software failure). See the analysis and methods in this link.

    – sudodus
    May 14 '18 at 5:17











  • Next time I make an Ubuntu Minimal USB I'll try making it with mkusb.

    – karel
    May 14 '18 at 5:20
















You can also/instead suggest to plug the device, do a dmesg and look for USB in last lines. Or dmesg | grep USB. It would be option 2b or something like that.

– CijcoSistems
Jul 11 '14 at 9:12






You can also/instead suggest to plug the device, do a dmesg and look for USB in last lines. Or dmesg | grep USB. It would be option 2b or something like that.

– CijcoSistems
Jul 11 '14 at 9:12














This does nothing for the read only problem. You can not format a USB drive in Ubuntu that is read only by this method. This answer is for how to format a usb drive that is not read only. FAT32 when read only cannot be oer written. You could try NFTS but first you migh need something like DD

– lewis
Sep 19 '17 at 3:42






This does nothing for the read only problem. You can not format a USB drive in Ubuntu that is read only by this method. This answer is for how to format a usb drive that is not read only. FAT32 when read only cannot be oer written. You could try NFTS but first you migh need something like DD

– lewis
Sep 19 '17 at 3:42





1




1





I've done this with method successfully twice and the instructions in the my answer came from my own notes which I wrote while I was reformatting the USB flash drives. In both cases dd was the culprit that caused the USB flash drives to become temporarily unusable.

– karel
Sep 19 '17 at 4:00





I've done this with method successfully twice and the instructions in the my answer came from my own notes which I wrote while I was reformatting the USB flash drives. In both cases dd was the culprit that caused the USB flash drives to become temporarily unusable.

– karel
Sep 19 '17 at 4:00













+1 :-) This is explaining what should be done manually or automatically like in mkusb, with the menu option 'Restore to a standard storage device'. In addition mkusb starts by wiping the first mibibyte to remove data, that might confuse the tools, that create a partition table and file system. - But there can be other problems, for example that the drive itself is failing (hardware or built-in software failure). See the analysis and methods in this link.

– sudodus
May 14 '18 at 5:17





+1 :-) This is explaining what should be done manually or automatically like in mkusb, with the menu option 'Restore to a standard storage device'. In addition mkusb starts by wiping the first mibibyte to remove data, that might confuse the tools, that create a partition table and file system. - But there can be other problems, for example that the drive itself is failing (hardware or built-in software failure). See the analysis and methods in this link.

– sudodus
May 14 '18 at 5:17













Next time I make an Ubuntu Minimal USB I'll try making it with mkusb.

– karel
May 14 '18 at 5:20





Next time I make an Ubuntu Minimal USB I'll try making it with mkusb.

– karel
May 14 '18 at 5:20


















draft saved

draft discarded















































Thanks for contributing an answer to Ask Ubuntu!


  • 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%2faskubuntu.com%2fquestions%2f496309%2fhow-to-restore-original-size-and-unboot-my-bootable-usb-pendrive%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

Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü