Pinebook Pro Netbsd Installation
Preamble
Guide for installing NetBSD on the Pinebook Pro including the installation of packages, setting up networking, and other quality of life changes.
Setting Up The System
Assumptions
- You've wrote the netbsd image to your microsd/emmc
- You've booted into the system
If you have problems booting from the microsd card, try disabling the emmc chip. It used to be the case that you were only able to boot from microsd if the chip was disabled. This info may become outdated.
Configuring Network
Now its time to set up Wifi. There are at least two ways to do it:
- Manually configuring wpa_supplicant
- Using wpa_cli (frontend to wpa_supplicant)
This page will use the manual method. If you'd like to use wpa_cli, here's a link to the arch wiki page
Identify your wirless network interface with ifconfig
:
ifconfig
> lo0 flags....
> run0: flags..... <---- Substitute this interface for yours when referenced
Edit the system rc.conf
file and configure wpa_supplicant
& dhcpcd
to run at boot
$ vi /etc/rc.conf
#Append the following
dhcpcd=YES
dhcpcd_flags="${dhcpcd_flags} -b" #This ensures boot wont hang when network isn't present
wpa_supplicant=YES
wpa_supplicant_flags="-B -i run0 -c /etc/wpa_supplicant.conf"
Create your wpa_supplicant.conf
. This will contain your wireless SSID and
PASSWORD. Use the wpa_supplicant CLI if you require hashed passwords rather than
clear text passwords.
$ vi /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
network={
ssid="my favourite network"
psk="hunter2"
}
# Starting wpa_supplicant
/etc/rc.d/wpa_supplicant start
Configuring package manager
Netbsd has a commented URL for downloading binary packages in
~/.profile
. Uncomment it then source the file
$ vi ~/.profile
export PKG_PATH="https://..."
. ~/.profile
# Alternatively reboot here
Update the repository
pkg_add -v pkgin
pkgin update
"Warning earm doesn't match your current architecture...."
Still want to proceed? [y/N]
Stop here. We have to make sure our architecture is set correctly, or else packages won't install properly. Fortunatley this is pretty simple.
# Note how I overwrote the file.
# If you choose to instead append the text, make sure you edit repositories.conf to delete the original url
$ echo $PKG_PATH > /usr/pkg/etc/pkgin/repositories.conf
Installing a desktop enviroment
pkgin install xfce4 xinit
# Linking our X system so xinit can read from it. This avoids errors.
ln -s /usr/X11R7/bin/X /usr/pkg/bin/X
# Adding xfce4-session to our .xinitrc
echo "exec xfce4-session" > ~/.xinitrc
# Booting the DE using the xinitrc file
startx
- Give XFCE4 a moment to load in.
- Alt+f1 will bring you back to the tty prompt.
- Alt+f2 will bring you to the gui