Moving cubietruck Linaro to a „real“ hard drive

Moving cubietruck Linaro to a „real“ hard drive

In this guide I will record the steps I completed to move the rootfs to a SSD harddrive.
When your hard disk is connected to your cubietruck power on and connect via Putty (or control directly via keyboard).

  1. Check, if the hard disk was found and what kind of partitions are available:
    seiler@cubietruck:~# sudo fdisk -l

    The resuls will look somehow similar to this:

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
    /dev/sda2 206848 312578047 156185600 7 HPFS/NTFS/exFAT


  2. I have a sdd connected with two partitions sda1 and sda2 – sda1 has a boot flag.
  3. In the next step the partitions will be deleted (yes, you will loose the data on your hdd).
    seiler@cubietruck:~# sudo fdisk /dev/sda


  4. With „d“ followed by the partition number you can delete a partition. In my case, I used: „d“, followed by „1“ and „d“ followed by „2“.
  5. To add a new partition press „n“
    Command (m for help): d
    Partition number (1-4): 1
    Command (m for help): d
    Selected partition 2
    Command (m for help): 2
    2: unknown command
    Command action
    a toggle a bootable flag
    b edit bsd disklabel
    c toggle the dos compatibility flag
    d delete a partition
    l list known partition types
    m print this menu
    n add a new partition
    o create a new empty DOS partition table
    p print the partition table
    q quit without saving changes
    s create a new empty Sun disklabel
    t change a partition's system id
    u change display/entry units
    v verify the partition table
    w write table to disk and exit
    x extra functionality (experts only)
    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-312581807, default 2048):
    Using default value 2048
    Last sector, +sectors or +size{K,M,G} (2048-312581807, default 312581807):
    Using default value 312581807
    Command (m for help): p
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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
    Disk identifier: 0x4b1d5d07
    Device Boot Start End Blocks Id System
    /dev/sda1 2048 312581807 156289880 83 Linux
    Command (m for help):


  6. In the next we are formating the newly created partition:
    seiler@cubietruck:~# sudo mkfs.ext4 /dev/sda1

    Output looks like:

    mke2fs 1.42.5 (29-Jul-2012)
    Discarding device blocks: done
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    9773056 inodes, 39072470 blocks
    1953623 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=0
    1193 block groups
    32768 blocks per group, 32768 fragments per group
    8192 inodes per group
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624, 11239424, 20480000, 23887872
    Allocating group tables: done
    Writing inode tables: done
    Creating journal (32768 blocks): done
    Writing superblocks and filesystem accounting information: done


  7. Moving the data:
    seiler@cubietruck:~# sudo dd if=/dev/nandb of=/dev/sda1 bs=1024

    Output on command line will look like:

    2048+0 records in
    2048+0 records out
    2147483648 bytes (2.1 GB) copied, 235.38 s, 9.1 MB/s

    This process took about 4-5 minutes to complete.

  8. Finally, you need to edit the  uEnv.txt to boot from the SSD hard drive:
    seiler@cubietruck:~# sudo mount /dev/nanda /mnt/
    seiler@cubietruck:~# sudo nano /mnt/uEnv.txt

    Set the last line to:


    Save (Strg+O) and Exit (Strg+X)

  9. Last step: rebooting:
    seiler@cubietruck:~# sudo reboot


    Broadcast message from root@cubietruck
    (/dev/pts/1) at 19:13 ...
    The system is going down for reboot NOW!





2019-01-03T16:47:23+00:00Tags: , , |


  1. Peter 27. Juni 2014 at 22:30 - Reply

    Thanks for the suggestions you have provided here.

    • Sven Seiler 28. Juni 2014 at 09:32 - Reply

      You are welcome. Hope it helps you to get it working.

  2. B_ri 7. August 2017 at 09:14 - Reply

    Interesting, is it possible to move the linaro data from sd card to hdd instead of nand to hdd?

Leave A Comment