[wplug] Strange fdisk/parted behavior with 4G SD card

James O'Kane jo2y at midnightlinux.com
Sun Jun 8 20:35:30 EDT 2008


2008/6/2 Tim Lesher <tlesher at gmail.com>:
> I'm seeing a consistent behavior I can't explain when trying to partition a
> 4GB SD card using either fdisk (version 2.13.1) or parted (1.7.1) (using
> Ubuntu 8.04 amd64).
>
> What I want is three (primary) partitions of ~725MB each; the remainder is
> an extended partition with a single 1GB logical partition. fdisk and parted
> each appear to do the right thing, but when I later try to make filesystems
> on the partitions, the partition table is trash--fdisk and parted each says
> the disklabel is corrupt.
>
> ===== Paraphrased transcript =====
> So, fdisk on a clean msdos-style disklabel:
>
> Disk /dev/sdd: 4241 MB, 4241489920 bytes
> 131 heads, 62 sectors/track, 1019 cylinders
> Units = cylinders of 8122 * 512 = 4158464 bytes
> Disk identifier: 0xbe7cee25
>
> [n]ew, [p]rimary, number [1], first cylinder=[1], size=[+725M].
> [n]ew, [p]rimary, number [2], first cylinder=[176], size=[+725M].
> [n]ew, [p]rimary, number [3], first cylinder=[351], size=[+725M].
> [n]ew, [e]xtended, first cylinder=[526], last cylinder=[1019]
> [n]ew, first cylinder=[526], size=[+1024M]
>
> All done. [p] shows a happy partition table:
>
> Disk /dev/sdd: 4241 MB, 4241489920 bytes
> 131 heads, 62 sectors/track, 1019 cylinders
> Units = cylinders of 8122 * 512 = 4158464 bytes
> Disk identifier: 0xbe7cee25
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdd1               1         175      710644   83  Linux
> /dev/sdd2             176         350      710675   83  Linux
> /dev/sdd3             351         525      710675   83  Linux
> /dev/sdd4             526        1019     2006134    5  Extended
> /dev/sdd5             526         772     1003036   83  Linux
>
> [w]rite, then run fdisk again:
>
> Warning: ignoring extra data in partition table 5
> Warning: ignoring extra data in partition table 5
> Warning: ignoring extra data in partition table 5
> Warning: invalid flag 0xffff of partition table 5 will be corrected by
> w(rite)
>
> Command (m for help): p
>
> Disk /dev/sdd: 4241 MB, 4241489920 bytes
> 131 heads, 62 sectors/track, 1019 cylinders
> Units = cylinders of 8122 * 512 = 4158464 bytes
> Disk identifier: 0xbe7cee25
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdd1               1         175      710644   83  Linux
> /dev/sdd2             176         350      710675   83  Linux
> /dev/sdd3             351         525      710675   83  Linux
> /dev/sdd4             526        1019     2006134    5  Extended
> /dev/sdd5   ?      529332     1058139  2147483647+  ff  BBT
>
> === End paraphrased transcript ===
>
> Any ideas what could be happening to the partition table?

I've been told that a 4GB SD does some tricks that aren't exactly in
the SD standard in order to get that capacity. I have one that doesn't
work everywhere,
I've only skimmed this, but it talks about some issues.
http://en.wikipedia.org/wiki/Secure_Digital_card#Compatibility_issues_with_2_GB_and_larger_cards

> --
> Tim Lesher <tlesher at gmail.com>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
>


More information about the wplug mailing list