Problem with old boot environments

ravenblight

Dabbler
Joined
Oct 28, 2021
Messages
26
Hello,
My setup of scale is started to experience very anoying problem, every restart takes almost one hour because problem with loader of grub.
systemd-analyze
Startup finished in 18.068s (firmware) + 38min 45.360s (loader) + 15.920s (kernel) + 5min 27.689s (userspace) = 44min 47.039s
I don't have big expirience with grub and booting of linux but I've found that this depends on grub.cfg and that file is generated by grub-mkconfig, and my research leads me to finding that my grub.cfg ist very long, I've tried to rebuild grub.cfg but it takes very long time (propbably 38 min from analyze, my gues). It loops through boot environments of truenas scale, and this leads me to my question, how I can remove old bot environments, system right now stands on 22.02.4, but deleting any of other positions ends with error, just generic error
  • 22.02-RC.1-1: [EFAULT] Failed to delete boot environment:
, I don't know where to find some logs about deleting environment error, or any way of checking whats wrong.
Those are my all boot environments.

22.02-RC.2
22.02.2
22.02-RC.1-1
22.02.4 <- this is not old, it is current
22.02.RELEASE
22.02.0.1
22.02.1
Is there any way of solving this issue, how to check whats going with old boot environments?
 
Last edited:

maglin

Patron
Joined
Jun 20, 2015
Messages
299
Are you using USB? If so move your boot env to SSD/DOM ect... I believe USB is no longer supported for BOOT. W/O a log file it's hard to diagnose.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
I would:
1. Make a config backup
2. Rebuild NAS from ISO, then upload the config.

Honestly this works so quickly debugging issues like this aren't worth it.

Also post your hardware as per forum rules please

IF you are using a thumb drive, consider replacing it with a good quality one or moving to a SSD / DOM / USB to NVMe adapter / USB to SATA Adapter for safety
 

ravenblight

Dabbler
Joined
Oct 28, 2021
Messages
26
I'm not using thumb drive for boot pool its Samsung EVO 860 M.2, but using PCIE adapter, and modified bios so it can be booted using nvme disc. It used to work almost instant, but there was some update (i never found which was it because, I wasn't rebooting) and system started to boot for 40 minutes. I have system pool on boot drive so im a little scared of rebuilding NAS. Propably when i finaly switch to better hardware I'll go for complete new installation with pool import, but for logs ive tried journalctl, and manually looking to /var/logs but i cannot find anything related to problem with boot environment.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Doesn't matter where the system pool is.
Just rebuild and reload the config and all will be good.
 

ravenblight

Dabbler
Joined
Oct 28, 2021
Messages
26
@NugentS I finnally stood up to the task, and reinstalled whole setup with format boot disk, and restored from backup. For now I'm happy only thing not restored was key for ssh for user, and I was ready for that, so thank you for advice, and impulse to do it.
 
Top