[FreeBSD] How to set and unset loader variables in boot loader prompt

[FreeBSD] How to set and unset loader variables in boot loader prompt

Important question is why you need to set and unset variables at boot time???
The answer is when something is stopping you from booting your system then this may help you make your day easier.
There are so many variables set by default in the system by various kernel subsystems or driver modules.
you can find the default variables in /boot/defaults/loader.conf and user set variables in /boot/loader.conf file.
You can see all the variables set at the loader prompt by typing the command “show” (without the quotes).

So lets get started to know how you can manipulate loader variables.
Remember that all the commands named below are valid for boot loader prompt in FreeBSD only and these commands will not work on a command shell.
Press ESCape when you are at FreeBSD boot prompt to enter into the loader prompt.

The loader prompt will look like this:

OK _

To see all the variables loaded you can type the following:

OK show

To set a varibale enter the following:

OK set <varibale_name>=<value>

For example OK set abc=”1″ or abc=1 (both will work), where abc is the variable name and 1 is the value set to the variable.

To unset a variable enter the following:

OK unset <varibale_name>

For example OK unset abc
Remember that to unset a variable only the variable_name is needed and the value is not at all needed.

If you need to know more of such commands on FreeBSD check the below link:
All FreeBSD stuffs

Previous HTC One M8 Lollipop 5.1 Resurrection Remix ROM
Next Nexus 5 Lollipop 5.1 CyanogenMod 12.1 ROM

About author

siba 698 posts

A B.Tech degree holder with more than 5 years of experience on Embedded Systems design domain. He has worked on Aerospace domain, NAND storage, Server storage and Wireless networking.

View all posts by this author →

You might also like

FreeBSD Guides 0 Comments

How to fix E575: viminfo: Illegal starting char in line

This post guides you on How to fix E575: viminfo: Illegal starting char in line on VIM text editor. Once I was working with the VIM editor and everything was

FreeBSD Guides 0 Comments

[FreeBSD] How to install VIM editor in FreeBSD

By default FreeBSD comes in a command line user interface. As an Administrator or a Device Drive developer or as a FreeBSD user, you must be having a good text

FreeBSD Guides 0 Comments

[How to solve] Could not load host key: /etc/ssh/ssh_host_rsa_key issue in FreeBSD or Linux

Sometimes while starting the sshd service you may face some issues like the following: Could not load host key: /etc/ssh/ssh_host_key Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host

0 Comments

No Comments Yet!

You can be first to comment this post!