Dual Boot

Dual Boot

Through Micro SD Card

How to boot Edison from an SD card (Linux)

by Carlos Rodriguez from Here

This tutorial describes a way to boot an Edison board with the Root Filesystem on an external storage (SD card). The kernel and bootloader remain on the local eMMC. For now, we are not able to boot a kernel from an external storage.

SD Card Format

  1. You need to have a SD card formatted with ext4 file system to store your root file system (do not use FAT/FAT32 for that). You can use gparted or Intel Edison as follows:

root@edison:~# dmesg
[420794.481542] mmc1: new high speed SDHC card at address 1234
[420794.482480] mmcblk1: mmc1:1234 SA16G 14.4 GiB
[420794.484152]  mmcblk1: p1
root@edison:~# umount /dev/mmcblk1p1
root@edison:~# fdisk /dev/mmcblk1   

Welcome to fdisk (util-linux 2.24.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk1: 14.5 GiB, 15548284928 bytes, 30367744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device         Boot Start       End   Blocks  Id System
/dev/mmcblk1p1       8192  30367743 15179776   c W95 FAT32 (LBA)

Command (m for help): d

Selected partition 1
Partition 1 has been deleted.

Command (m for help): n                                                         

Partition type:                                                                 
   p   primary (0 primary, 0 extended, 4 free)                                  
   e   extended                                                                 
Select (default p): p                                                           
Partition number (1-4, default 1): 1                                            
First sector (2048-30367743, default 2048):                                     
Last sector, +sectors or +size{K,M,G,T,P} (2048-30367743, default 30367743):    

Created a new partition 1 of type 'Linux' and of size 14.5 GiB.                 

Command (m for help): w                                                         
The partition table has been altered.                                           
Calling ioctl() to re-read partition table.                                     
Re-reading the partition table failed.: Device or resource busy                 

The kernel still uses the old table. The new table will be used at the next reb.

root@edison:~#

Edison Ext 4 Image Writing

  1. Download and unpack the Edison OS image from the Software Downloads section of the community.

  1. Your SD card is now ready to boot. Find out the SD card device name

On a running Edison board, plug your formatted SD card and get the device name:

Here, the SD card device is “/dev/mmcblk1” and the partition we’ve created is "/dev/mmcblk1p1". To boot using the external device, you need to modify the U-Boot environment variable named "mmc-bootargs" with kernel boot arguments. In the simplest case you can just change the "root=..." part, but here’s a more elaborated approach, which will help you to switch between booting from eMMC and the SD card more easily. In the Edison Linux console set the U-Boot environment variables like the below:

Reboot Edison

After boot, verify that you are using rootfs stored on your external device: The root file system is now 14.1 GB (this will depend on your SD card size). The SD card will still be automounted to /media/sdcard by Edison’s automount daemon. Since it is the rootfs anyway, this m006F untpoint becomes useless, so disable the systemd service: Now, you have plenty of room to work on Edison and no unnecessary mounts:

Last updated