September 22, 2019, 06:08:30 am

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Bypass inserted microsd during boot

Started by vlemo, June 27, 2013, 01:36:05 pm

Previous topic - Next topic

vlemo

June 27, 2013, 01:36:05 pm Last Edit: June 27, 2013, 01:38:38 pm by vlemo
I have 2 cbb one with sandisk ultra inserted and nand flash with debian os., the second also is flashed with the same os and a microsd of an other brand. Both microsd's are ext4 formatted with no boot partitiion. The first cbb boots from nand bypassing the inserted ultra microsd and mounting the ultra microsd as data disk. The second cbb does not boot while the microsd is inserted and only boots when de microsd is pulled out. When I insert that microsd during startup the microsd is mounted as data disk.

How can I bypass booting from inserted microsd's? Any suggestions would be welcome.

patwood

Zero out the first few 100K of the SD card and repartition; if this card was used previously for booting a linux image, there are magic numbers on it outside the first partition (after the partition table).  You can also zero out the space betweeen the partition table and the first partition if you can determine what that is.  For example, on my SD card, the partition table, SPI, and uboot take up the first 1MB, so to zero it out, I do:

dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1 count=2047