LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   totally messed up USB drive (https://www.linuxquestions.org/questions/linux-general-1/totally-messed-up-usb-drive-4175512983/)

Jacobite 08-01-2014 10:06 AM

totally messed up USB drive
 
I've been messing around trying different distros on my netbook, booting from a USB stick and got an error from parted: invalid partition table - recursive partition on /dev/sdd which I fixed using the command:

sudo dd if=/dev/zero of=/dev/sdb bs=1M

But now find that I can only access a fraction of the 2 Gb drive, and furthermore, my netbook won't boot from the USB.

Any suggestions how I can restore the USB drive to its original state?

Thanks in advance for any help!

szboardstretcher 08-01-2014 10:14 AM

use fdisk or cfdisk to delete and re-partition the usb drive. is that what you mean?

suicidaleggroll 08-01-2014 10:22 AM

Quote:

Originally Posted by Jacobite (Post 5213226)
got an error from parted: invalid partition table - recursive partition on /dev/sdd which I fixed using the command:

sudo dd if=/dev/zero of=/dev/sdb bs=1M

But now find that I can only access a fraction of the 2 Gb drive, and furthermore, my netbook won't boot from the USB.

Well yeah, you completely wiped out the partition table with your dd command, of course you can't boot from it any more. I'm not sure what else you expected that command to do other than destroy the partition table and render the drive useless...

As szboardstretcher said, use a partitioning tool to make a new partition table and re-load everything onto the USB. If you have valuable information on there you can attempt to use testdisk or photorec to recover it first.

Jacobite 08-01-2014 10:27 AM

Hi szboardstretcher, Thanks for the reply. I followed these instructions:

http://www.pendrivelinux.com/restori...key-partition/ (scroll down for the Linux instructions)

But to no avail. What I don't understand is when I plug in the drive, the full capacity shows up but I can't see the contents in a folder. When I do fdisk -l I get this:

Disk /dev/sdd: 716 MB, 716177408 bytes
255 heads, 63 sectors/track, 87 cylinders, total 1398784 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: 0x00000000

716 MB is the size of the linux distro I have on the drive.

jefro 08-01-2014 05:13 PM

Ranish used to be able to fix some of that. Might try Ultimate boot cd.


All times are GMT -5. The time now is 01:49 AM.