I was trying to create a Kali installation suite on my 16 GB sandisk pendrive. I used the dd
command and umount
to mount the iso into my USB. After the installation is complete I formated my pendrive and now it shows it has only 10 GB of usable space. How to format it properly so that i can use the entire space?
You need to remove the image of the install disk completely. Run the following series of commands:
I once used
dd
to copy a live iso onto a usb drive (sd card specifically). It didn't use a regular MBR, apparently no MBR at all, just something like the cd-type ISO9660.What should have worked to fix it (that I didn't try at the time) would be to use something like
gparted
to:If that didn't restore the full size of the USB drive, that's a problem... I don't know of a tool better than parted/gparted... there have been some "fake" usb drives & flash cards sold that are specially formatted to appear larger than they actually are (to be sold at a higher price than they're worth).
In the case of my odd iso-dd'd drive, even after re-partitioning it with
gparted
weeks later the old live iso would show up sometimes (somehow - don't remember exactly how, some unusual way of mounting, maybegnome-disks
) but I could still read lots of the old iso's files (their md5's were even good) and that was after re-partitioning and reformatting and writing some new files to the new partition.Eventually I searched the raw device for any mention of the old iso & overwrote the first 700-odd blocks on the drive.
FYI, these commands should save a backup copy of the MBR & partition layout, maybe not useful in your case but related to new MBR'ing and re-partitioning a drive:
Backup copy of mbr (first 512 bytes):
Backup copy of partition table with sfdisk (text list)
Instruction(3-5) will destroy old partition table created by dd when you were created bootable disk and create new partition table with.
You can now use this usb stick in windows and format it. It will show you full space of your usb drive.