If you create a bootable USB flash drive for installing linux on a machines, you may have trouble reformatting it later in Windows. It is possible to create a bootable USB in such a way that the Windows reformatting utility, obtained by right-clicking on the drive and selecting Format…, does not see the partition containing the bootloader. In such a situation, you may have a 8GB drive, but the reformatting utility only sees 6GB, and reformatting will not recover the original 8GB of space.
I found the following instructions on a message board here, and I found related information regarding bootable disks at Microsoft’s TechNet site, here.
- Type “DISKPART” from the Command Prompt (accessible by clicking on Start and then typing “cmd” into the open field); you will then see the following prompt: DISKPART>
- Type “LIST DISK” to see what number your USB drive is listed as.
- Type “SELECT DISK 2” (if your USB is disk 2; replace # with your disk #); Diskpart will confirm that “Disk 2 is now the select disk.”
- Type “SELECT PARTITION 1” (this command selects what should be the only partition on your USB drive, the small one that you want to delete to get back the larger, full partition size). Diskpart will confirm with “Partition 1 is now the selected partition.”
- Type “DELETE PARTITION”. This will delete the old partition. There are no warning prompts if you have existing data – make sure you have copied everything off before doing this!
- Type “CREATE PARTITION PRIMARY” to create a new, full-size partition. Diskpart will confirm with message of “Diskpart succeeded in creating the specified partition.” You can type in “LIST PARTITION” to confirm the new, full-size.
- Type “EXIT” to leave Diskpart. You can now format your USB drive by using the standard Windows formatting process.