Installing openBalena on Linux Mint 21 failed bad

Getting to know openBalena, but I did not get very before catastrophic failure.
I have a Linux Mint 21 laptop that I decided to use as server. I reckon its powers are adequate for one BalenaOS device in the same LAN.

Once in my life I decided to follow instruction by the letter, and did as it says:

Install openBalena on the server

  1. First Change cgroup version to v1 for compatibility with systemd in containers on modern Linux distributions, where cgroups v2 are enabled by default:

    source /etc/default/grub
    sudo sed -i '/GRUB_CMDLINE_LINUX/d' /etc/default/grub
    echo GRUB_CMDLINE_LINUX=$(printf '\"%s systemd.unified_cgroup_hierarchy=0\"\n' "${GRUB_CMDLINE_LINUX}") \
      | sudo tee -a /etc/default/grub
    sudo update-grub
    sudo reboot
    

After reboot I had a laptop with the following display content:

grub>

… and nothing more.

It took me hours to fix the laptop, as I am no expert with grub. In addition, this is a first time when I need to mess with grub when installing software in a server computer.

The filesystem is zfs.

Here, for reference is what the situation looked on the console before the reboot.

root@koodauskone:/home/jsavola/balena-steps# source /etc/default/grub
root@koodauskone:/home/jsavola/balena-steps# sudo sed -i ‘/GRUB_CMDLINE_LINUX/d’ /etc/default/grub
root@koodauskone:/home/jsavola/balena-steps# echo GRUB_CMDLINE_LINUX=$(printf ‘\ “%s systemd.unified_cgroup_hierarchy=0”\n’ “${GRUB_CMDLINE_LINUX}”)
| sudo tee -a /etc/default/grub
GRUB_CMDLINE_LINUX=" systemd.unified_cgroup_hierarchy=0"
root@koodauskone:/home/jsavola/balena-steps# sudo update-grub
Sourcing file /etc/default/grub' Sourcing file /etc/default/grub.d/50_linuxmint.cfg’
Sourcing file `/etc/default/grub.d/init-select.cfg’
Generating grub configuration file …
Found linux image: vmlinuz-5.15.0-151-generic in rpool/ROOT/ubuntu_fa5ugm
Found initrd image: initrd.img-5.15.0-151-generic in rpool/ROOT/ubuntu_fa5ugm
Found linux image: vmlinuz-5.15.0-140-generic in rpool/ROOT/ubuntu_fa5ugm
Found initrd image: initrd.img-5.15.0-140-generic in rpool/ROOT/ubuntu_fa5ugm
Found linux image: vmlinuz-5.15.0-41-generic in rpool/ROOT/ubuntu_fa5ugm
Found initrd image: initrd.img-5.15.0-41-generic in rpool/ROOT/ubuntu_fa5ugm
/etc/grub.d/10_linux_zfs: 934: GRUB_CMDLINE_LINUX_DEFAULT: parameter not set
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
done
root@koodauskone:/home/jsavola/balena-steps# sudo reboot

I could not guess that the comment about GRUB_CMDLINE_LINUX_DEFAULT being something or another would break up my system.

This is what ChatGPT had to say about the matter:

sudo sed -i ‘/GRUB_CMDLINE_LINUX/d’ /etc/default/grub

That command deleted every line containing GRUB_CMDLINE_LINUX — including both:

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
GRUB_CMDLINE_LINUX=“…”

So yes — it wiped out your GRUB_CMDLINE_LINUX_DEFAULT line entirely.

Hey @jussi.savola , sorry to hear you had a bad experience. We have updated the instructions and removed those steps entirely as they are no longer required any more with the current services versions.

I’m glad you were able to recover your grub at the end of the day, what a stressful few hours that must have been!

1 Like

Indeed. The only positive thing was that I was doing the repairs on my company time, meaning that someone paid for the deed.
I was getting to know Balena (OpenBalena) for a real purpose, as we have a fleet of … let’s say thousands of linux boxes in the wild and we are planning on doings thing better than they are now.
A/B boot is one of the main concerns and it seems to me that with OpenBalena there is no “by the book” solution and commercial Balena is not suitable for us due to the size of our fleet.
Next I’ll be studying swupdate and her kind.
Anyway, I’m glad that my reporting of the problem helped someone else along the way. I’ve been working as IT quality consultant for a decade and know from experience that things won’t get fixed if nobody tells there is a problem …

1 Like