SOLVED Help FreeNAS won't boot... Just says GRUB

NASbox

Guru
Joined
May 8, 2012
Messages
650
I am running FreeNAS 11.1-U7-? ... is installed on a small SSD which passed SCRUB at 3:45AM yesterday. The system has been up for about 6 month (whenever the last 11.1-U7 was pushed through the GUI. I updated through the GUI at that time and everything was fine.

I had to power the system down from the console due to power failure (The UPS did not die, and AFAIK the system powered down OK). I was handling other systems as well. When I powered the system back on I get Initializing.../ (Spinning /-\), then the Avago HBA message, and then a frozen screen with just GRUB. I can't type anything, my only possible action is CTRL-ALT-DEL. The Boot SSD is on a native stat port on the motherboard, and it shows up in the BIOS.

AFAIK the system has been booting in comparability mode, but the motherboard has a UEFI bios. I'm really not sure how things were installed it was so long ago.

I tried booting a live linux distro just to look at the boot disk to see if it was recognized by smart, and everything was fine. I did get a message about gpt being inconsistant (the distro is VERY old, and it's linux not FreeBSD, so I didn't change it). I think the most likely situation is the the boot partition is corrupted in some way. Is there a live rescue disk that I should be using.

'm a total FreeBSD NOOB... and I find grub super confusing even on linux.
How should I proceed? I'm really desperate to get my FreeNAS back!

I
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
The 1 million dollar question: Do you have a saved config? If so, I'd reinstall and restore from your config back-up.

If not, let's see what others will suggest, but your data should be safe in your pool, so worse case scenario is a fresh install and import the pool, bit all other configurations will be lost, so wait a little :)

While you are on it, plan to mirror your boot ssd.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
Thanks @melloa ... I'm pretty sure that my backup is OK, but I have some custom stuff on the boot drive I'd would rather not have to replace if I can avoid it.

Can I do a repair install without wiping the drive? I have a mount /CUSTOM that I would rather not have to recreate, so I would prefer to repair if possible.

I made a 11.1-U7 install USB and booted into the shell. and ran gpart list ada2 against the boot drive (ada2).
It shows STATE: CORRUPT, but the providers P1/P2 appear to be OK.

I also noticed that in the dmesg output I found:
Code:
GEOM: ada2: the primary GPT table is corrupt or invalid.
GEOM: ada2: using the secondary instead -- recovery strongly advised.

What is the best way to fix?

Solution:
Code:
gpart recover /dev/ada0

Fixed the GPT, but Grub error persisted. Turns out that an upgrade using exactly the same version "create a new boot environment" kept everything intact and fixed the booting issues.
 
Last edited:
Top