FreeBSD on netbook – Acer Aspire

I recently acquired “new” netbook, it’s so old that most people would call it ancient. Its CPU is only 32 bit architecture, it’s not capable of playing 2k videos in 30fps, its computing power is lesser than my ARM tablet, but it still works, so why not use it for something.

I got it from a friend who was using Fedora. It was slow, even with openbox. dnf update was taking from a few to several minutes, I had to install something faster. At first, Debian with LXDE. First installation attempt failed with some problem with GRUB, it wasn’t a good sign, I didn’t investigate the problem to get it working asap. I restarted bootloader installation with LILO which succeeded. Debian was still slow. Package installation was taking long, deb processing was taking long and I was sitting there and waiting for it to finish. Launching Firefox was taking even 30 seconds, videos on youtube were lagging even on 30fps. I really expected more from this 10 years old hardware. I decided to use it for my experiments and try something new. I decided to look at BSDs. OpenBSD would work here, it’s fast, secure and it like ideology behind it, but I don’t think it would work on semi-destkop netbook for me. I read about DragonFlyBSD and was impressed what creators did with kernel and distribution, wanted to give it a try, but they don’t support i386. There are two BSD distributions dedicated for desktop computers, DesktopBSD and PC-BSD, I didn’t know with which one to go, so I took FreeBSD, they provide i386 memstick installer, so it was easy since beginning, or at least it was specific which image should be used.

Installation was quick and painless. It was faster and more user friendly than I expected, completely comparable to installation process of some Linux distributions like Ubunutu, openSUSE or Manjaro.

I had some previous experience from ~6 years ago about FreeBSD so I knew what to expect, I knew about ports, rc.conf and sysctl.

FreeBSD uses its own `pkg` or `pkg2ng` as package manager, but it also supports fast and painless installation from source using ports. In my case, I was using `pkg`, so I’ll be using it to show examples in this post.

pkg wasn’t installed, so I was asked if I want to install it, yes. After three minutes, it was there.
I wanted to create a “fast”, stable and efficient semi-destkop setup that would look like my desktop ArchLinux, but using lightweight alternatives. In this process I’ll show you what I did to make my idea come true. KDE of course is not an option for this hardware, so I installed LXDE:

pkg update 
pkg install xorg lxde-common lxde-meta xfce4-mixer slim firefox thunderbird zsh git vim maven3 gradle qt5-qmake qt5-core qtcreator openjdk8 openjdk8-jre

Uf…
First, I want to use FreeBSD in similar way I use ArchLinux, so I need a way to install, update, remove packages from system with simply switching user.
Otherwise, when you try su:

$ su
su: Sorry

To run su, your user must be in a group `wheel`:

pw usermod agilob -G wheel

????
Next, I needed to create destkop environment, SLiM should be fast enough. It’s widely configurable for my purpose, in fact all I needed was autologin setup:

vim /usr/local/etc/slim.conf

Find and edit the following lines to support autologin using SLiM:

default_user        agilob
auto_login          yes

Now, switch your to your user and edit ~/.xinitrc file which will start your desktop environment:

vim ~/.xinitrc
exec startlxde

That’s done. Now you must enable SLiM on system startup in rc.conf. To enable more features you should enable not only slim, but also dbus, hald, moused and powerd:

slim_enable="YES"
moused_enable="YES"
 
hald_enable="YES"
dbus_enable="YES"
powerd_enable="YES"

While we’re in rc.conf, to make your setup faster and less complicated for standard users, you can also disable sendmail and dumpdev, you probably won’t need memory dump of crashed applications and won’t read roots mail:

dumpdev="NO"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

Some other stuff I needed to enable, this time in /boot/loader.conf are:

# Touchpad sides-crolling
hw.psm.synaptics_support=1
 
# Load sound driver
snd_hda_load="YES"
 
# Change bootloader logo to BSD devil
loader_logo="beastie"
 
# Intel Core thermal sensors
coretemp_load="YES"
 
# Handle Unicode on removable media
libiconv_load="YES"
libmchain_load="YES"
cd9660_iconv_load="YES"
msdosfs_iconv_load="YES"

There it is, my netbook runs FreeBSD where Firefox doesn’t lag and can play youtube, music and work as simple dev-machine. I think it will stay here for longer.

There are more things than just better performance that I find great in FreeBSD and any other BSD. Documentation is increasingly accurate, whatever you want to do, it’s documented. It’s very easy to find how to enable other services like netif, openvpn, tor, configure cron, setup jail or RAIDs. To compare it to currently ruling on Linux-es, systemd. It’s very poorly documented. Do you know how to change default behaviour when closing laptop lid? Yes, systemd controls it. Do you know how to run a daily script in systemd/Timer? cron has been in the industry for decades and everyone knows it’s syntax, you can find it in many programming frameworks, CI jobs setup like in Jenkins, there are online cronjob generators.

 

BSD is really well organizes class of systems, despite many developers seeing BSD as second class systems, I think it’s worth to keep an eye on them and they make really good alternative for people who don’t like direction of there Linux is going.

Think correctly ;)

[Total: 0    Average: 0/5]
  • bratpit

    Check Slackware linux. It Is BSD style without systemd.
    I have got it on Acer Aspire One

    • Yup, I know slackware, I wanted to try something new, non-Linux.

  • Andrew

    From the article:

    “Installation was quick and painful.”

    “… but it also supports fast and painful installation from source using ports.”

    Is FreeBSD really so painful? At least it is quick, so pain doesn’t last long. :) :)

    • Uh, the pain was also user friendly… Thanks