I've spent the past thirty minutes installing FreeBSD as a KVM guest. This mostly involved fetching the ISO (I chose the latest stable release 10.0), and accepting all the defaults. A pleasant experience.
As I'm running KVM inside screen
I wanted to see the boot prompt, etc, via the serial console, which took two distinct steps:
- Enabling the serial console - which lets boot stuff show up
- Enabling a login prompt on the serial console in case I screw up the networking.
To configure boot messages to display via the serial console, issue the following command as the superuser:
# echo 'console="comconsole"' >> /boot/loader.conf
To get a login: prompt you'll want to edit /etc/ttys
and change "off
" to "on
" and "dialup
" to "vt100
" for the ttyu0
entry. Once you've done that reload init
via:
# kill -HUP 1
Enable remote root logins, if you're brave, or disable PAM and password authentication if you're sensible:
vi /etc/ssh/sshd_config
/etc/rc.d/sshd restart
Configure the system to allow binary package-installation - to be honest I was hazy on why this was required, but I ran the two command and it all worked out:
pkg
pkg2ng
Now you may install a package via a simple command such as:
pkg add screen
Removing packages you no longer want is as simple as using the delete
option:
pkg delete curl
You can see installed packages via "pkg info
", and there are more options to be found via "pkg help
". In the future you can apply updates via:
pkg update && pkg upgrade
Finally I've installed 10.0-RELEASE which can be upgraded in the future via "freebsd-update
" - This seems to boil down to "freebsd-update fetch
" and "freebsd-update install
" but I'm hazy on that just yet. For the moment you can see your installed version via:
uname -a ; freebsd-version
Expect my future CPAN releases, etc, to be tested on FreeBSD too now :)
Tags: exploration, freebsd, kvm 2 comments
http://steve.org.uk/.
IPv6 is available natively at the hosting company, Bytemark, so I wanted to configure this too.
The default route for all hosts is fe80::1, which is neat and consistent within their network. However FreeBSD assigns this to lo0 by default which caused me some hair-pulling.
The solution was to update /etc/rc.conf like so:
The key thing is to set the interface name on the default router line - in my case em0 is my primary NIC so that's what I had to specify.
With that configured things work as expected.