Questions about boot configuration

56 views
Skip to first unread message

Zachary Jacobs

unread,
Feb 1, 2016, 2:19:04 PM2/1/16
to BeagleBoard
Hello,

I'm currently configuring a BeagleBoneBlack (Element14) to be used in a remote location to store a very large amount of sensor data at any given time.  To do this, I wanted to boot directly from the SD card so I changed the boot flag on the eMMC.  However, after using this setup for a few months, my SD card became corrupted.  Whenever I try to boot using that card, it boots into recovery mode and suggest that I run fsck.  I tried to do this with no success:  https://gist.github.com/zachjacobs/7f7d1d6f9bf3c8e424f9.  I am using an SD card that has built in wear leveling so I don't think the issue was caused by too many read/write cycles.

My application may require intermittent power cycling so I need to limit the chance of file system corruption and need to ensure a reliable boot up procedure if that does happen.  My initial thought is to have an image on the eMMC and a duplicate image on the first partition of the SD card.  If the eMMC boot fails then boot from the SD card.  In that scenario, both boot methods would use a secondary partition on the SD card to store the data.  I have tried to set this up by using the latest Jessie snapshot flasher image for the eMMC and the microSD/standalone image for my SD card.  When I boot with the SD card plugged in (without pushing the S2 button), it skips the eMMC and boots straight to the SD card.  When I boot without the SD card, it boots using the eMMC just fine.  Did I mess something up that caused this?  As you see in the boot sequence for the eMMC, uboot is looking for the SD card: https://gist.github.com/zachjacobs/df76521c58429bdd90d4.  And boots the SD card when the SD card is plugged in even though I'm not pressing the S2 button:  https://gist.github.com/zachjacobs/66c9e7e3e72baa1c06ab.  I noticed both logs show "trying to boot from mmc... bad magic".  Does this have something to do with it?


Questions:
Is my proposed bootup method in the first paragraph typical?
In the event of an eMMC corruption and a failed boot to emergency mode, can I somehow protect myself from this partial boot sequence by trying to automatically boot from the SD card?
Should I have concerns with eMMC corruption like I saw on the SD card?

In the second paragraph, Have I don't something to effect the boot order within uboot that causes the SD card to be first?

Thanks!

Zach
Reply all
Reply to author
Forward
0 new messages