Instructions for moving the rootfs from uSD card to SATA disk, because
I couldn't find it anywhere:

Connect SATA disk. An old 2.5" should do, a 3.5" should work too as long
as it's powered from somewhere (not the cubieboard).
A cheap PATA/SATA converter works too and it's possible to make use of
old 2.5" PATA disks if they have enough space for the purpose.

My cubieboard was shipped with a nifty power/data SATA cable, with a
plug to go onto the board's "SATA 5V" 2-pin header. This power header
turned out to be useless (I tried half a dozen different disks, some
SATA) because it doesn't provide enough voltage for the disk to spin up.
I measured around 4.5V. So it's necessary to power the 2.5" from some
other source too. There are some cubietruck mounting boards that might
fit here.

Boot the cubieboard, I assume from uSD card.

The SATA disk can be connected any time, the SATA port is hot-pluggable!
Yes SATA ports and SATA power are always hot-pluggable without damaging
hardware, but that doesn't mean the kernel driver will also play that
game. This one works, the disk is immediately recognised. Nifty!

The rootfs is on /dev/mmcblk0p2, let's say the SATA partition is
/dev/sda1

  # mkfs -text4 -m1 /dev/sda1   (or whatever preference)
  # mount /dev/sda1 /mnt
  # nice cp -ax / /mnt/         (copy rootfs)

  # cd /boot
  Edit boot.script, replacing /dev/mmcblk0p2 with /dev/sda1.
  Re-create boot.scr:
  # mkimage -C none -A arm -T script -d boot.script boot.scr
  
  Fix up fstab:
  # cd /mnt/etc
  Edit fstab, replacing /dev/mmcblk0p2 with /dev/sda1.

In my case, /mnt/proc was not copied, but the system hangs on boot if it
doesn't exist. Check, and do

  # cd /mnt
  # mkdir proc
  # chmod 555 proc

Done.

  # reboot

Note that /boot is still located on uSD card, /dev/mmcblk0p1. Apparently
the hardware can not boot from SATA directly, although it should be
possible to move /boot into the nand flash - but I don't know how. Until
then a (very small) uSD card remains necessary.

Swap space is also still located on the uSD card, /dev/mmcblk0p3. To
move it to SATA disk, create a partition for it, and initialise it.
Edit /etc/fstab (on the rootfs, now on SATA disk!) to activate it and
reboot.

HTH,

Volker

-- 
Volker Kuhlmann
http://volker.top.geek.nz/      Please do not CC list postings to me.
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to