Thursday, July 5, 2018

windows xp - Reinitialize USB pendrive that was used to boot linux




I have a pendrive that was used to boot a linux image (created using dd if=... of=/dev/sd4 bs =1m on a mac)



Now I would like to use it again as regular pendrive. Unfortunately I just have a windows xp pc available.
The problem is the drive is 8BG in size - but I can only access about 2GB that were used by the boot image.



In Computer Management>Storage>Disk Management the drive is show 7.45GB in size with a 2.36GB partition. But for the small partition "delete partion" is grayed out, also in the unused space "new partition" is grayed out.



Here's what I tried:





  • If I use diskpart on the command line list disk only shows the built in drives - so I can not select the drive.


  • I also tried a 'lexar_usb_format' utility - but it also just allowed me to format the 2.3GB.


  • I tried the same on a second XP machine with same results.




If I wait till weekend I can try to restore it on a Mac - but I find it hard to believe there's no way to fix it using plain windows.



(and unfortunately this time I can't boot into linux as the distro won't boot on this PC - bad luck)


Answer



What about using DISKPART in Windows?





  1. Open the Command Prompt as the Administrator, and type DISKPART, and press Enter.

  2. Type LIST DISK and press Enter to see the physical disks attached. Look for which disk is your flash drive (usually DISK 1 or DISK 2).

  3. Type SELECT DISK x (replace x with the number of your flash drive), then press Enter.

  4. Finally, type CLEAN and Enter.

  5. Type CREATE PARTITION PRIMARY, and ASSIGN LETTER X: (replace x: with any free drive letter).

  6. You can also run a FORMAT from this program, or run it separately.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...