CubieBoard/SataBoot

With this method you can use a sata HD on your CubieBoard or CubieTruck as boot device.

To make the extra hd function properly you should power your Cubieboard with a power-supply of at least 2Amp.

install lshw

sudo yum install lshw -y

check if the sata disk is available

sudo lshw -C disk

you get something like this when ok:

*-disk                  
     description: ATA Disk
     product: TOSHIBA MK2546GS
     vendor: Toshiba
     physical id: 0.0.0
     bus info: scsi@0:0.0.0
     logical name: /dev/sda
     version: LB01
     serial: 389PC56UT
     size: 232GiB (250GB)
     capabilities: partitioned partitioned:dos
     configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=a2faceba

Fdisk

check harddisks

sudo fdisk -l

partition the sata HD

sudo fdisk /dev/sda

(make one partition: p d n p enter enter enter w)

Copy the root file system to the sata drive

sudo su - root
mkdir /tmp/1 /tmp/target
mount /dev/nandb /tmp/1

format sda1

mkfs.ext4 /dev/sda1
mount /dev/sda1 /tmp/target
(cd /tmp/1; tar --backup -c *) |tar -C /tmp/target -xv

Changing Boot Parameters

mount /dev/nanda /mnt
nano /mnt/uEnv.txt

and adjust the nand_root

nand_root=/dev/sda1
sync
umount /mnt
sudo reboot

After reboot check

df -h

...to confirm /dev/root has the size of your new sata drive

Change back to nand (optional)

Do the following to change back to boot from internal nand

sudo mount /dev/nanda /mnt
sudo nano /mnt/uEnv.txt

adjust nand_root

nand_root=/dev/nandb
sync
sudo umount /mnt
sudo reboot

After reboot check

df -h

...to confirm /dev/root has the size of your original nand storage

Labels: CubieBoard

This page was last edited by BauweBijl on 2021/05/17 09:43:29.

Built with BGAEWiki by BauweBijl