lsblk查看分区:
sdb      8:16   1   3.7G  0 disk
├─sdb1   8:17   1    16M  0 part   # boot
├─sdb2   8:18   1   700M  0 part   # root fs
├─sdb3   8:19   1    60M  0 part   # recover
├─sdb4   8:20   1     1K  0 part   # nothiing, ext partition
├─sdb5   8:21   1   350M  0 part   # db/other vars
├─sdb6   8:22   1   250M  0 part   # user space
└─sdb7   8:23   1   2.3G  0 part   # /media
== create sd partition == create sd partition, we use fdisk tool the first create fdisk.sh, then exe fdisk.sh the script content from links: https://git.g77k.com/yiling.cao/luna-sd-installer/blob/master/emmc_fdisksd.sh == install sd image == Execute scripts to automate file system is installed on the SD card the script content is following: https://git.g77k.com/yiling.cao/luna-sd-installer/blob/master/auto_sd_installer_B_boards.sh
#!/bin/bash

set -ex

if [[ -z "$1" ]]; then
    exit 1
else
    echo "installing fs to $MMC"
fi

#SERVER_ADDR=c2h2pro.3322.org:81
SERVER_ADDR=192.168.8.28:81

MMC=$1
DIR=`pwd`
MNT0=`mktemp -d`

umounts(){
    umount ${MMC}1 || true
    umount ${MMC}2 || true
    umount ${MMC}3 || true
    umount ${MMC}5 || true
    umount ${MMC}6 || true

}

install_fs(){
    echo "install BOOT FS..."
    mount ${MMC}1 ${MNT0}
    cd ${MNT0} && rm -rf * &&  wget -O bootfs.tar.xz http://${SERVER_ADDR}/luna-bootfs/luna-bootfs-latest.tar.xz && tar -xvf bootfs.tar.xz || true && cd ${DIR}
    cd ${MNT0} && wget -O u-boot.img http://${SERVER_ADDR}/B-UBOOT-FILES/u-boot.img
    cd ${MNT0} && wget -O MLO http://${SERVER_ADDR}/B-UBOOT-FILES/MLO
    cd ${DIR}
    sync && umount ${MMC}1

    echo "install ROOT FS..."
    mount ${MMC}2 ${MNT0}
    cd ${MNT0} && rm -rf * &&  wget -O rootfs.tar.xz http://${SERVER_ADDR}/luna-itc-debian-release-rootfs/latest-luna-client-debian_release.tar.xz && tar -xvf rootfs.tar.xz && rm -rf *.xz && cd ${DIR}
    sync && umount ${MMC}2

    echo "install UP FS..."
    mount ${MMC}3 ${MNT0}
    cd ${MNT0} && rm -rf * &&  wget -O upfs.tar.xz http://${SERVER_ADDR}/rootfs-minimal.tar.xz && tar -xvf upfs.tar.xz && rm -rf *.xz && cd ${DIR}
    sync && umount ${MMC}3

    echo "install ROOT DIR..."
     mount ${MMC}5 ${MNT0}
    cd ${MNT0} && rm -rf * &&  wget -O rootdir.tar.xz http://${SERVER_ADDR}/luna-itc-debian-release-rootfs/latest-luna-client-debian-root_release.tar.xz && tar -xvf rootdir.tar.xz && rm -rf *.xz && cd ${DIR}
    sync && umount ${MMC}5

    echo "install VAR DIR..."
    mount ${MMC}6 ${MNT0}
    cd ${MNT0} && rm -rf * &&  wget -O vardir.tar.xz http://${SERVER_ADDR}/luna-itc-debian-release-rootfs/latest-luna-client-debian-var_release.tar.xz && tar -xvf vardir.tar.xz && rm -rf *.xz && cd ${DIR}
    sync && umount ${MMC}6
}

umounts
install_fs
umounts