I was trying to setup an Ubuntu Remix boot-up drive on my 4GB microsd card and accidentally formatted the card in some unknown format.

  1. Is there a way to determine what format I actually did format it into?
  2. Is there a way to re-format the card so I can use it again? Right now Ubuntu and Debian won't even recognize the card at all ... I don't see it anywhere.
link|improve this question

53% accept rate
feedback

migrated from stackoverflow.com Jul 10 '10 at 17:46

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

Try GPartEd first. It should show the device, as long as the card is plugged in. If not, the long way around it is:

  1. Take care at each step below. If you choose the wrong device in step 5, you will destroy all data on that device upon repartition/format
  2. Open up a shell (Terminal) window.
  3. Execute sudo fdisk -l (will ask for your acct password) and take note of the output, seeing which Disk entries are listed (like /dev/sda, /dev/sdb etc).
  4. Plug in your card and re-run sudo fdisk -l to see the list of devices. There should be a new one in the list. Let's say it's /dev/SD for example, but substitute accordingly.
  5. Execute sudo fdisk /dev/SD
  6. Hit p to see how many partitions are on the device, then d with the appropriate number to delete all of them.
  7. Hit n and create a new primary partition. If you now hit p you should see it in the list. Hit w to write the new partition table to disk.
  8. Format the new partition with mkfs.ext2 /dev/SD1
  9. It should now show up.
link|improve this answer
Thanks, I don't care about any data on the drive. I'm looking to just put the Ubuntu Remix install bootup file on there. I'll try this out. – Brian T Hannan Jul 9 '10 at 20:34
Thanks, this helped a lot! – Brian T Hannan Jul 13 '10 at 18:00
Glad to have helped =) – alexandru Jul 14 '10 at 19:37
feedback

When you say that they won't recognize the card at all, do you mean that they won't mount it, or that they don't even appear in /dev/?

I'd get a partitioning tool (GPartEd is my favorite on Linux) and take a look at the card. Does it appear in the device list?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.