Author Topic: Sd Card Ext2 Formatting / Partition  (Read 4086 times)

patzoul

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • http://
Sd Card Ext2 Formatting / Partition
« on: May 23, 2006, 09:35:11 am »
I bought a 1gb sd card. I used fdisk to define 2 partitions by using the following command:
fdisk /dev/mmcd/disc0/disc

The first partition is of type 83 (ext2). The second one of type 6 (FAT16).
After I confirm the setting changes by exiting fdisk with 'w', I get a 'bad blocks count' error message when I run the command mkfs.ext2 /dev/mmcd/disc0/disc.

How can I create a partition correctly as I would like to be able to mount my sd card both on my C760 via partition 1 and on my Mac via partition 2?

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Sd Card Ext2 Formatting / Partition
« Reply #1 on: May 23, 2006, 05:42:59 pm »
Quote
I bought a 1gb sd card. I used fdisk to define 2 partitions by using the following command:
fdisk /dev/mmcd/disc0/disc

After I confirm the setting changes by exiting fdisk with 'w', I get a 'bad blocks count' error message when I run the command mkfs.ext2 /dev/mmcd/disc0/disc.
Surely the disk and the individual partitions should not be the same device?
e.g. (can't confirm this) disk = /dev/mmcd/dics0/disc, and partition = /dev/mmcd/dics0/disc1 ...?
SL6000-L, RC12

Dima202

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Sd Card Ext2 Formatting / Partition
« Reply #2 on: May 23, 2006, 06:06:25 pm »
Quote
Quote
I bought a 1gb sd card. I used fdisk to define 2 partitions by using the following command:
fdisk /dev/mmcd/disc0/disc

After I confirm the setting changes by exiting fdisk with 'w', I get a 'bad blocks count' error message when I run the command mkfs.ext2 /dev/mmcd/disc0/disc.
Surely the disk and the individual partitions should not be the same device?
e.g. (can't confirm this) disk = /dev/mmcd/dics0/disc, and partition = /dev/mmcd/dics0/disc1 ...?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=128238\"][{POST_SNAPBACK}][/a][/div]
part1 I believe

patzoul

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • http://
Sd Card Ext2 Formatting / Partition
« Reply #3 on: May 23, 2006, 06:44:21 pm »
I've created 2 partitions:
/dev/mmcd/disco0/part1 start=2 end=499888 id=83
/dev/mmcd/disco0/part2 start=499888 end=1953792 id=6

I exit fdisk with the 'w' command.

I then run mkfs.ext2 /dev/mmcd/disc0/disc. If I redo fdisk after that I can see that I lost all the partition info.

If I try mkfs.ext2 /dev/mmcd/disc0/part1, I get an error message saying no such file or directory

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Sd Card Ext2 Formatting / Partition
« Reply #4 on: May 23, 2006, 10:48:09 pm »
Quote
I've created 2 partitions:
/dev/mmcd/disco0/part1 start=2 end=499888 id=83
/dev/mmcd/disco0/part2 start=499888 end=1953792 id=6

(snip)

If I try mkfs.ext2 /dev/mmcd/disc0/part1, I get an error message saying no such file or directory
[div align=\"right\"][a href=\"index.php?act=findpost&pid=128249\"][{POST_SNAPBACK}][/a][/div]
Aside from the typo (I presume?) in the first two lines above, this is correct. You should have /dev/mmcd/disc0/part1 and part2 that are partitions you can run mkfs.ext2 on. What does 'ls /dev/mmcd/disc0' show immediately after saving the partitions with fdisk, before mkfs?
SL6000-L, RC12

patzoul

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • http://
Sd Card Ext2 Formatting / Partition
« Reply #5 on: May 24, 2006, 10:11:13 am »
You're right there was a typo in my post.
As for your question, after I save the new partitions and do 'ls /dev/mmcd/disc0', I only see 'disc'.
If I reboot, I then see 'disc', 'part1' and 'part2'.

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
Sd Card Ext2 Formatting / Partition
« Reply #6 on: May 24, 2006, 10:16:31 am »
Quote
If I reboot, I then see 'disc', 'part1' and 'part2'.

I think thats because it is still mounted "Incorrectly" (Not by you)as 1 big partition...

when you reboot it renotices that there are 2 partitions now...
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode