Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cubietruck: Boot to SATA (via NAND)

Featured Replies

Hi (and happy new year everyone!),

 

I recently put a SSD in my Cubietruck and installed the Cubietruck Vanilla Image (with Kernel 4.x) on it.

This is working fine, but what bugs me is the fact that I still need to have a microSD-card installed.

 

As far as I understood, the bootloader cannot directly boot to SATA (missing drivers). How does the bare Image on the microSD-card achieve this?

And even more important: How can I move the 'important' part (which does the bootloading and SATA drivers) to NAND so I can boot without a microSD-card installed?

 

Thanks in advance!

  • Author

Here is what I have so far:

- a working system with Kernel 3.4 on NAND

- a working system with Kernel 4.x on SATA (SSD)

 

I can boot into the NAND system without an sdcard and it does see the SSD.

But how do I tell the NAND system to run the system on the SSD? (InitRamDisk?)

  • Author

Kernel 4.x does not support NAND

I know, I don't need to be able to read/write from NAND on the the second system (SSD) once it is booted.

 

I thought this is possible because the documentation says under "How to install to NAND, SATA & USB?":

You can create up to three scenarios:

  • boot from SD, system on SATA / USB
  • boot from NAND, system on NAND
  • boot from NAND, system on SATA / USB

[1] http://www.armbian.com/documentation/

 

EDIT:

Maybe to clarify my question:

What does the (Vanilla) SD-Card image [2] do to boot from SATA and how can I duplicate this behaviour on NAND?

 

[2] http://mirror.igorpecovnik.com/Armbian_4.5_Cubietruck_Debian_jessie_4.2.3.zip

  • Author

Could I just rip the first few MBs (or however much) from the SD-Card Image and write that to NAND? (Massive over-simplification)

  • Author

What I tried now was exchanging "nand_root=/dev/nand2" with "nand_root=/dev/sda1" in the /boot/uEnv.txt on /dev/nand1.

It did definitely work (identified by hostname), however it complains about missing kernel modules (e.g. not being able to type any input, but ethernet was working).

 

Could you tell me what happens on the SD-card when I run sata-install (Vanilla kernel)? Because afterwards the SD-card obviously only boots to SATA (if present), whereas before it launches its own OS.

Could you tell me what happens on the SD-card when I run sata-install 

 

https://github.com/igorpecovnik/lib/blob/master/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh

Check the script. What you are trying to accomplish is more complex than understanding this. I can answer to any "why" from the script but I can't tell you how to boot vanilla kernel with help from NAND. If I had that answer it would already be in the script.

  • Author

https://github.com/igorpecovnik/lib/blob/master/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh

Check the script. What you are trying to accomplish is more complex than understanding this. I can answer to any "why" from the script but I can't tell you how to boot vanilla kernel with help from NAND. If I had that answer it would already be in the script.

I have seen that script online, but it is not the same as on the most recent version of the Cubietruck Vanilla image.

https://paste.teknik.io/2664

 

But I managed to find what I was looking for:

# if we have boot script
if [ -f /boot/boot.cmd ]; then
    sed -e 's,root=\/dev\/mmcblk0p.,root=/dev/'"$DESTPART"',g' -i /boot/boot.cmd
    mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
fi

Which basically translates to "in /boot/boot.cmd set root=/dev/sda" (and then update the image)

 

If I understand correctly, the hardware could (theoretically) read a bootloader from NAND, right?

Couldn't I then just copy the SD-card image onto NAND?

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.