IMX6 Cubox-i4 booting from eSata

  • I've managed to get LE to boot from an eSata SSD with vpeter 7.95.3 K3.14.
    I modified uEnv.txt on the SD card to point root=/dev/sda1 and disk=/dev/sda2.

    However, I really want to use root=UUID=xxxx and disk=UUID=xxxx but the SD card and SSD have the same UUID.

    Mercury:# blkid
    /dev/sda1: SEC_TYPE="msdos" LABEL="LIBREELEC" UUID="42EE-5EC6" TYPE="vfat" PARTUUID="a22eb27c-01"
    /dev/sda2: LABEL="Storage" UUID="e8c5ba0a-3f3c-41f4-988a-cd06f120819c" TYPE="ext4" PARTUUID="a22eb27c-02"
    /dev/mmcblk0: PTUUID="a22eb27c" PTTYPE="dos"
    /dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="LIBREELEC" UUID="42EE-5EC6" TYPE="vfat" PARTUUID="a22eb27c-01"
    /dev/mmcblk0p2: UUID="e8c5ba0a-3f3c-41f4-988a-cd06f120819c" TYPE="ext4" PARTUUID="a22eb27c-02"
    /dev/loop0: TYPE="squashfs"

    I assume this is normal because both were created from the same image.

    It seems to boot happily with the eSata and a USB HDD attached but I want to make sure it doesn't try to use the HDD as the boot image - and fail!

    So can I just use gparted and assign a new UUID to /dev/sdax

    Also, what files do I really need on the SD card. Can I get away with just uEnv.txt, KERNEL and SYSTEM?

  • You need to set new UUID or use device name. Because when both devices are attached then kernel is used from one (boot) device and system could be used from another..

    You could set new UUID from LibreELEC to unmounted device with command like

    Code
    tune2fs /dev/sdXY -U $(uuidgen)

    On flash partition you need file uEnv.txt, KERNEL, SYSTEM and imx6q-cubox-i.dtb.

  • If I understand correctly, during boot the KERNEL, SYSTEM and mx6q-cubox-i.dtb ( I assume some load points) are loaded into memory from the SD card and /storage is defined from uEnv.txt = in my current case /dev/sda2

    However, I don't need boot =/dev/sda1 as it is already loaded from the SD card, so I just need disk=/dev/sda1 in uEnv.txt (As I no longer need the boot partition) which is /storage - which is the whole eSata disk.

    So, I'm hoping in uEnv,txt, if I'm correct, that all I need is the boot=/dev/mmcblk0p1 on the SD card and disk=/dev/sda1. (UUID - whatver)

    So I don't need /dev/mmcblk0p2

    So: If I'm correct

    SD card: Only contains system files on /dev/mmcblk0p1
    eSata : Only contains /storage on /dev/sda1

    As all system I/O is done in memory there is not need to load LE onto eSata for any performance gain.

    Am I correct?

  • @vpeter.Thanks, that all worked as hoped.

    For others: What I did was.
    1) Installed LE normally onto the SD card, boot it and let it resize, reboot and initialize (Allow any addon updates to finish). Shutdown.
    2) Format your new eSata drive as ext4 (Give it an unique LABEL or new UUID)
    2) Copy everything as root (Includes .<files>) from /dev/mmcblk0p2 to /dev/sda1/storage (eSata drive).
    3) Remove /dev/mmcblk0p2 from the SD card) Not needed any more.
    4) Edit uEnv.txt and change disk=/dev/mmcblkp02 to either:
    disk=/dev/sda1 (If only one disk will ever be attached) - best not to use.
    disk=LABEL=<eSata disk label> as set in (2)>
    disk=UUID=<UUID> as set in (2).

    Connect the eSata cable to the eSata port, and the power to a USB port.

    Power up the Cubox and if all has gone well, the disk I/O should be significantly improved.