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.