Need help with bootup/GRUB settings

Status
Not open for further replies.

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
Hi there,

I seem to have a problem with my freenas config so I tried selecting an older snapshot from the GRUB menu when booting and that seems to work.

What I would like to do is set a particular older snapshot in GRUb as the new default, how would I do that?

The reason for this is that in the location where I have access to a monitor to start and manually select this boot point I have no access to the network and at the location where there is network it would run headless without me having a chance to change the GRUB boot point.

So I need to be able to select what GRUB uses to boot from as default.
 
Joined
Jan 9, 2015
Messages
430
I didn't know that Dru. I would have just deleted the new boot environments so that the one I wanted was the newest. Thanks for that.
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
Thanks. I had hoped for a cli solution as I said I don't have access to network at the location where I have access to a screen but I can connect my MACBook with a network cable and select that particular BE.

THX!
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
A quick feedback:

- freenas wouldn't bot with the latest BE
- moved to screen, booted, connected network cable from MacBook, could not reach GUI
- rebooted while network cable connected, could connect to GUI from MB.
- set the second to last BE as active, rebooted, freenas came up just fine
- moved the freenas to its intended location, connected network cable to router, booted and can't access the GUI or ping its IP. I'm blind here. As soo nas I move it to where I have screen access it boots fine.

Will open a new thread and describe all details then post the link here too.

At least this thread is now solved, I have learned how to set another BE as active.
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
I'm not sure I completely understand, maybe someone could shed a little more light on the issue:

- When I boot I can select from within GRUB between what I assume are BEs called FreeNAS (FreeNas version date) - date and below that it says Boot Environment Menu. IF I selected the BE Menu I have a similarly looking list showing: TrueOS (FreeNAS version - date)

Where would I be able to use the BE API commands from? I connected via SSH and gave me
Code:
freenas# GET /api/v1.0/system/bootenv/ HTTP/1.1
zsh: command not found: GET

so that's obviously not where one does that ;-)

NEXT TRY:
- When I boot I can select from within GRUB between what I assume are BEs called FreeNAS (FreeNas version date) - date
I selected the second from last what I think are BEs and booted, via GUI I then went to System => Boot and activated the one I want to be default it also says: On Reboot, Now but when I reboot still this setting gets ignored and the last one gets selected.

I then deleted the last faulty one and rebooted. Now I see that the entry I deleted is gone from the BE Menu but not from GRUB.
So I'm sure this is a misunderstanding on my side :-( so my question still stands:
What I would like to do is set a particular older snapshot in GRUb as the new default, how would I do that?
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
Next try after googling was:
Code:
beadm create sef-test
this seems to have "reset" GRUB to use what I wanted. I can now move the NAS to where it has network connectivity and access it remotely and start figuring out what went wrong in the first place :smile:
 
D

dlavigne

Guest
Regarding the API, its commands are meant to be used in scripts. See http://doc.freenas.org/9.3/freenas_api.html for some examples. Note that the GET command just returns the list, you would need to do a POST to create or edit an entry.

When you activate a BE, it does not delete anything from the boot menu, it just changes the default entry that will be booted. If that did not happen, that is a bug though you should make sure you are updated to the latest SU and verify that hasn't been fixed before reporting a bug. Ditto if it is not deleting entries from the GRUB menu.

The manual beadm command created a new BE, added it to GRUB, and set it as active which did achieve what you wanted. This should also have worked from the GUI if you add or clone a new entry.
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
I really don't understand what is wrong here, seems even the "beadm create sef-test " command didn't stick, after a few reboots, my old unwanted BE and GRUB option is back. Luckily there's a freenas update so I hope that updating will fix this by creating a newer BE and GRUB option... YES, it did.
 
Status
Not open for further replies.
Top