Shahin 222 Posted October 7, 2021 Share Posted October 7, 2021 1. Faster and cleaner boot: Spoiler 1. Reduce boot time. Standard you have 10 seconds to wait. Enter /boot/loader.conf and type: This is the hidden content, please Sign In or Sign Up 2. We will modify the following startup scripts /etc/rc.d/ldconfig /etc/rc.d/netif /etc/rc.d/nfsclient /etc/rc.d/random /etc/rc.d/routing Here is the summary of the changes. In most cases its just adding 1> /dev/null OR 1> /dev/null 2> /dev/null to not display unneeded information at boot process. This is the hidden content, please Sign In or Sign Up 3. Next up is /etc/rc.d/random , search random_start() and comment the 5 lines shown below: 45:random_start() 46-{ 47- 48- # if [ ${harvest_mask} -gt 0 ]; then 49- # echo -n 'Setting up harvesting: ' 50- # ${SYSCTL} kern.random.harvest.mask=${harvest_mask} > /dev/null 51- # ${SYSCTL_N} kern.random.harvest.mask_symbolic 52- # fi 53- 4. Open /etc/rc.conf and at the end add: rc_startmsgs=NO defaultroute_delay="0" 5. In /etc open csh.login and csh.logout and at the end add: (this clears the console after login and logout) clear 6. Open /etc/gettytab and search: P|Pc|Pc console:\ and modify like down below: (this clears the console after booting) P|Pc|Pc console:\ :ht:np:sp#9600:\ #the number is different for each machine. don't change this row! :cl=\E[H\E[2J: #add just this line 2. Alias for shortcuts such as paths and executions. Spoiler Aliases are used like this: alias mycommand path or alias mycommand "path && execution" The idea is to build shortcuts that will help us compile or open / close the server without typing addresses and file executions, giving them only a name. They can be used ANYWHERE in the system. Personal example: alias server "cd /usr/home/game/main && sh admin_panel.sh" alias compileall "cd /usr/src/Server/ && gmake all -j5" alias compiledb "cd /usr/src/Server/ && gmake db -j5" alias compilegame "cd /usr/src/Server/ && gmake game -j5" these settings for me do the following: server #opens my admin panel for server start/stop/clear_logs/etc.. compileall #compiles game&db compiledb #compiles db only compilegame #compiles game only ( That -j5 at the end is the use of 4 CPU cores at compilation execution. In your case it will be the number of cores used by your virtual machine and add +1 . Example: 8 cores? You will use -j9 ) Aliases are retained in memory, but after reboot they are deleted, so we have to set them permanently: 1. We enter in the base folder of our machine user. For example, user root has /root folder. in there you will find .cshrc or .shrc file (depends on FreeBSD version) and search for: alias ll Under it add the alias you need, as shown above in the examples UPDATED! 12.10.2021 3. Disable Send Mail - Credits to: @ martysama0134 (Not waiting after Send Mail Service on boot, it will reduce your boot time with 10 more seconds) Spoiler Open /etc/rc.conf and Edit/Add these options: # NO SENDMAIL sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" Note: on old fbsd versions, it was used "NONE" instead of "NO" for sendmail_enable Now, lets stop the sendmail service: service sendmail stop That's it! You can reboot and test it! Hope it's usefull. It was for me Hope you have a great day! Shahin 83 4 1 2 25 6 39 Link to comment Share on other sites More sharing options...
Etzhel 115 Posted October 10, 2021 Share Posted October 10, 2021 perfect! Link to comment Share on other sites More sharing options...
Shahin 222 Posted October 11, 2021 Author Share Posted October 11, 2021 Updated the original post with the 3rd step! Check it out Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted October 11, 2021 Share Posted October 11, 2021 wtf is this, how many times do you have to reboot freebsd? I just turn off sendmail, that's more than enough.. 1 Link to comment Share on other sites More sharing options...
FBI 44 Posted October 12, 2021 Share Posted October 12, 2021 6 hours ago, Denizeri24 said: wtf is this, how many times do you have to reboot freebsd? I just turn off sendmail, that's more than enough.. If you don't like it, just ignore it. It's pretty good tutorial and this can save you some time. Yes, you need to reboot freebsd when you work, but you will experience this once you will be more advanced. 4 1 PeriodWars Link to comment Share on other sites More sharing options...
cncn 301 Posted April 23, 2022 Share Posted April 23, 2022 You can disable sendmail during installation. https://docs.freebsd.org/en/books/handbook/bsdinstall/#bsdinstall-post Link to comment Share on other sites More sharing options...
Premium Ulthar 3074 Posted January 19 Premium Share Posted January 19 Thanks, working. Boot time is around 23 sec. Ulthar Link to comment Share on other sites More sharing options...
Recommended Posts