Reduce GRUB timeout in SCALE

I’d like my NAS to be able to reboot faster. If there’s any way to reduce the GRUB timeout, that’d be great. I can’t find any persistent way to do it that would survive updates.

Why are you rebooting often enough for this to be an issue?

I checked my TrueNAS SCALE, and it uses 10 seconds for the Grub timeout.

Why is 10 seconds not suitable?

One of the key features of TrueNAS, SCALE or Core, is the ability to boot an older version of the software. (This is sometimes also known as alternate boot environment.) If you change the timeout so that selecting an alternate boot environment at the Grub menu is not possible, then one of the recovery methods is now gone.

Last, if you are booting your TrueNAS SCALE often enough that you need a persistent way to reduce the boot time, perhaps TrueNAS SCALE is not the right software for you. It generally takes SCALE far longer in the other parts of the boot up, than the trivial 10 seconds delay at Grub.


On the useful side, you could install an “Init/Shutdown Scripts” entry that changes the timeout in the Grub configuration at every boot. While it won’t help the first time you upgrade SCALE, every boot after that should then use the newly modified timeout.

As for how to do it, perhaps something like;
sed -i "s/timeout=10/timeout=5/" /boot/grub/grub.cfg
I won’t guarantee that will work. Nor do I know if that is the best method to accomplish your goal.

1 Like

Hey Arwen, your approach works very fine and for instance, to me I just put it down to 1 second in order to speed up boot speed because I dont let my NAS 24x7 online.

I wanted to make the change without the init/shutdown script and the lack of an editor of GRUB options by TrueNas is what makes this all difficult, maybe someday they will add it into the GUI.

I did in a different and crazy approach:

  1. Remount USR as RW
    sudo mount -o remount,rw,nodev,noatime,xattr,noacl,casesensitive boot-pool/ROOT/24.10.2/usr /usr

  2. Change the python script that makes the truenas.cfg /grub.cfg file:
    pico /usr/local/bin/truenas-grub.py

  3. In this file you can see the timeout command line and set it to what is needed

  4. After reboot it two times (to allow the script to execute somewhere) then we are done.

  5. It might resist to product updates if the updates does not change the phyton script

Take care all who is reading it!

Glad you are happy with your change.

If I understand TrueNAS SCALE deployment, it is full OS installation, so your change almost certainly will not survive an update. Just letting you know that you should document your change carefully so you can re-do after any update.

Again, changing it to a very low value is not a good idea. Unless you can select some other entry in that 1 second, you may end up with problems if you want to roll back to an earlier release of TrueNAS at boot.