LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't format partition? (http://www.linuxquestions.org/questions/linux-software-2/cant-format-partition-627687/)

timothyb89 03-13-2008 02:17 AM

Can't format partition?
 
This seems like a stupid problem, but here goes...

I have a Micro SD card plugged in with a USB adapter. I managed to corrupt the filesystem so I've been trying to reformat it (with fat32) without any luck.

First I plug it in an unmount the partition (/dev/sdb1), and I try fdisk'ing it, with:
Code:

fdisk /dev/sdb
But apparently I'm not doing domething right:
Code:

You will not be able to write the partition table.
I'm guessing that won't work, so I pull open GParted with hope that it will do whatever I forgot to do automatically. No luck:
Quote:

...
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Can't write to /dev/sdb, because it is opened read-only.
...
Anyone see where I may have gone wrong?

leebrent 03-13-2008 02:45 AM

What does fdisk -l yield?

timothyb89 03-13-2008 02:50 AM

Quote:

Originally Posted by leebrent (Post 3087075)
What does fdisk -l yield?

Quote:

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0f4738c

Device Boot Start End Blocks Id System
/dev/sda1 1 6 48163+ de Dell Utility
/dev/sda2 * 7 3664 29382885 7 HPFS/NTFS
/dev/sda3 19061 19452 3148740 db CP/M / CTOS / ...
/dev/sda4 3665 19060 123668370 5 Extended
/dev/sda5 10006 10475 3775243+ b W95 FAT32
/dev/sda6 18506 19060 4458006 82 Linux swap / Solaris
/dev/sda7 10476 18505 64500943+ 83 Linux
/dev/sda8 3665 10005 50934019+ 83 Linux

Partition table entries are not in disk order
Here it is. Thanks!

Poetics 03-13-2008 06:26 AM

For what it's worth, on several memory sticks I've used it was actually /dev/sda2 and not sda1 as one might expect that held the normal storage space. Hope that helps!

timothyb89 03-13-2008 08:26 AM

In a burst of genius, I forgot to have the card plugged in while running fdisk :P. Here's the missing info:
Quote:

Disk /dev/sdb: 1015 MB, 1015808000 bytes
32 heads, 63 sectors/track, 984 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 984 991747+ 6 FAT16
Quote:

Originally Posted by Poetics (Post 3087185)
For what it's worth, on several memory sticks I've used it was actually /dev/sda2 and not sda1 as one might expect that held the normal storage space. Hope that helps!

Unfortunately /dev/sdb2 doesn't exist. :(

Thanks for the help so far!


All times are GMT -5. The time now is 10:41 PM.