Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th December 2011, 09:37 PM
st2000 Offline
Registered User
 
Join Date: Jun 2011
Posts: 6
linuxfirefox
Partition tables on a new SDCard...

Hi,

I have some SDCards that were bulk erased in a commercial SDCard programmer. I formatted them in a Windows 7 box. These SDCards mount on that box and on a Fedora 13 box just fine. However, fdisk on the Fedora 13 box says the partition table is made up of random junk.

It get's better.

On an embedded processor target running Linux these SDCard fail to mount. A check with that platform's fdisk utility confirms the partition table is random junk. If I use either the Fedora's fdisk or the embedded processor Linux target's fdisk I can "fix" these SDCards, format them again in the Windows 7 box and mount them on all 3 boxes with out issue!

Can anyone explain what is going on?

How can Fedora mount these SDCards?

How could Windows get away with such a spotty job of formatting the SDCards in the first place (yes, yes, besides the excuse it being a Microsoft product).

-thanks
Reply With Quote
  #2  
Old 17th December 2011, 10:09 PM
Chilly Willy's Avatar
Chilly Willy Online
Registered User
 
Join Date: Jul 2008
Posts: 1,235
linuxfirefox
Re: Partition tables on a new SDCard...

Everything that I ever read about these cards says to "format them with the device you intend to use them in" (somewhat paraphrased), even a new card. So I take it that it is the nature of the beast to go with whatever it is working with it, not a "universal" format.

Not sure as to why M$ (or anything else, for that matter) could actually work with / make a junky table, but as you said, maybe it's M$.
But I HAVE ran into situations where a card, once formatted for one device, wouldn't work worth a hoot in another. So I take it that what I first said is very valid & it has something to do more with the card itself. (it would be something worth the research)

As vague as this is, I hope I helped a LITTLE!
__________________
Chilly Willy, Tux's little cousin...

By its very nature, Windows is a PANE!

Last edited by Chilly Willy; 17th December 2011 at 10:12 PM.
Reply With Quote
  #3  
Old 17th December 2011, 10:25 PM
st2000 Offline
Registered User
 
Join Date: Jun 2011
Posts: 6
linuxfirefox
Re: Partition tables on a new SDCard...

Thanks Chilly Willy, that helps some. But it doesn't explain how these SDCards can (auto) mount on a Fedora 13 box. But, while mounted on that same box, Fedora 13's fdisk says the SDCrad had 4 partitions of impossible sizes. Not only that, but 3 partitions were of an type unknown to fdisk. The other partition was identified as some sort of Norton partition type. Honesty, Fedora could not have been using this partition table as it mounted this 2GByte SDCard as if it had 1 partition of size 2GBytes.

There is something in the SDCard driver that Fedora is using that is very very different from fdisk.

Anyone know what that might be?
Reply With Quote
  #4  
Old 17th December 2011, 11:45 PM
srs5694 Online
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 377
linuxfirefox
Re: Partition tables on a new SDCard...

Flash devices such as SD cards are often used without partitions. This is especially common because Windows only acknowledges the existence of the first partition on such disks, even when the SD card is partitioned; thus, from a Windows perspective, there's no point to creating partitions on such devices. (Creating a single disk-spanning partition does no real harm from a Windows perspective, either, except for the tiny amount of space it consumes.)

Note that the contents of the first sector is not "random junk;" it's the first sector of the filesystem (presumably FAT, or possibly NTFS) on the disk. Thus, you should not attempt to modify that data with fdisk or any other partitioning tool.

You should be able to mount such devices in Linux by mounting the main disk device file rather than a partition file. For instance, "mount /dev/sdc /mnt" rather than "mount /dev/sdc1 /mnt". If you're using Nautilus or some other GUI tool and it's not checking the whole-device file, then I'm not sure what to suggest as a solution within that tool, such I'm not sure what sort of configuration options they offer. In a worst-case scenario, though, you could define an /etc/fstab entry to get the thing to work via a manual mount command issued as a normal user.

In most cases, you can partition an SD card and it'll work fine, so if you prefer to do it that way, go ahead and give it a try. I'm not sure what to suggest for how to do this in Windows, though, since I'm not as familiar with the Windows tools as with the Linux tools. Personally, I'd use fdisk, parted, or GParted in Linux.
Reply With Quote
  #5  
Old 18th December 2011, 12:05 AM
Chilly Willy's Avatar
Chilly Willy Online
Registered User
 
Join Date: Jul 2008
Posts: 1,235
linuxfirefox
Re: Partition tables on a new SDCard...

I'm not sure if this applies to SD's (especially cards) but on regular HD's the geometry used by the different OS's is different, thus it reads from different areas of the HD for whatever. So if that is the case HERE, that may have something to do with it as well. When I first played with linux, I could add linux to an HD, "erase" the HD with M$ & STILL read the linux. - it all depends on how the software (& maybe HW as well) is set up to operate. Short of doing a bit of research myself, that is the best I can give you, at present anyway...

Also, I think srs5694 has a valid point... & may be the reason for formatting the cards in the device using it, they all use there own setups of the card.
__________________
Chilly Willy, Tux's little cousin...

By its very nature, Windows is a PANE!
Reply With Quote
  #6  
Old 18th December 2011, 12:26 AM
srs5694 Online
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 377
linuxfirefox
Re: Partition tables on a new SDCard...

The cylinder/head/sector (CHS) geometry of disks is largely a thing of the past. It maxes out at somewhere around 8 GB (I don't recall the precise value), so it's useless on disks larger than that. New partitioning systems, such as the GUID Partition Table (GPT) system, don't use CHS geometries at all. Instead, modern OSes use logical block addressing (LBA), which doesn't vary from one device to another. Even on smaller disks and with MBR, most OSes and utilities now ignore CHS values in favor of LBA. Mis-matched CHS values are therefore important only when dealing with relatively small disks (which some SD cards are, of course), and even then only when using older OSes such as DOS.

Note that many devices that use SD cards and similar storage media, like cellphones and ebook readers, are based on Linux, OS X (in its iOS variant), or another modern OS, so they generally use the saner LBA system and ignore CHS values.

All that said, your suggestion to prepare the card in the device that will use it is certainly sensible. Although problems are rare when doing otherwise, in my experience, such problems are not unheard-of. OTOH, if the card is to be used to move data around by "sneakernet" between multiple computers or devices, the goal should be to prepare it in a way that creates maximum compatibility. Usually a single FAT partition will do the job in that case, although if even one device or computer expects something else, another setup may be necessary.
Reply With Quote
  #7  
Old 18th December 2011, 01:13 AM
Chilly Willy's Avatar
Chilly Willy Online
Registered User
 
Join Date: Jul 2008
Posts: 1,235
linuxfirefox
Re: Partition tables on a new SDCard...

---a bit off topic, but---

Yeah, I've taken the old IDE drives that the first sector was bad & changed the geometry settings & fooled the machine so it would work. Up to 98, maybe early xp, not sure, don't really remember. (I hate to "junk" anything I may be able to get to work - BTW: it was surprising how long they DID work)

---back to topic---

The cards, if I wanted to use them in multi devices, I'd leave them as is when I bought them. That seems to work the best, for me, anyway.
But I have had issues in some devices until I formatted it just for the device, though. But not all that often, so one just has to try it & see...
__________________
Chilly Willy, Tux's little cousin...

By its very nature, Windows is a PANE!

Last edited by Chilly Willy; 18th December 2011 at 01:25 AM.
Reply With Quote
Reply

Tags
partition, sdcard, tables

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel is unable to re-read the partition tables. benicio Using Fedora 0 23rd November 2009 06:19 AM
Problems with partition tables in Fedora 9 MiLev Using Fedora 1 19th January 2009 08:45 PM
Windows and Fedora Partition Tables not compatible? Nefarious Using Fedora 4 7th August 2007 04:26 AM
FC4 unable to recognize partition tables quantummechanic EOL (End Of Life) Versions 0 29th August 2005 04:27 PM
Linux,Partition Tables,multiboot javier030664 Installation and Live Media 0 17th June 2005 05:53 AM


Current GMT-time: 23:18 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat