RockyOS / RockyOS like Yocto project

Hello,

I have an application running on a RockyOS system right now, but I need to use Mender in order to support OTA updates. Obviously, building the full system from scratch would take a few weeks, but I was thinking, doesn’t anyone have a layer that would get me closer to my goal? I’d love to get a RockyOS-like system using Yocto.
P.S. the app is integrated with a ton of systems from Rocky (/etc/sysconfig/network-scripts editing for network configuration and others) and that’s why I’m trying to “recreate” Rocky via Yocto.

Thanks in advance!

Hi @silviub,

Unfortunately I’m not aware of a metalayer that would do such, and usually approaches that tried to “make Yocto behave like X” were ill-fated. So if you have a good reason to go for Yocto in the long run, then a proper re-architecting is due.

An alternative to get your application OTA-enabled is to just integrate Mender into it. It should be perfectly fine to build and run the client for RockyOS, and if you can modify partition layout plus bootloader then you can also get the A/B functionality if desired. The client installation documentation should get you started.

If you’d like to talk about your specific use case in more detail, feel free to reach out!

Greetz,
Josef

Hello @TheYoctoJester and thank you for the response! I appreciate it.

I do need the A/B deployment, that’s why I wanted to go with Mender.

You said that if I am able to modify the partition layout plus the bootloaded, I can get A/B deployments running. Can I get more info about that? I was able to get Mender running on Rocky but I was unable to get A/B. I also tried using the mender-converter to no avail :frowning: .

What I had/have so far:
1 x /boot partition that’s 512M large
2 x rootfs partitions, each 8GB large
1 x data partition.
GRUB with BIOS boot (if this is a problem, I can get the image converted to use UEFI instead).

The issue is that I have no idea what I should do with the bootloader to get Mender to recognize it properly for A/B deploy. Any clues / info will be greatly appreciated.

Thank you!

Hi @silviub,

Yes, the bootloader needs to be Mender-aware, plus you need to have A and B partitions. As I have never used RockyOS, I cannot comment on how to accomplish things there. Maybe looking at the generic x86 configuration for mender-convert will help you get started there, but having a rather exotic base and no information about the actual hardware and all makes it extremely hard to give good advice.

Greetz,
Josef

Hello,

I do have
1 x /boot partition that’s 512M large
2 x rootfs partitions, each 8GB large
1 x data partition
GRUB with BIOS boot (if this is a problem, I can get the image converted to use UEFI instead).

The hardware is a generic x86-64 board, testing in a VM at the moment, as not much progress have been done.

I already tried to “reverse engineer” the mender-converter to get it working for my setup, but I have got nowhere, as I have no idea what the /boot should hold to enable mender to boot from one rootfs or the other.

Thank you!

If you are using mender-convert, I would recommend doing so, it will most likely make things easier.

The MENDER_GRUB_D_INTEGRATION option also plays a significant role. If it’s on, it attempts to use the grub.d and grub-mkconfig framework together with the system-installed GRUB. If not, it relies on a custom built one which is downloaded from here. If you choose the latter option you will probably have to build it yourself and direct the download to that source instead. The former option is more robust though, so I would try that first.

Hello @kacf,

Unfortunately, I have tried mender-convert to no avail. For whatever reason, converting a GRUB+BIOS image using this tool makes it “unbootable”, it just sits there after “Booting from hard drive” (with either BIOS or UEFI - I read that the converter would convert the image to UEFI, so I tried running the new image with both BIOS and UEFI). Converting a GRUB+UEFI image yields the exact same result. I have no idea why…?

Any help would be greatly appreciated!

Hmm, then I’m not sure. In UEFI mode, you could try to experiment with replacing the bootloader (grubx64.efi) which mender-convert puts on the boot partition, with the boot loader from RockOS. But this will be debugging and probably tedious work to figure out. Sorry I can’t give a better answer.

@kacf at least I got a starting point, so thank you!