[Tiny-tux] question about flashing SD cards

Corey McGuire coreyfro at coreyfro.com
Fri Dec 17 13:06:24 PST 2010


Hey,

Quick question, have you manually set sectors, heads, cylinders, tracks,
etc, in fdisk?
http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html

Also, Erik Swedberg was having trouble with a specific SD card reader.
Might try another.  I run Linux on my Macbook Pro 15" and it's internal SD
reader works flawlessly.

Also, some auto mounting schemes in Linux may be suspect.  You might see how
you can specify their behaviours for specific device ID's.  For instance,
see if you can specify that filesystem X gets mounted "read only" by
default.

As far as validation, you can:

   - DD the individual partitions from the device to partition image files
   - mount them as images using loopback
   - make your changes to the mounted images
   - unmount
   - DD the partition image back to the device
   - then MD5 both the devices and the images

This is slow for large filesystems, obviously, but for boot, it should be
fast enough and worth the effort.  In fact, openembedded has features to
generate images instead of tar balls for just this reason, but I still
prefer tar balls.

As far as interruptions from the OS, I highly doubt it. SD cards are so slow
relative to the rest of the system, and Linux file handling so robust, that
I can't imagine that such a problem would arise.

Lemme know if any of this helps or if you come across a solution.  As the
under-qualified leader of this group, I need all the help I can get ;-)

I look forward to seeing you on the 30th!

On Fri, Dec 17, 2010 at 12:13 PM, Alison Chaiken <alchaiken at gmail.com>wrote:

> All right, you guys are as liable to know the answer as anybody.
>
> I've been having problems creating images on SD cards reproducibly.
> Sometimes I get bootloader errors when I've only changed the root
> filesystem (using Kickstart) and have made no (intentional) changes to
> /boot, which contains uboot.    Listing /boot using a USB flashcard
> writer plugged into my top shows the same files in working cards as in
> non-working ones.    The working cards always boot and the non-working
> ones never boot, so the problem is not that the board itself is
> unreliable.
>
> Questions:
> 1. Is there a general-purpose validation method (like a CRC) for
> checking the /boot filesystems or at least comparing the working ones
> to the non-working ones?    Can someone suggest an open source tool?
>
> 2. Are interruptions of the writing process a problem?    In other
> words, should I be performing the writes with my laptop at runlevel 3
> in single-user mode?   Presumably Ctrl-Zing out of an ongoing write
> destroys the card, or no?
>
> 3. Anyone else have this problem or have other suggestions?
>
> Thanks for any suggestions anyone might have.    And I'm interested in
> carpooling up to the meetings too.   I'd definitely like to share a
> ride for the 12/30 meeting.    My not particularly luxurious or clean
> car could take 3 additional people.
>
> --
> Alison Chaiken
> (650) 279-5600  (cell)
>              http://www.exerciseforthereader.org/
> Freedom is not an abstract concept in business. -- Bob Young, founder of
> Red Hat
> _______________________________________________
> Tiny-tux mailing list
> Tiny-tux at lists.noisebridge.net
> https://www.noisebridge.net/mailman/listinfo/tiny-tux
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.noisebridge.net/pipermail/tiny-tux/attachments/20101217/42c60ac8/attachment.htm 


More information about the Tiny-tux mailing list