Cara Boot Armbian dari SSD di TV Box B860H (Amlogic S905x): Step by Step + Troubleshoot

Panduan lengkap boot Armbian dari SSD di TV Box B860H berbasis Amlogic S905x — mulai dari modifikasi emmc_autoscript, partisi SSD, sampai troubleshoot kernel panic dan USB detection.

Punya TV Box Amlogic S905x yang nganggur? Atau server ARM murah yang mau lo jadiin sesuatu yang berguna? Di artikel ini gw ceritain pengalaman gw boot Armbian dari SSD eksternal di TV Box B860H, lengkap dari proses yang berhasil sampai troubleshoot yang bikin pusing.

Spesifikasi Device

  • Device: TV Box B860H (Amlogic S905x)
  • Firmware/OS: Armbian (build khusus untuk Amlogic S905x)
  • Target storage: SSD via USB (partisi MBR: sda1 FAT32, sda2 ext4, sda3 ext4)
  • Bootloader: Vendor u-boot (tidak bisa diganti, read-only)
  • Hostname: enigma

Kenapa Boot dari SSD?

eMMC bawaan TV Box kapasitasnya terbatas dan kecepatannya biasa aja. Dengan boot dari SSD, lo bisa dapet storage lebih besar, lebih cepat, dan lebih tahan lama untuk workload server. Masalahnya, vendor u-boot di device ini nggak bisa diganti — jadi kita harus "trik" dia lewat file emmc_autoscript.

Konsep: emmc_autoscript

Vendor u-boot di S905x nyari file emmc_autoscript di eMMC waktu boot. File ini sebenernya adalah u-boot script yang bisa kita modifikasi untuk redirect boot ke SSD sebelum load kernel dari eMMC. Jadi alurnya:

  1. u-boot jalan dari ROM/eMMC
  2. u-boot baca emmc_autoscript dari eMMC
  3. Script redirect: cek apakah SSD tersedia
  4. Kalau SSD ada → boot dari SSD (sda2/sda3)
  5. Kalau SSD nggak ada → fallback ke eMMC otomatis

Persiapan: Partisi SSD

SSD dipartisi dengan skema MBR (bukan GPT, karena u-boot lama kadang nggak kenal GPT):

sda1  FAT32   ~256MB   (boot partition — kernel, dtb, uInitrd)
sda2  ext4    ~8GB     (rootfs utama)
sda3  ext4    sisa     (data/home)

Buat partisi:

fdisk /dev/sda
# buat 3 partisi: FAT32, ext4, ext4
mkfs.vfat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sda3

Install Armbian ke SSD

Copy rootfs Armbian ke sda2, dan file boot (kernel + dtb + uInitrd) ke sda1:

# Mount dulu
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot

# Dari sistem Armbian yang udah jalan di eMMC, gunakan armbian-install
# atau rsync manual dari eMMC ke SSD
rsync -axv / /mnt --exclude={/proc,/sys,/dev,/tmp,/run,/mnt}
rsync -axv /boot/ /mnt/boot/

Modifikasi emmc_autoscript

Ini bagian paling krusial. File emmc_autoscript adalah compiled u-boot script. Kita perlu buat script baru yang cek SSD dulu sebelum boot dari eMMC.

Buat file boot_ssd.txt (source script):

if usb start; then
  if fatload usb 0:1 0x1000000 uImage; then
    echo "Booting from SSD..."
    setenv bootargs "root=/dev/sda2 rootfstype=ext4 rootwait rw console=ttyAML0,115200"
    bootm 0x1000000
  fi
fi
echo "SSD not found, falling back to eMMC..."
run storeboot

Compile jadi u-boot script:

mkimage -A arm -T script -C none -n "Boot Script" -d boot_ssd.txt emmc_autoscript

Copy ke partisi boot eMMC:

mount /dev/mmcblk2p1 /media/emmc-boot
cp emmc_autoscript /media/emmc-boot/
umount /media/emmc-boot

Troubleshoot yang Gw Alamin

1. USB/SSD Nggak Ke-detect

Gejala: u-boot nggak nemu USB device, langsung fallback ke eMMC.

Solusi: Pastiin SSD dicolok sebelum power on. Beberapa u-boot lama nggak support USB hot-plug. Coba juga port USB yang berbeda (biasanya USB 2.0 lebih reliable dari USB 3.0 di hardware lama).

2. Kernel Panic: Can't mount root filesystem

Gejala: Boot sampai kernel tapi gagal mount rootfs.

Solusi: Cek bootargs di script — pastiin root=/dev/sda2 sesuai dengan partisi rootfs lo. Kalau pake UUID lebih aman:

setenv bootargs "root=UUID=$(blkid -s UUID -o value /dev/sda2) rootfstype=ext4 rootwait rw"

3. emmc_autoscript Nggak Ke-load

Gejala: Device langsung boot ke Android/firmware lama.

Solusi: File harus ada di root partisi boot eMMC (biasanya mmcblk2p1). Pastiin nama file persis emmc_autoscript tanpa ekstensi, dan udah di-compile pake mkimage bukan plain text.

4. DTB Nggak Cocok

Gejala: Boot tapi hardware nggak berfungsi normal (no HDMI, no USB, dll).

Solusi: Pastiin pakai DTB yang tepat untuk B860H S905x. Di Armbian biasanya ada di /boot/dtb/amlogic/, coba meson-gxl-s905x-p212.dtb atau yang spesifik B860H.

5. Dual NetworkManager Profile (Static + DHCP Fallback)

Karena server ini kadang dipindah-pindah jaringan, gw setup dua profil NetworkManager:

# Profil static (jaringan utama)
nmcli con add type ethernet con-name "static-home"   ipv4.method manual   ipv4.addresses 192.168.1.105/24   ipv4.gateway 192.168.1.1   ipv4.dns "1.1.1.1 8.8.8.8"

# Profil DHCP (fallback)
nmcli con add type ethernet con-name "dhcp-fallback"   ipv4.method auto   connection.autoconnect-priority -1

Dengan priority lebih rendah, profil DHCP hanya aktif kalau profil static gagal konek.

Verifikasi Boot dari SSD

Setelah berhasil boot, verifikasi sistem beneran jalan dari SSD:

# Cek root filesystem
df -h /
# Output harusnya menunjuk ke /dev/sda2

# Cek mount points
lsblk

# Cek dmesg untuk konfirmasi
dmesg | grep -i "root|sda"

Hasilnya

Setelah semua troubleshoot selesai, server "enigma" ini sekarang jalan stabil dari SSD dengan Armbian. Performance-nya signifikan lebih baik dari eMMC, terutama untuk operasi I/O intensif. Automatic fallback ke eMMC juga works kalau SSD dicabut — jadi nggak perlu khawatir brick device.

TV Box bekas yang tadinya nganggur sekarang jadi server homelab yang proper. Total biaya? Harga TV Box second + SSD murah. Worth it banget.

Referensi

  • Armbian documentation: docs.armbian.com
  • Amlogic u-boot script reference
  • Armbian forum thread untuk S905x devices