Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

 

 

Hello everyone,

In this guide, I will share some practical tips for optimizing your FreeBSD setup, focusing on achieving faster boot times and improving the overall system experience through handy shortcuts.

1. Accelerated Boot Process:

To enhance your boot speed, first consider adjusting your boot time. By default, you typically wait for 10 seconds upon starting up. Here's how to modify that:

  1. Edit Boot Configuration:
    Open /boot/loader.conf and add the following lines:

     
  • This is the hidden content, please

     

  • Optimize Startup Scripts:
    You can update a few startup scripts to suppress unnecessary output during the boot sequence. Specifically, modify the following:

    • /etc/rc.d/ldconfig:
      Lines 40 and 60 can be changed to:
     
This is the hidden content, please
  • /etc/rc.d/netif:
    Modify line 260:
 
This is the hidden content, please
  • /etc/rc.d/routing:
    Update lines to:
 
  • This is the hidden content, please

     

  • Optimize Randomness Checking:
    In /etc/rc.d/random, locate the random_start() function and comment out the following lines:

     
  • This is the hidden content, please

     

  • Modify rc.conf:
    At the end of /etc/rc.conf, add the following lines:

     
  • This is the hidden content, please

     

  • Clear Console on Login/Logout:
    Open both /etc/csh.login and /etc/csh.logout, and append the following line:

     
  • This is the hidden content, please

     

  • Configure Getty Settings:
    In /etc/gettytab, locate the section starting with P|Pc|Pc console:\ and modify it as follows to clear the console after boot:

     
  1. This is the hidden content, please

     

2. Creating Shortcut Aliases for Commands:

Aliases simplify command execution by creating shortcuts. This allows you to enter shorter, more memorable commands instead of the full paths or executions. The syntax is as follows:

 
This is the hidden content, please

For instance:

 
This is the hidden content, please

Functionality:

(Note: The -j5 option utilizes 4 CPU cores during compilation. Adjust this value based on your virtual machine's core count by adding 1. For example, if you have 8 cores, use -j9.)

While aliases remain in memory, they are lost upon reboot. To make them permanent, follow these steps:

  1. This is the hidden content, please

3. Disabling the Sendmail Service:

Thanks to @martysama0134 for this tip: Preventing the Sendmail service from starting at boot can shave off another 10 seconds from your boot time.

  1. Open /etc/rc.conf and either edit or add:

     
  • This is the hidden content, please

    (Note: In older FreeBSD versions, use "NONE" instead of "NO" for sendmail_enable.)

  • Stop the Sendmail service immediately:

     
  1. This is the hidden content, please

     

That’s it! You’re now ready to reboot and see the improvements.

I hope you find these optimizations useful; they have certainly made a difference for me. Enjoy your day!

 

Author

Shahin

 

Link to comment
Share on other sites


  • 100% changed the title to Fix FreeBSD: Swift Boot Times & Streamlined Efficiency

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...