brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: /boot/config/go runs your own commands at every boot

Linux
~/tips/tip-unraid-boot-config-go

cp /boot/config/go /boot/config/go.bak

Explains the script on the flash drive that runs your own commands each time Unraid starts.

Unraid runs from RAM, so anything you change in the running system is gone after a reboot. The flash drive has a file for that.

The file is /boot/config/go, a bash script on the flash drive. The boot docs describe it as a place that can run user commands before or after the WebGUI starts. In forum threads people use it to copy SSH keys, run hdparm commands, or copy files from the flash into the RAM-based system at each boot.

Edit it with nano from the console, and take a copy first:

cp /boot/config/go /boot/config/go.bak
nano /boot/config/go

Two cautions. Old lines can break when Unraid changes: a forum thread about 6.9.0-beta shows mkdir -p /root/.ssh causing trouble. And to find out what a line does at boot, a forum answer suggests sh -xv /boot/config/go 2>&1 | tee /tmp/go.out. I would keep the file short. For anything that does not need to run that early, the User Scripts plugin is a gentler place.

Further reading: Unraid docs: Boot and startup failures, On this site: put your SSH public key in /boot/config/ssh/root so it survives a reboot, On this site: mirror the syslog to the boot drive, but only for a few days

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link