RackNerd, Rocky 8 VPS, slow boot

I have been testing a VPS from RackNerd.com lately, and I have to say that their support has been very good.  As I was testing a Rock 8 VPS, and I ran into long boot times with the VPS and decided to dig a little deeper. 

Luckily RackNerd provides VNC so you can see the boot console, and I saw this:

A start job is running for dev-disk and “1min 30s” is the key. We can see that there is a start job delaying reboots by 90 seconds. Looking into the journalctl data, I found these details:

[root@rn1 ~]# journalctl | grep 355fe974f1.device | grep timed

Mar 25 07:49:38 rockylinux8-minimal systemd[1]: dev-disk-by\x2duuid-2052dea6\x2d1b40\x2d4c49\x2d81e1\x2d4b355fe974f1.device: Job dev-disk-by\x2duuid-2052dea6\x2d1b40\x2d4c49\x2d81e1\x2d4b355fe974f1.device/start timed out.

Most of the articles I came across had to do with a bad or missing partition and using fstab to fix it, or changing DefaultTimeoutStartSec in the system.conf file. But these didn’t fit my issue exactly, and I wanted to know why this particular device (…355fe974f1.device) was the issue, when I had no device with this UID.

I took a look at the grub file:

[root@rn1 ~]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto resume=UUID=2052dea6-1b40-4c49-81e1-4b355fe974f1 net.ifnames=0 biosdevname=0 rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

The resume option was where the bad device ID was comming from. The resume option has to do with hiberntation mode, and since this was a server there should be no hibernation mode. So, I removed the ‘resume’ section from the file.

I then went to run grub-update, but it wasn’t found. Luckily, this is a simple shell script, so I recreated it:

vi /usr/sbin/grub-update

Add to this file:

#!/bin/sh
set -e
exec grub2-mkconfig -o /boot/grub2/grub.cfg "$@"

Then add executable permission to it:

chmod +x /usr/sbin/grub-update

And finally, run the new script, and reboot:

[root@rn1 ~]# /usr/sbin/grub-update
[root@rn1 ~]# reboot

The reboot now takes about 10 to 15 seconds, instead of a minute and a half.