FreeBSD 9.0 installation on a T400
15 Nov 2012From time to time, FreeBSD has made its way onto my T400. Each time I do it, I never jot down what I did to get it to “work”. Here’s just a few thoughts and basic guide for installing FreeBSD RELEASE-9.0 on a Lenovo ThinkPad T400.
BIOS
The T400’s graphics mode needs to be switched from “Discreet” back to “Integrated”, otherwise the BSD installation process just continually reboots. The laptop will now allow a standard installation to be performed.
Post Installation
First things first. Stop the PC Speaker barking at you when you do something questionable (disable by adding this to /etc/sysctl.conf)
Some switches required for connection resilience need to be applied to the WiFi configuration (fix by commenting these lines from /etc/wpa_supplicant.conf)
WiFi network entry should look as follows
Add the full hostname to /etc/rc.conf
Get the proc filesystem mounted at boot by adding the following line to /etc/fstab
Organising the ports collection
In the interest of making the ports collection as “fresh” as possible, it’s best to remove the installed version and pull down the latest version over the web.
Remove the existing ports collection
Refresh the ports collection from an australian mirror. You can find full instructions here on this. Fetch the collection into /var/db/portsnap Extract the collection into /usr/ports
From now on, to refresh ports just use the following command
Installation
Any port needed for installation is done with the following commands
bash (/usr/ports/shells/bash)
Set bash as the default shell for users by running the following
sudo (/usr/ports/security/sudo)
Setup user groups who can sudo by editing the config
Uncomment the line allowing the wheel group
Add users who want to sudo to the wheel group
Other pieces of software to make your environment feel more like home
vim (/usr/ports/editors/vim-lite)
git (/usr/ports/devel/git)
xorg (/usr/ports/x11/xorg)
xfce (/usr/ports/wm/xfce4)
gnome-keyring (/usr/ports/security/gnome-keyring)
gnome-power-manager (/usr/ports/sysutils/gnome-power-manager)
chrome (/usr/ports/www/chromium)
pidgin (/usr/ports/net-im/pidgin)
irssi (/usr/ports/irc/irssi)
evince (/usr/ports/graphics/evince)
Preferences
Set colourised output on ls by adding the following line to ~/.bash_profile
Get bash_profile to execute bashrc if it exists by adding the following line towards the top to bash_profile
dbus and hald need to be started at boot time if a mouse/keyboard is going to be used within X. To get these to start, add the following lines to the /etc/rc.conf file
Both of the above config lines can be removed if using a login manager (like gdm). All the needs to be added in this scenario is
Automatically mount any samba shares at boot by adding lines like the following to /etc/fstab </span>
With -N specified in the above fstab entry, any secrets needed to connect to the share need to be put into the ~/.nsmbrc file and should look as follows
Tread with caution here: I’ve just rolled back authentication for the samba shares as FreeBSD’s mount_smbfs doesn’t contain a _netdev option which will delay mounting the remote share until the network is available. Not being able to do this makes the BSD boot fail with authentication errors.