Journey into SBCs (ThatGuyB in ARMland)

That is pretty cool, but:

  1. I don’t have RPi clusters, I’m going to have around 2 Odroid HC4s, 2 RockPro64s and not sure on the number of Odroid N2+ yet, as I may have split-brain issues if I’m going to have an even number of nodes, so I need to see how I can divide them in such a way that I can have uneven nodes on 2 switches and be able to automatically establish quorum on a lower number of nodes.

  2. I was boycotting Amazon before, but after my account got locked for some stupid reason (I didn’t transfer enough money in my primary account and they thought I was doing a shady activity and they wouldn’t unlock it even after sending them a stupid bank account statement, f*** you Bezos!), now I’m completely boycotting it, for real this time™. If I can’t buy from MicroCenter, Newegg, BestBuy or Ameridroid (or similar), then I probably have to live without it.

In other news, yesterday I tried installing Armbian on the Odroid HC4, updated to kernel 5.15 and found out that ZFS is not supported on that kernel, but only between 3.10 and 5.10. So I downgraded back to kernel 5.10 and installed zfs-dkms and zfs-zed and it worked. Now I need to either get Alpine to work on the HC4 in diskless mode, or just slap Void on it and run from a SD card.

Getting Alpine to work in diskless mode was a hard nut to crack, but it would benefit the longevity of my SD card. I was seriously contemplating on installing Gentoo or nixOS on the HC4 if ZFS wouldn’t work on Armbian. But now that I discovered that it works on kernel 5.10 and not 5.15, I will try using that instead. I recall 5.10 being an LTS, so I see no reason why I shouldn’t stick with it. Previously all my tests were done on 5.15 and 5.16.

On another note, one bad thing about wiping out Petitboot from the HC4 is that the SBC cannot reboot. I can power it on and it will boot fine from u-boot on the SD card, but if I try to reboot, it will get stuck. I can poweroff just fine though. But if I ever need to do a remote reboot, I can’t do it. I have to poweroff, unplug the power and plug it back in.

So now, I need to think of alternatives. Maybe I can set a PXE or netboot server on one of my other SBCs, like my Pi 2, reflash the SPI with petitboot on the HC4 and see if with petitboot the reboot will work properly.

1 Like

I agree completely I happened across it looking for stuff for the home. I don’t blame you there one bit.

I figured, I knew you were messing with other SBC’s formats, I just wasnt sure if there were the same foot print or not so I wanted to suggest it.

I personally would like to run a SBC for my local backups. The trouble I’m running into is Id need a pair or maybe 4 at the most, drives to connect to it. I have yet to find a USB disk solution that would let me run ZFS (IE a multidisc enclosure). I might not need it for a “Cold” storage, but it would be nice to have the same format for snapshots and using the ZFScopy which seems efficient.

BUT, I’ve moved on and been doing a lot of data collection messing with Ryzen 3000…well in-between wife interruptions to do things like turn on here screen…lol

If 2 disks are enough, then an Odroid HC4 should suffice. If you need 4 disks, then maybe you can grab a RockPro64 and add a SAS HBA or SATA adapter - do not buy the official Pine64 4-port SATA card, that thing does not work on the RockPro64, which is hilarious, stupid and sad.

The RockPro64 does not have an enclosure that supports 4x 3.5" drives, but its official case does have support for 2x 2.5" and 2x 3.5" drives. Still, if you can 3D-print or look for 3D printable cases for the rockpro64 with 4x 3.5" bays, go for it. Or better yet, buy an Icy Dock or a Chieftec CMR-3141SAS, which feels better quality than the Icy Dock, and just hot-glue the RockPro64 on some standoffs on top of it. Maybe add some plexiglass or something on it, for aesthetics or something.

It’s all made of metal. The backplane is SAS, although the connectors are SATA and it is using Molex connectors. But should be easy to adapt from a 12V 5A brick. Or, from a 19V 65W laptop charger to a picoPSU to 2x molex.

2 Likes

Thats a good plan… I also considered a multiple 5.25 bay external drive type device and maybe modifying it adding in a 5.25 adapter for 3.5 drives.

https://www.bhphotovideo.com/c/product/1193826-REG/istarusa_s_35ex_3_x_5_25_bay.html/?ap=y&ap=y&smp=y&smp=y&lsft=BI%3A514&gclid=Cj0KCQjw1tGUBhDXARIsAIJx01k4yza4n37XHl4_Z9o312RPCcCeQrg-hkE_BDU592WJvC8mgxHG3fkaAmUhEALw_wcB

1 Like

Yeah, a case like that would fit the Chieftec perfectly. Although if you are going with an ATX standard, you might as well grab an Athlon 3000G and a mini-ITX A320 board and adding a PCI-E SAS HBA. Should give you a bit more power for a RAID-Z1 with 4 drives, maybe a RAID-Z2 with 6 drives if the case has 2 more 3.5" drive slots inside. The athlon should have enough horsepower for the parity computation and to run backups on it.

1 Like

U-Boot has a crapton of build time options. Depending how it’s compiled, it will have ext4 or f2fs. In that case you can have a single partition, just with the /boot directory.

It also properly handles the BOOTP DHCP option and can download stuff via tftp.

IME this kind of problem was related to in-kernel ordering. The driver trying to load the firmware loading before the filesystem is mounted. My (admittedly hacky) solution was to change the kernel config so that fs drivers are built in and drivers using firmware are modules.

I’m not familiar with petitboot, but U-Boot absolutely can.

Also, check if your U-Boot has a working saveenv command. Scripting U-Boot is a bit of a pain, but once you do it, saveenv, and voila.

2 Likes

Bilky has been hella busy on this. If you are looking to get Alpine working on the Odroid N2, then why not use the HomeAssitant OS Build like I suggested as your starting point? The N2 is their SBC of choice and they make builds of this in official support with Alpine. Get a booting root FS and then rip out all of their docker stuff or just lay your own root FS on top of it after the initial power on, maintaining the boot partitions and SPI boot loader.

2 Likes

I probably should do this. I think I looked over that and I only found a Debian based version? I don’t remember why I chose not to go with the HoAss build.

I’m not exactly sure, but the Odroid HC4 cannot reboot when using U-Boot. I’m not sure why. I just type reboot in whatever OS I’m using, Debian, Void, Manjaro, they all fail to reboot. Given, I haven’t looked at a display when I typed reboot to see what happens.

I wanted to flash Petitboot back and get Alpine to boot via Petitboot, which it may be a bit of a pain, but at least I know that with petitboot, the official HC4 Ubuntu built was able to reboot. So I’ll try that and come back to this.


The reason why I haven’t been active in this endeavor was because it is an absolute royal PITA to have to reboot my Pi 4 main desktop when I switch the display to another SBC and the Pi is not able to detect an output anymore. It drives me nuts. But worry not! I will be building the TR 1950x system pretty soon, just need to go to Micro Center and tell them Wendell sent me there and do my tech shopping.

I’ll be buying a display and a monitor arm, so I can finally test stuff without having to unplug the finicky Pi 4.

I haven’t bought a Khadas VIM4 yet, because ameridroid didn’t have it on their website and I refuse to use PayPal, so buying it from the official store is a no go for me. That would have changed my pains that I’m experiencing with daily driving the Pi 4 and switching the display. Heck, the Pi 4 even fails to detect a display if it stays plugged and the dpms gets set to off, so I have to keep my screen on at all times, just using a black lockscreen wallpaper so it doesn’t keep me awake at night.

1 Like

I’ve had similar issues before, on a vastly different SoC, turned out it was an unitialized watchdog. Best I can tell, the system just stops poking the watchdog and that reboots the system. It looked as if the system shut down instead of rebooting. Then I’d have to power cycle.

Out of curiosity - are you yanking the cable, or does your monitor have two HDMI inputs?


In other stuff - a serial console is very, very useful. It’s probably the most reliable thing around. And you get all boot stages.

2 Likes

Yeah, that’s what I’m doing.

Yes, unplugging it and plugging into other SBCs. But again, the Pi 4 fails to dpms on even when I don’t touch the monitor and leave it plugged, because after a dpms off, it cannot detect the display. SSH’ed into it and checked, to output was being detected. Unplugged and replugged, it did not get detected. But after a failed detection, without me even touching the monitor, just rebooting the Pi 4 via SSH, it detects the screen just fine.

Just Pi 4 bugs…


I don’t have a uart connector, I should definitely get one, I did intend to buy one, but forgot to add it on my list. Noted.

1 Like

Just don’t cheap out, it’s not worth here.

Also, I’m not sure that’s the case still, but there used to be a large amount of counterfeit Cypress converters around which didn’t work under Windows (but did under Linux).

Edit: Cypress as in using fake Cypress ICs.

2 Likes

I’m only using Linux, so would be ok here, but still, I’d rather get something that will last me a while.

1 Like

Those are cheap devices still. Before the shortages hit I’d expect a quality one to be in the 5-10$ range.

Check out Adafruit - they should have something sane, although their markup is usually high

2 Likes

Damn it, I’ve been chasing ghosts! There is no HoAss for the HC4! On the N2+ I’ll just boot whatever, probably Void, because it will be netbooted anyway. But I need to get the HC4 going. Moving on…

Now I need to reflash Petitboot on it and I’m failing miserably. I do have a backup of it somewhere, but I can’t find it. Will need to write to /dev/mtd0, but the default Ubuntu image does not allow that (doesn’t even see it). So I need to run probably Debian or Manjaro, I forgot what I had on it when I backed up the SPI.

1 Like

It’s times like this I’d love to have a separate monitor for my testing. I can’t constantly unplug and replug the HDMI on this poor thing. And using my phone to look for stuff online is horrendous, I hate it.

1 Like

The good news: my hc4 isn’t bricked yet.
The bad news: I made a new armbian sd card, booted, managed to dd the original spi to /dev/mtd, even though that device is invisible
The ?!? news: petitboot doesn’t seem to be working

Bonus: I did a reboot when I still had the display on the HC4, because I knew it would turn off and not reboot. Debian hits “target reboot” and tries to reboot, but the SBC just powers off, the red LED power indicator turns off, as does the SBC. This is not acceptable. I need to fix this, because if I even need to reboot on-the-go in a pinch, it won’t work. I have to unplug and replug the power. I’m hoping reinstalling petitboot will solve this.

I don’t think it’s an OS bug, because both Void and Debian are acting in the same way. I haven’t tested the official Ubuntu one. That one is still booting even without petitboot, which is weird, but I haven’t tested to see if it reboots properly. I probably should before I flash petitboot, but pb seems more attractive than u-boot for some reason, probably because of the TUI interface.

I followed the instruction here:
https://forum.odroid.com/viewtopic.php?t=40906

Downloaded spiupdate_odroidhc4_20201222.img.xz, flashed it, tried to boot the toaster, it failed. Tried the same thing with spiboot-20220317.img on the SD card, also failed. Tried following the instructions from the N2+ for flashing the SPI on the HC4 (with and without pressing the button on the toaster), guess what, also failed.

I’ll try with spiupdate_odroidhc4_20201101.img.xz and see if that works…

1 Like

Tried rebooting on the official ubuntu image. It works. Uugh. I don’t like this. I hate that those images don’t receive new kernel updates or patches.

I just did an update and it updated linux-firmware and linux-odroid-c4… and u-boot… what?.. And the kernel updated from 4.9.277-82 to… 4.9.277-83. Great…

And just for the lols, I installed zfs-dkms and zfs-zed. But it chose to install linux-5.4 headers. And obviously it skipped making a module for 4.9, because it didn’t have the headers installed. And obviously the CPU had to be tanked when that happened, lol. Well, 4.84 average load (out of 4) is not too bad.

I’m not going to make it boot a generic 5.4. I don’t want to run Ubuntu, no way sir…

And I just did the unimaginable. I flashed the spiupdate into another SD card, a samsung 64gb one, because someone was saying some sd cards are incompatible with some odroids. I call bs, I booted from that SD card just fine on the other boards.

And of course, replugging the HDMI into my pi after so many attempts resulted in the pi not detecting the display anymore. Forced reboot. Great… And I did another unimaginable thing. I downloaded the spiupdate on my windows tablet and used balena etcher, because that’s what the guys on the odroid forum recommended. And to give them credit, I had issues with some linux distros written with dd that did not boot at all in the past, but I highly doubt this is the issue here. And I always checked the checksum, it always matched.

And of course, this stupid s*** balena etcher opens up to a white screen and does nothing. GG. Just how much torture must I go through to get my homelab working? I really think my TR build next week will ease some of my homelab curiosities.

Back to etcher, rebooted my windows tablet, because, hey, it’s windows, so it usually needs reboots when you install new software. And windows updates… Can this night get worse than this?

Apparently the white screen etcher was a bug when the sd card was still inserted. Ok, unplugged it, started it. Nothing. Rebooted the tablet, started etcher with admin. Failed again. Started without admin. Failed. FUUUUUUUUU-

Disabled windows defender, still nothing. This is bs. That’s why I hate Windows. Uninstalled etcher, tried the portable executable as admin. Still a piece of s***. Tried rufus portable, wrote it. And, to nobody’s surprise if you had to write isos and img files to USB files using dd, rufus worked. Not hard to believe, but still annoying. So I was wrong above, it was the fact that dd doesn’t write it perfectly or something.

So, I got petitboot going. Now I want to update it to the latest release and then start messing with Alpine on the HC4. I wonder if I can hack the home assistant for the n2+ and make it boot on the HC4. It shouldn’t be too hard, but HoAss uses u-boot most likely. So I should probably give Alpine a try the classic way, a chroot install.

1 Like

I find it cringe that the 100 day home lab challenge motivated me to do stuff in my home lab, despite my issues with the pi failing to display when plugging the display, which surprisingly only happened once.

But because I don’t know when to give up, I spent about 2.5 - 3 h instead of 1 hour. Well, in all honesty, I’m not planning the 1h per day. And definitely not posting a cringe pound sign moto (""“hashtag”"").

1 Like

Ok, I just had to do this. Closing in to 4 hours now.

I downloaded the latest alpine-uboot image, which came with grub and efi, but I don’t know how to make it work in petitboot. Apparently petitboot is reading the grub config, but it doesn’t seem to be doing anything with it.

So, I created a new boot option, gave the vmlinuz and the initramfs path on the sd card, but after it tries to kexec into it, the board reboots into nothingness. I need to first update the petitboot bootloader to the latest version, I’m running an old one, then I should see if I can make it boot from the efi file. But enough for today, my Pi 4 failed to detect the screen a second time, I hate force rebooting the poor thing and I’m too rushed to ssh into it, kill firefox and whatever else I have opened and then reboot it cleanly.

1 Like

If it works anything like what I worked with, I’m betting on this being device tree or bootloader bug. Maybe a kernel one but this I doubt.

The boards I worked on, the boot process is basically:

  1. Shut down as normally until all processes stopped it’s just the kernel
  2. Stop feeding the watchdog
  3. Wait for the watchdog to reboot the SoC

Edit to add:

So, with the HC4, apparently there are two ways to use the bootloader on the SD card, instead of the one in SPI flash:

  1. Wipe the SPI flash
  2. OR Hold down the boot switch button.
3 Likes