Pinebook Pro Netbsd Installation
Preface
I'm going to assume that you've already copied the netbsd image to your device and have booted into your 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. I'm not sure if this was fixed.
Configuring Network
There are two ways of doing this:
- Manually configuring wpa_supplicant
- Using wpa_cli (frontend to wpa_supplicant)
We're going to go over the manual method of setting up the network. If you want to use wpa_cli, here's a link to the arch wiki page
Let's identify our interface
ifconfig
> lo0 flags....
> run0: flags..... <---- Substitute this interface for yours when referenced
Next we setup wpa_supplicant and 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"
Next we can add our network to /etc/wpa_supplicant.conf
$ 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. Let's uncomment it
$ vi ~/.profile
export PKG_PATH="https://..."
I believe at this point you have to log out and log back in, so the .profile is sourced again. I just gave it a reboot instead. Let's install the "pkgin" package manager now.
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
# We have to link our X system so xinit can read from it.
ln -s /usr/X11R7/bin/X /usr/pkg/bin/X
# We add xfce4-session to our .xinitrc
echo "exec xfce4-session" > ~/.xinitrc
# Finally we can boot into our desktop enviroment
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