Successful boot from HDD
So, following thing:

I have built a server with the RockPro64 and 4 HDDs. After my SD Card died due to frequent flashing of new images and the immense data writing due to kernel compilation, I have looked into how I could boot my RockPro64 from my HDDs.

Turns out, nothing easier than that!

Just install your (in my case Arch) Linux on the SD card. This will create different partitions, where mmcblk0p7 (or however your System will call the partitions on your SD card), the 7th partition is your root file system.

U-Boot WILL ALWAYS look in the boot/ folder on this partition for the kernel and the extlinux config. But not for the other parts, the root= flag in the extlinux.conf specifies where the kernel should boot the rootfs from.

So, create a partition on one of the HDDs (Raid and LVM should also work, just make sure to edit the mkinitcpio and recreate the kernel config before you continue), format it to ext4 and copy everything from the rootfs on the sdcard into this new partition on the HDD. Make sure you copy them with correct metadata, I recommend rsync.

After that, use fdisk to give a label for this partition, that you will not use any more on the system, like 'hddroot'.

Edit the /boot/extlinux/extlinux.conf on your SD card and change your rootfs to the specified partition label above: 'root=label=hddroot'

now, in the partition on the HDD, edit the etc/fstab to mount your original rootfs from the sdcard somewhere on your system. I created a folder called /sdroot for that. Set another fstab entry to bind mount /sdroot/boot to /boot. This is needed, so that /boot in your system points to /boot on your SDcard. Otherwise, kernel upgrades would install your new kernel on the HDD and U-Boot would still load the old one from the SD card. This way, a new kernel installed to /boot will always land on your SD card, minimizing the write load to kernel upgrades only.

That't it, you're good to go! This is running with a USB HDD and a SATA HDD on my system, I'll try packing the rootfs into a software raid and lvm later. Hopefully this way, my SD card will survive more than just a couple of weeks...

Have fun!

Possibly Related Threads...
Thread Author Replies Views Last Post
  Problems flashing u-boot on RockPRO64 eMMC mau-tux 1 157 05-28-2019, 07:15 AM
Last Post: CrystalGamma
  Help at prompts during first boot. Diesel141 0 91 04-24-2019, 01:15 PM
Last Post: Diesel141
  RockPro64 won't boot. Faradn 6 336 03-28-2019, 04:18 AM
Last Post: karcsika
  Unable to boot ayufan images vman 0 124 03-27-2019, 02:06 AM
Last Post: vman
  EMMC Boot jerry110 10 818 11-17-2018, 05:24 AM
Last Post: todd5200
  Rockpro64 doesn't boot SteveJ 7 732 11-14-2018, 06:28 PM
Last Post: dukla2000
  Network boot Drago 1 222 09-04-2018, 12:28 PM
Last Post: dukla2000
  U-boot map pececitozipi 0 304 06-16-2018, 03:45 AM
Last Post: pececitozipi

Forum Jump:

Users browsing this thread: 1 Guest(s)