Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 11286  / 1 Year ago, thu, january 5, 2023, 3:40:37

How do you factory reset a usb?



I have a hp 4gb usb that seems like it has a messed up partition table and ubuntu isn't recognizing all the space. I've tried formatting it in disks. That doesn't work. How do you make a usb good as new on ubuntu?



I formatted it in the default way - FAT. Originally what happened was that I did sudo dd if=memtest86-usb.img of=/dev/sdb to install memtest86 on the usb. When I was done with that I formatted it in the default way but Ubuntu kept calling it the 51mb volume in nautilus. I formatted it and tried to use it with winusb.



winusb gave me an error.



Installation failed ! Exit code: 256 Log: Formating device... Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)? Warning: Not all of the space available to /dev/sdb appears to be used, you can fix the GPT to use all of the space (an extra 7655424 blocks) or continue with the current setting?

Error: You requested a partition from 1000kB to 4077MB. The closest location we can manage is 17.4kB to 157MB.


Then I tried following the advice on the first answer on this page. I'm trying to now use the usb with winusb and winusb just keeps trying to format it.



Output of sudo parted -l:



Model: ATA TOSHIBA MK5076GS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 496GB 496GB primary ext4 boot
2 496GB 500GB 3868MB extended
5 496GB 500GB 3868MB logical


Model: USB DISK 2.0 (scsi)
Disk /dev/sdb: 4077MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 4077MB 4077MB fat32


Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/cryptswap1: 3868MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 3868MB 3868MB linux-swap(v1)


Default way: Ubuntu 14.04 program "Disks" - Format - (Quick) (FAT)



winusb is a linux program for making a windows install disk.


More From » usb

 Answers
5

Disks rarely works for me, but Gparted is a great alternative. I know someone has already suggested using Gparted, you tried it, and it failed. I think that's because you didn't create a new partition table first, and I believe your current table is damaged given it's showing up as "loop" so I suggest trying Gparted again; what have you got to loose right. This time create a new partition table, and then a new partition. You will loose any data currently on the drive.



Steps:




  1. In terminal type sudo apt-get install gparted.


  2. Open Gparted from the applications screen.


  3. Select your device from the drop down menu on the far right.


  4. From the top menu click "device", and then choose "create partition table".


  5. From the partition table menu choose a partition table type. [MBR and GPT are the most commonly used. If you aren't sure which to pick then pick MBR. In Gparted MBR is called "msdos".]


  6. The drive should appear as unallocated now. Right click on it and choose "new". Change the desired options and click "add".




[Screenshot of the settings I used: https://copy.com/qvCWZBqdKfRz ]




  1. Click the green checkmark on the top menu, and then click "apply" on the prompt.


  2. Click "close" on the prompt. Your device is now ready for use.




Notes:




  • Gparted only supports quick formatting.


[#25190] Friday, January 6, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
panshow

Total Points: 454
Total Questions: 98
Total Answers: 122

Location: Philippines
Member since Sat, Jul 11, 2020
4 Years ago
;