dd if=./stage1/stage1 of=/dev/sdcWell, it seems, I wiped out the partition table or something. When I came back to Ubuntu, there was no icon for the USB key. When I went to gparted, it was there, but instead of a partition, there was only an 'unallocated'. I tried to use gparted's "Create Partition Table..." but I just an error message about being unable to access /dev/sdc.
dd if=./stage2/stage2 of=/dev/sdc seek=1
To google!
Naturally, I'm not the first moron to screw up a USB key. I get to stand on the shoulders of morons before me. They asked, and the google-verse responded: testdisk.
sudo apt-get install testdiskIt took a little while to get my testdisk legs. But soon I found that you can wipe out the MBR and then select 'none' as a file system, and then recreate a boot sector as FAT16 or something like that. I still couldn't add a partition. But at least I repaired it enough that Linux regards it as FAT16.
testdisk /dev/sdc
I logged out and this time gparted allowed me to make a partition. Whew! Now that I have it working again, maybe I'll do:
dd if=/dev/sdc of=/home/mark/backups/Cruzer256.bakso if I wipe it out again, I can do:
dd if=/home/mark/backups/Cruzer256.bak of=/dev/sdcNow back to figure out where I went wrong in causing this problem in the first place... Maybe I should have done:
dd if=./stage1/stage1 of=/dev/sdc1
dd if=./stage2/stage2 of=/dev/sdc1 seek=1
No comments:
Post a Comment