FreeBSD Desktop – Part 1 – Simplified Boot

This is the first post in the FreeBSD Desktop series.

You may want to check other articles in the FreeBSD Desktop series on the FreeBSD Desktop – Global Page where you will find links to all episodes of the series along with table of contents for each episode’s contents.

The default FreeBSD boot process is quite verbose with a lot of debugging information along with kernel messages. We may divide that boot process into several β€˜screens’ or stages. First thing You see is the β€˜BIOS’ screen of the computer manufacturer. SecondΒ  thing is the FreeBSD BTX Loader. The third one is the FreeBSD Boot Menu with eventual ZFS Boot Environments if You use ZFS for root filesystem and other options to select like Single User Mode for example. The 4th one is the system boot along with kernel messages in non-native resolution. In the middle of that stage screen switches to native resolution and continues to display kernel messages and services leading to the text prompt with login: at the end. There comes optional fifth screen which may be graphically started (x11) login manager like slim or gdm.

This verbose information is usually useful for servers but not that much for laptops and/or desktop/workstation systems. The UNIX philosophy is to not β€˜say’ anything to stdout if everything is OK, so stdout/stderr should only be used when something is wrong … like on AMIGA, if anything is wrong then I want to see big red sign like [GURU MEDITAION] but if everything is ok, shut the … slience is golden πŸ™‚

guru-meditation

I really like Sun Solaris 10 approach here, that it boots with minimal information like its version and hostname into the login: prompt in less then 10 lines. The image below is from the first Sun Solaris 10 boot, so it includes additional OpenSSH server key generation information.

sun-solaris-10-boot-first

Unfortunately – despite what Oracle says – Oracle Solaris is dying, I gathered most of the information here – Oracle just killed Solaris/SPARC/ZFS teams – https://forums.freebsd.org/threads/62320/ – on FreeBSD Forums. The recent Oracle Solaris 11.4 release process along with public beta will not change that. Oracle Solaris will be kept in maintenance mode for the rest of its life, which is set by Oracle to 2034 currently. Pity because even BSD bits recently found its way into it Solaris, for example the OpenBSD PF firewall, there are some differences – Comparing PF in Oracle Solaris to IP Filter and to OpenBSD Packet Filter – https://docs.oracle.com/cd/E37838_01/html/E60993/pfovw-comparall.html – but there are differences between OpenBSD PF and FreeBSD PF too.

Back to FreeBSD – according to the project website – https://freebsd.org/ – β€œFreeBSD is an operating system used to power modern servers, desktops, and embedded platforms” so why not tune the boot process to be more appealing on laptops/desktops? Below are the stages of the default FreeBSD boot process up to the login: prompt.

stage0-BIOS.jpg

stage1-BTX-Loader.jpg

stage2-Boot-Menu.jpg

stage3-NOMOD-Non-Native-Boot.jpg

stage4a-NOMOD-Native-Boot-A.jpg.jpg

stage4b-NOMOD-Native-Boot-B.jpg

Not very lean to my standards. But with one parameter in /boot/loader.conf and 5 slightly silenced startup scripts its whole a lot better. Here are the modifications needed.

First add the boot_mute=YES option to the /boot/loader.conf file.

As we are here, You may as well add autoboot_delay=2 parameter to the /boot/loader.conf file to speed up boot process by 8 seconds. Default delay is 10 seconds.

% grep boot_mute /boot/loader.conf
boot_mute=YES
%

Next we will need to modify these 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.

% grep -n -E '(1|2)> /dev/null' /etc/rc.d/* | grep -E 'routing|netif|ldconfig'
/etc/rc.d/ldconfig:40: check_startmsgs && echo 'ELF ldconfig path:' ${_LDC} 1> /dev/null
/etc/rc.d/ldconfig:60: echo '32-bit compatibility ldconfig path:' ${_LDC} 1> /dev/null
/etc/rc.d/netif:260: /sbin/ifconfig ${ifn} 1> /dev/null 2> /dev/null
/etc/rc.d/routing:70: eval static_${_a} delete $_if 1> /dev/null 2> /dev/null
/etc/rc.d/routing:97: static_$2 add $3 1> /dev/null 2> /dev/null
/etc/rc.d/routing:104: static_$2 add $3 add $3 1> /dev/null 2> /dev/null

The only exception is the /etc/rc.d/random which requires little more love.

% grep -n -A 8 'random_start()' /etc/rc.d/random
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-

Here are diff(1) patches if that way will be easier for you.

% diff -rq ~/CLEAN-FreeBSD-11.1-RELEASE/etc/rc.d /etc/rc.d | column -t
Files  ~/CLEAN-FreeBSD-11.1-RELEASE/etc/rc.d/ldconfig   and  /etc/rc.d/ldconfig   differ
Files  ~/CLEAN-FreeBSD-11.1-RELEASE/etc/rc.d/netif      and  /etc/rc.d/netif      differ
Files  ~/CLEAN-FreeBSD-11.1-RELEASE/etc/rc.d/nfsclient  and  /etc/rc.d/nfsclient  differ
Files  ~/CLEAN-FreeBSD-11.1-RELEASE/etc/rc.d/random     and  /etc/rc.d/random     differ
Files  ~/CLEAN-FreeBSD-11.1-RELEASE/etc/rc.d/routing    and  /etc/rc.d/routing    differ
% diff -u ./rc.d/ldconfig /etc/rc.d/ldconfig
--- ./rc.d/ldconfig     2017-07-21 04:11:06.000000000 +0200
+++ /etc/rc.d/ldconfig  2017-12-18 09:12:18.190074000 +0100
@@ -37,7 +37,7 @@
                                _LDC="${_LDC} ${i}"
                        fi
                done
-               check_startmsgs && echo 'ELF ldconfig path:' ${_LDC}
+               check_startmsgs && echo 'ELF ldconfig path:' ${_LDC} 1> /dev/null
                ${ldconfig} -elf ${_ins} ${_LDC}
 
                case `sysctl -n hw.machine_arch` in
@@ -57,7 +57,7 @@
                                fi
                        done
                        check_startmsgs &&
-                           echo '32-bit compatibility ldconfig path:' ${_LDC}
+                           echo '32-bit compatibility ldconfig path:' ${_LDC} 1> /dev/null
                        ${ldconfig} -32 -m ${_ins} ${_LDC}
                        ;;
                esac

% diff -u ./rc.d/netif /etc/rc.d/netif
--- ./rc.d/netif        2017-07-21 04:11:06.000000000 +0200
+++ /etc/rc.d/netif     2017-11-30 17:32:11.394251000 +0100
@@ -257,7 +257,7 @@
                esac
                if check_startmsgs; then
                        for ifn in ${_ok}; do
-                               /sbin/ifconfig ${ifn}
+                               /sbin/ifconfig ${ifn} 1> /dev/null 2> /dev/null
                        done
                fi
        fi
% diff -u ./rc.d/nfsclient /etc/rc.d/nfsclient
--- ./rc.d/nfsclient    2017-07-21 04:11:06.000000000 +0200
+++ /etc/rc.d/nfsclient 2017-12-18 09:15:38.200376000 +0100
@@ -44,7 +44,7 @@
        # successfully notified about a previous client shutdown.
        # If there is no /var/db/mounttab, we do nothing.
        if [ -f /var/db/mounttab ]; then
-               rpc.umntall -k
+               rpc.umntall -k 2> /dev/null
        fi
 }
 load_rc_config $name
% diff -u ./rc.d/random /etc/rc.d/random
--- ./rc.d/random       2017-07-21 04:11:06.000000000 +0200
+++ /etc/rc.d/random    2018-01-09 13:32:18.439347000 +0100
@@ -45,13 +45,13 @@
 random_start()
 {
 
-       if [ ${harvest_mask} -gt 0 ]; then
-               echo -n 'Setting up harvesting: '
-               ${SYSCTL} kern.random.harvest.mask=${harvest_mask} > /dev/null
-               ${SYSCTL_N} kern.random.harvest.mask_symbolic
-       fi
+       # if [ ${harvest_mask} -gt 0 ]; then
+       #       echo -n 'Setting up harvesting: '
+       #       ${SYSCTL} kern.random.harvest.mask=${harvest_mask} > /dev/null
+       #       ${SYSCTL_N} kern.random.harvest.mask_symbolic
+       # fi
 
-       echo -n 'Feeding entropy: '
+       echo -n 'Feeding entropy:'
 
        if [ ! -w /dev/random ] ; then
                warn "/dev/random is not writeable"

% diff -u ./rc.d/routing /etc/rc.d/routing
--- ./rc.d/routing      2017-07-21 04:11:06.000000000 +0200
+++ /etc/rc.d/routing   2017-12-18 09:22:16.604428000 +0100
@@ -67,7 +67,7 @@
        ""|[Aa][Ll][Ll]|[Aa][Nn][Yy])
                for _a in inet inet6 atm; do
                        afexists $_a || continue
-                       eval static_${_a} delete $_if
+                       eval static_${_a} delete $_if 1> /dev/null 2> /dev/null
                        # When $_if is specified, do not flush routes.
                        if ! [ -n "$_if" ]; then
                                eval routing_stop_${_a}
@@ -94,14 +94,14 @@
        _ret=0
        case $1 in
        static)
-               static_$2 add $3
+               static_$2 add $3 1> /dev/null 2> /dev/null
                _ret=$?
                ;;
        options)
                options_$2
                ;;
        doall)
-               static_$2 add $3
+               static_$2 add $3 add $3 1> /dev/null 2> /dev/null
                _ret=$?
                options_$2
                ;;

Now lets see how FreeBSD boots now after the modifications.

stage0-BIOS.jpg

stage1-BTX-Loader.jpg

stage2-Boot-Menu.jpg

stage3-MOD-Non-Native-Boot.jpg.jpg

stage4a-MOD-Native-Boot-A.jpg.jpg

stage4b-MOD-Native-Boot-B.jpg

Its definitely not perfect, but a lot better in my taste.

Now lets login to desktop πŸ™‚

I prefer not to use a login manager so I have an alias named x to xinit command. This way after I login I type x press [ENTER] and x11 desktop is started.

% which x
x: aliased to xinit ~/.xinitrc -- -dpi 75 -nolisten tcp 1> /dev/null 2> /dev/null

stage4c-MOD-Native-Boot-C.jpg

stage5-X11.jpg

UPDATE 1 – FreeBSD 12.x

I recently tried FreeBSD 12.0-RC* versions and there is one ‘talkative’ script that also could be ‘silenced’ a little.

Its the /etc/rc.d/devmatch scrtipt.

Here is the needed patch to make it great again nice and clean again.

% diff -u /home/vermaden/rc-devmatch devmatch 
--- /home/vermaden/rc-devmatch        2018-11-27 17:49:53.573514000 +0100
+++ devmatch    2018-11-27 17:50:11.955342000 +0100
@@ -65,7 +65,7 @@
                case "#${x}#" in
                *"#${m}#"*) continue ;;
                esac
-               echo "Autoloading module: ${m}"
+               # echo "Autoloading module: ${m}"
                kldload -n ${m}
        done
        devctl thaw

UPDATE 2 – The drm-kmod Silencing

Recently to get support for newer GPUs the drm-kmod meta port/package is needed. The thing is that if you add the /boot/modules/i915kms.ko (for Intel GPUs) to the kld_list parameter it will display following error message from the kernel even with boot_mute=YES in the /boot/loader.conf file.

Loading kernel modules:
Dec 16 11:08:03 t420s kernel: Failed to add WC MTRR for [0xe0000000-0xefffffff]: -28; performance may suffer

The syslogd is guilty here with its default configuration in the /etc/syslog.conf file. To make it silent (not print pointless messages) make this change in the /etc/syslog.conf file.

% diff -u /root/syslog.conf /etc/syslog.conf
--- /root/syslog.conf   2018-12-18 11:49:48.204878000 +0100
+++ /etc/syslog.conf    2018-12-18 11:49:55.681504000 +0100
@@ -5,7 +5,7 @@
 #      separators. If you are sharing this file between systems, you
 #      may want to use only tabs as field separators here.
 #      Consult the syslog.conf(5) manpage.
-*.err;kern.warning;auth.notice;mail.crit                       /dev/console
+# *.err;kern.warning;auth.notice;mail.crit                       /dev/console
 *.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err  /var/log/messages
 security.*                                                     /var/log/security
 auth.info;authpriv.info                                        /var/log/auth.log

Now it will not print these pointless messages.

This applies both to 11.2-RELEASE and 12.0-RELEASE versions.

UPDATE 3 – Silence the Services Starting Messages

Thanks to the vmisev suggestion we can silence the FreeBSD boot process even more.

Just add rc_startmsgs=NO to your /etc/rc.conf file and reboot to see effects.

Here is already silenced boot process by my earlier settings.

rc_startmsgs_YES.jpg

After adding rc_startmsgs=NO to the /etc/rc.conf file the boot messages are cut in half.

rc_startmsgs_NO.jpg

Now its very close to Solaris/Illumos provides πŸ™‚

EOF

62 thoughts on “FreeBSD Desktop – Part 1 – Simplified Boot

  1. LOLWUT

    It’s a laptop. This means it is a personal platform. It’s not a kiosk. It’s not for a family member who would be intimidated and confused. Why on earth would you waste your time hiding information which may be potentially valuable in the future?

    And then, to top it off, you eschew XDM in order to use the very text console you’d been hiding.

    Madness.

    Like

    Reply
    1. vermaden Post author

      > It’s a laptop. This means it is a personal platform. It’s not a kiosk. It’s not for a family member who would be intimidated and confused.
      Yes, maybe, yep, rather not.

      > Why on earth would you waste your time hiding information which may be potentially valuable in the future?
      Because its only POTENTIALLY valuable and its useless and annoying for 99.999% of the time.

      > And then, to top it off, you eschew XDM in order to use the very text console you’d been hiding.
      I do not hide from console, I suppress the unneeded output from it.

      > Madness.
      Naturally πŸ˜‰
      https://forums.freebsd.org/threads/31662/

      Liked by 2 people

      Reply
    2. smileymattj

      @LOLWUT
      To each their own. These are optional. And like you said, this is great for kiosks, so this can be applied to other situations where needed/wanted.

      With most linux distros utilizing UEFI and systemd boot times average around 14s. Debian being the best coming in at 11s. 4-6 secs is the grub timeout; 5 secs with grub timeout set to 0. Lowering boot times are very desirable for a lot of people. Before editing the FreeBSD /etc/rc.d/ scripts, only adding the three edits to /boot/loader.conf and single edit to /etc/rc.conf. FreeBSD boot time is lowered from 23 secs to 13 secs. The /etc/rc.d/ edits don’t seem to lower the boot time for me. It’s purely for aesthetics | clean look.

      /boot/loader.conf
      boot_mute=”YES”
      autoboot_delay=”-1″
      beastie_disable=”YES”

      /etc/rc.conf
      rc_startmsgs=”NO”

      For troubleshooting issues, the info presented during boot is not gone by making the edits. Most boot messages can be found under:
      dmesg
      (cat|tail|grep|less|more..) /var/log/messages

      Also don’t really need it printing the default routes, some might find this as a secure/hardening to remove these messages from printing to the console.
      netstat -r works great when you have login privileges.

      Some keyboards don’t even have a scroll-lock key, so you might not even be able to view the boot console messages in their full entirety if using a condensed or pocket keyboard. screen or tmux is useful to gain scroll back when using keyboards without a scroll-lock key.

      Most intelligent people are called “mad” before people truly understand they were actually a genius.

      Thanks vermaden, like many of your tutorials, I find this very informative and useful. Great work!

      Liked by 1 person

      Reply
  2. Pingback: [How-To] Nextcloud 13 on FreeBSD - FreeBSDNews.com

  3. Pingback: FreeBSD desktop (1) | 0ddn1x: tricks with *nix

      1. tuaris

        I tried it by adding it to /etc/rc.conf (I prefer not to edit base system files).

        exec 1>&-
        exec 2>&-
        

        Bootup is super silent, except for this message:

        Mar  2 19:48:42 desktop14 syslogd: ioctl(FIONREAD): Inappropriate ioctl for device
        

        I don’t know if that error is a result of the above though.

        Like

      2. vermaden Post author

        Just tried that in a VM and yes – the syslogd: ioctl(FIONREAD): Inappropriate ioctl for device message is because of that πŸ™‚

        Like

  4. Pingback: Home | vermaden

  5. Pingback: FreeBSD Desktop – Part 3 – X11 Window System | vermaden

  6. Pingback: [How-To] FreeBSD Desktop – Part 3 – X11 Window System - FreeBSDNews.com

  7. Pingback: FreeBSD Desktop – Part 6 – Key Components – Task Bar | vermaden

  8. Pingback: FreeBSD Desktop – Part 7 – Key Components – Wallpaper Handling | vermaden

  9. Pingback: FreeBSD Desktop – Part 8 – Key Components – Application Launcher | vermaden

  10. Pingback: FreeBSD Desktop – Part 9 – Key Components – Keyboard/Mouse Shortcuts | vermaden

  11. Pingback: FreeBSD Desktop – Part 4 – Key Components – Window Manager | vermaden

  12. Pingback: FreeBSD Desktop – Part 5 – Key Components – Status Bar | vermaden

  13. Pingback: FreeBSD Desktop – Part 10 – Key Components – Locking Solution | vermaden

  14. Pingback: FreeBSD Desktop – Part 11 – Key Components – Blue Light Spectrum Suppress | vermaden

  15. Pingback: FreeBSD Desktop – Part 12 – Configuration – Openbox | vermaden

  16. Pingback: FreeBSD Desktop – Part 13 – Configuration – Dzen2 | vermaden

  17. Pingback: FreeBSD Desktop – Part 14 – Configuration – Tint2 | vermaden

  18. Pingback: FreeBSD Desktop – Part 15 – Configuration – Fonts & Frameworks | vermaden

  19. Pingback: FreeBSD Desktop – Part 2 – Install | vermaden

  20. Pingback: FreeBSD Desktop – Part 16 – Configuration – Pause Any Application | vermaden

  21. Pingback: FreeBSD Desktop – Part 17 – Automount Removable Media | πŸ†…πŸ…΄πŸ†πŸ„ΌπŸ„°πŸ„³πŸ…”πŸ…

  22. Pingback: FreeBSD Desktop – Part 2.1 – Install FreeBSD 12 | πšŸπšŽπš›πš–πšŠπšπšŽπš—

      1. vmisev

        Thank you vermaden πŸ™‚ I learned quite a few tricks from you and I’m always recommending your blog whenever some Q pops up πŸ˜‰

        Even w rc_startmsgs=”NO” I had to manually ‘silence’ /etc/rc.d/abi for “Adittional ABI …”; rc.d/local – “Starting local daemons”, rc.d/mountlate; rc.d/syscons “Configuring” – ‘keyrate’ +’blanktime’ and rc.d/sshd “Performing sanity check”.
        Almost forgot: when running in virtual, for VBoxService I made VBoxService.sh with VBoxService 1> /dev/null
        and edited local rc.d/vboxservice ‘command=’ line to call that sh. πŸ˜€

        Now, only thing after full-screen FreeBSD logo and before login prompt is:
        Starting network:
        DHCPREQUEST on …
        DHCPACK from …
        ‘bound to x.x.x.x — renewal in 43200 second’
        and I don’t know how to silence this – pls help! πŸ˜€

        BTW, your “Valuable News” is my favorite news source: no politics, no bull*, just interesting stuff that really matters! πŸ˜‰

        Like

      2. vermaden Post author

        Thank you vermaden πŸ™‚ I learned quite a few tricks from you and I’m always recommending your blog whenever some Q pops up πŸ˜‰

        Thanks πŸ™‚

        Even w rc_startmsgs=”NO” I had to manually β€˜silence’ /etc/rc.d/abi for β€œAdittional ABI …”; rc.d/local – β€œStarting local daemons”, rc.d/mountlate; rc.d/syscons β€œConfiguring” – β€˜keyrate’ +’blanktime’ and rc.d/sshd β€œPerforming sanity check”.
        Almost forgot: when running in virtual, for VBoxService I made VBoxService.sh with VBoxService 1> /dev/null
        and edited local rc.d/vboxservice β€˜command=’ line to call that sh. πŸ˜€

        Yeah some messing is needed to have ‘silent’ clean boot πŸ™‚

        Now, only thing after full-screen FreeBSD logo and before login prompt is:
        Starting network:
        DHCPREQUEST on …
        DHCPACK from …
        β€˜bound to x.x.x.x β€” renewal in 43200 second’
        and I don’t know how to silence this – pls help! πŸ˜€

        I would start by adding background_dhclient=YES to the /etc/rc.conf file with following reboot for test.

        If that would not help I would mess with /etc/rc.d/dhclient script.

        BTW, your β€œValuable News” is my favorite news source: no politics, no bull*, just interesting stuff that really matters! πŸ˜‰

        Thanks, goo to know that someone finds that useful πŸ™‚

        Like

  23. Pingback: FreeBSD Desktop – Part 18 – Global Dashboard | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  24. pboehmer

    To disable the boot menu (Boot Single Mode, etc), put the following line in /boot/loader.conf:

    beastie_disable=”YES”

    Like

    Reply
  25. Waldin

    I had to manually β€˜silence’ /etc/rc.d/abi for β€œAdittional ABI …”; rc.d/local – β€œStarting local daemons”, rc.d/mountlate; rc.d/syscons β€œConfiguring” – β€˜keyrate’ +’blanktime’ and rc.d/sshd β€œPerforming sanity check”.

    Please, could you explain in detail how to make these changes? Thank you.

    Like

    Reply
  26. luke

    This guide is really confusing. I don’t get it at all, it is totally unclear what changes actually need to be made, why does it need to be so obscure? could you just post your files?

    Like

    Reply
  27. Pingback: Linux++ (May 3, 2020) - Front Page Linux

  28. Georg

    I autostart into X. So I changed both text and background color of my vt to black in /boot/loader.conf:
    kern.vt.color.0.rgb=”25, 25, 25″
    kern.vt.color.7.rgb=”25, 25, 25″
    kern.vt.color.15.rgb=”25, 25, 25″

    It gives you a black screen right after the beastie menu.
    Also, I start netif delayed, because it makes me wait for wlan connection on boot even with DHCPSYNC. So I added netif_start=”NO” to /etc/rc.conf, and start it later in my ~/.config/openbox/autostart file via doas (doas service netif onestart).

    Like

    Reply
    1. vermaden Post author

      Thank for comment.

      I was thinking about that but I want to have command line option when needed.

      It would be nice to have a ‘switch’ to enable console when needed and keep it ‘off’ for typical boot – but such thing is absent currently on FreeBSD.

      About network on boot I do not have any network related settings in /etc/rc.conf file and I always use my network.sh script for network connectivity – https://vermaden.wordpress.com/2018/03/24/freebsd-network-management-with-network-sh-script/ – more here.

      You can of course also put it into the ~/.config/openbox/autostart file.

      Regards.

      Like

      Reply
  29. indgy

    Try this, on 11.4-RELEASE it removes almost all unnecessary info, of course all the info is still available via dimes or listed in /var/log/messages

    sysrc background_dhclient=YES
    sysrc rc_startmsgs=NO
    sysrc -f /boot/loader.conf boot_mute=”YES”
    sysrc -f /boot/loader.conf beastie_disable=”YES”
    sysrc -f /boot/loader.conf autoboot_delay=”3″
    sed -i ” ‘s/run_rc_script ${_rc_elem} ${_boot}/run_rc_script ${_rc_elem} ${_boot} > \/dev\/null/g’ /etc/rc

    Liked by 1 person

    Reply
      1. indgy

        Thanks for doing all of the above πŸ˜‰

        Please note that for anyone copying and pasting those commands the last command sed blah blah .. will need the quotes changing to single quotes and the double quote after the -i should be two single quotes.

        I’ve made a gist here that’s easier to copy/paste:


        #!/bin/sh
        # Speed up boot slightly
        sysrc background_dhclient=YES
        sysrc -f /boot/loader.conf autoboot_delay=3
        # Quieten boot messages
        sysrc rc_startmsgs=NO
        sysrc -f /boot/loader.conf boot_mute=YES
        sysrc -f /boot/loader.conf beastie_disable=YES
        # Send rc standard output to dev null
        sed -i '' 's/run_rc_script ${_rc_elem} ${_boot}/run_rc_script ${_rc_elem} ${_boot} > \/dev\/null/g' /etc/rc

        view raw

        quiet_boot.sh

        hosted with ❤ by GitHub

        Like

  30. Pingback: Настройка Π·Π°Π³Ρ€ΡƒΠ·ΠΊΠΈ FreeBSD — IT-NOTES

  31. Pingback: Настройка Π·Π°Π³Ρ€ΡƒΠ·ΠΊΠΈ — IT-NOTES

  32. Cold Money (@ColdMoney21)

    I followed the steps here to silence most of the verbose messages but one thing that still shows up, at least on my case is “no pools available to import”. Guess its ZFS message related. Anybody know how to remove this message from boot?

    Like

    Reply
    1. vermaden Post author

      The ‘no pools available to import’ is the output of zpool(8) command.

      # zpool import       
      no pools available to import
      

      There is only one place in the boot process where its executed – in the /etc/rc.d/zpool script.

      Make this patch to make it silent.

      --- /root/zpool 2021-02-15 00:41:53.769171000 +0100
      +++ /etc/rc.d/zpool     2021-02-15 00:47:38.142288000 +0100
      @@ -22,7 +22,7 @@
       
              for cachefile in /etc/zfs/zpool.cache /boot/zfs/zpool.cache; do
                      if [ -r $cachefile ]; then
      -                       zpool import -c $cachefile -a -N && break
      +                       zpool import -c $cachefile -a -N 1> /dev/null 2> /dev/null && break
                      fi
              done
       }
      

      Let me know if it helped.

      Regards.

      Like

      Reply
  33. lagiol

    Hey, great article!

    I did all the steps but now I am stuck! My disk is GELI encrypted (ufs) and my password is asked at boot time, shortly after Beastie menu. But with these changes I never get asked when booting multi-user, which is my choice. I only see the white FreeBSD orb logo forever.
    When selecting single user eventually the white orb logo disappears and I get prompted for my password and the system boots normally.

    Did you experience this before or do you have an idea how could I fix multi-user boot?
    Thanks.

    Like

    Reply
    1. vermaden Post author

      Thanks πŸ™‚

      I am afraid that I did not tested these on FreeBSD with UFS as I use ZFS for my systems.

      I would start with removing boot_mute=YES from the /boot/loader.conf file.

      Let me know how it went with that change.

      Regards.

      Like

      Reply
  34. Barking Bandicoot

    Hello Vermaden,

    I am still having a bit of text come through though – and I want to change the splash screen. I am doing this on GhostBSD.

    In the /boot/defaults/loader.conf there is this info:

    # Put any overrides into one of the
    # loader_conf_files instead
    
    ###  Splash screen configuration  ############################
    splash_bmp_load="NO"		# Set this to YES for bmp splash screen!
    splash_pcx_load="NO"		# Set this to YES for pcx splash screen!
    splash_txt_load="NO"		# Set this to YES for TheDraw splash screen!
    vesa_load="NO"			# Set this to YES to load the vesa module
    bitmap_load="NO"		# Set this to YES if you want splash screen!
    bitmap_name="splash.bmp"	# Set this to the name of the file
    bitmap_type="splash_image_data" # and place it on the module_path
    
    ###  Screen saver modules  ###################################
    # This is best done in rc.conf
    screensave_load="NO"		# Set to YES to load a screensaver module
    screensave_name="green_saver"	# Set to the name of the screensaver module
    
    ###  GhostBSD defaults		
    # Set the brand/loader logo
    loader_brand="ghostbsd"
    loader_logo="glogo"
    loader_menu_title="Welcome to GhostBSD"
    boot_mute="YES"
    

    How can I get the clean splash screen in your example?

    PS. I tried loader_brand=”freebsd” in the /boot/loader.conf but it did not over-ride the defaults.

    Thanks!

    Like

    Reply
    1. vermaden Post author

      Hi,

      I did not checked what was modified in GhostBSD to achieve their custom splash screen but this may help in the /boot/loader.conf file:

      loader_logo=orb
      loader_brand=fbsd
      

      Regards.

      Like

      Reply
      1. Barking Bandicoot

        Hello!
        Thanks so much for your reply!
        I added:

        loader_logo="orb"
        loader_brand="fbsd"
        

        to the loader.conf but it had no effect.
        When I set beastie_disable=”NO” then it did change to the orb.

        The ‘GhostBSD’ splash still preceded straight after though.

        In the boot directory I have two files labelled brand”

        brand-fbsd.4th
        brand.4th
        

        Do I need to install a different brand??

        Like

      2. vermaden Post author

        The logo displayed after the bootloader stage has nothing to do with loader(8).

        From what I know its a hardcoded image at this location:

        % ls -l /usr/src/sys/dev/vt/logo
        total 25K
        -rw-r--r-- 1 root wheel 27435 2022-05-12 06:54 logo_beastie.c
        -rw-r--r-- 1 root wheel 45643 2022-05-12 06:54 logo_freebsd.c
        

        Regards.

        Like

  35. Barking Bandicoot

    The brand-fbsd.4th file does contain reference to what looks to be a freebsd image, s” /boot/images/freebsd-brand-rev.png”

    well, the png says freebsd and not Ghostbsd! ??

    Like

    Reply
  36. Barking Bandicoot

    Hardcoded? So it cannot be changed?

    In any case I do not seem to have that directory!

    bandicoot@spook /u/h/bandicoot> ls -l /usr/src/sys/dev/vt/logo
    ls: /usr/src/sys/dev/vt/logo: No such file or directory
    
    bandicoot@spook /u/h/bandicoot [1]> ls -l /usr/src/sys/dev/vt/
    ls: /usr/src/sys/dev/vt/: No such file or directory
    
    bandicoot@spook /u/h/bandicoot [1]> ls -l /usr/src/sys/dev/
    ls: /usr/src/sys/dev/: No such file or directory
    
    bandicoot@spook /u/h/bandicoot [1]> ls -l /usr/src/sys/
    ls: /usr/src/sys/: No such file or directory
    
    bandicoot@spook /u/h/bandicoot [1]> ls -l /usr/src/
    total 0
    
    bandicoot@spook /u/h/bandicoot> ls -l /usr/
    total 111
    drwxr-xr-x   2 root  wheel  494 23 Jun 11:34 bin/
    drwxr-xr-x   3 root  wheel    3 28 Dec 12:03 home/
    drwxr-xr-x  56 root  wheel  350 23 Jun 11:34 include/
    drwxr-xr-x   9 root  wheel  746 23 Jun 11:34 lib/
    drwxr-xr-x   7 root  wheel  407 23 Jun 11:34 lib32/
    drwxr-xr-x   5 root  wheel    5 25 Nov  2021 libdata/
    drwxr-xr-x  10 root  wheel   66 23 Jun 11:28 libexec/
    drwxr-xr-x  19 root  wheel   19 22 May 10:49 local/
    drwxr-xr-x   2 root  wheel    2 25 Nov  2021 obj/
    drwxr-xr-x   2 root  wheel    2 28 Dec 12:01 ports/
    drwxr-xr-x   2 root  wheel  288 23 Jun 15:16 sbin/
    drwxr-xr-x  32 root  wheel   32 25 Nov  2021 share/
    drwxr-xr-x   2 root  wheel    2 25 Nov  2021 src/
    
    bandicoot@spook /u/h/bandicoot> cd /usr/src/
    
    bandicoot@spook /u/src> ls
    

    Like

    Reply
    1. vermaden Post author

      You need to fetch the FreeBSD (or GhostBSD) system source code to have /usr/src dir.

      Then you will have to modify these files and the rebuild them and install them into your system.

      Like

      Reply
  37. Rex Infernum

    Your Desktop config with tons of launchs in top with the status bar is unusual, in reddit i can see a similar setup. Its for sysadmin experiencie or a more practical use?

    Thanks!

    Like

    Reply
    1. vermaden Post author

      Hi.

      You are probably asking about my Dzen2 setup described here:
      https://vermaden.wordpress.com/2018/07/05/freebsd-desktop-part-13-configuration-dzen2/

      First – I used Dzen2 with my commands because I wanted to have everything displayed ‘my way’ while Conky only covered a part of these needs – and I still needed to run my commands inside Conky to achieve the same.

      Second – Conky had a memory leak for some of its options – so RAM usage increased with every refresh.

      Third – I do not need to have that information refreshed every second or two. My Dzen2 information status refreshes every 5 minutes – but when I click on it it refreshes with information from ‘now’ πŸ™‚

      This ‘not often’ refresh helps to have longer battery life when without AC.

      Hope that is what You asked πŸ™‚

      Like

      Reply

Leave a comment