I finally had a chance to upgrade my home systems to FreeBSD 5.3. Here’s my working notes for both a fresh install and an upgrade from 5.2.1 to 5.3.
First, I started with my laptop which was running FreeBSD 4.10. For those who are looking for migration examples from 4.10 -> 5.3, I can’t help you there as I chose to do a fresh install on purpose.
When I originally installed the laptop back in early October, I had planned on installing 5.2.1. However, the default kernel hung solid during its load, never getting me to the install screen. At the time, I started a thread on the freebsd-mobile mailing list and the concensus was either an IRQ conflict or a conflicting BIOS option. After fiddling with several CMOS settings, I settled for installing 4.10 as the 4.x install utility allows you to disable unneeded drivers.
I was now curious to see if that mysterious IRQ/BIOS setting had been resolved with 5.3. I was hopeful as the migration guide indicated that the initial floppies had been revamped from 2 to 3, allowing the addition of more features. (my laptop lacks a built-in CDROM so I have to start the install with floppies)
So, I went to the floppies section of the FTP site and downloaded boot.flp, kern1.flp, and kern2.flp. Once I had “dd”d the images onto 3 floppies, I inserted boot.flp and followed the directions. And, voila, the kernel loaded and the system installed flawlessly. Once the operating system had installed, I used the installation program to quickly install packages of all of my favourite software. As soon as I had rebooted into the new system, I fired up my trusty cvs-supfile and used portupgrade to ensure all of my software was up-to-date.
One thing I noticed missing from the install’s post-configuration utility was the option to configure X. So, I went to the updated section of the
handbook as this was my first time using Xorg instead of XFree86. I typed “Xorg -configure” and held my breath. The configuration script did its thing and I was very pleased when “startx” worked as expected. (I had already installed the kde package and had created an ~/.xinitrc with the line “exec startkde”) All in all, the full install was a very painless procedure.
Now that my laptop was taken care of, I did a backup of my main system and used “scp” to copy the backup to my laptop. I didn’t expect any problems but I wasn’t going to take any chances with the data on my main system. I then changed the tag in my cvs-supfile from RELENG_5_2 to RELENG_5_3 and ran cvsup to download the sources for 5.3. Once the sources were on my main system, I ran this series of commands:
# cd /usr/src
# make buildworld
# make buildkernel KERNCONF=GENERIC
# make installkernel KERNCONF=GENERIC
# shutdown now (to go to single-user mode)
# cd /usr/src
# make installworld
That last command failed with an error regarding a missing user account. Those who use “mergemaster” would have already resolved this, but I don’t like using “mergemaster”. Instead, I took a closer look at “/usr/src/UPDATING”. Aaah, I hadn’t read back far enough as the info I needed went way back to 20040623 and 20040308.
Fortunately, my laptop had the correct user accounts and group so I used “vipw” to add the “proxy” and “_pflogd” accounts and used “vi” to add the “authpf” group to “/etc/group”.
Once the “installworld” was successful, I rebooted into the GENERIC kernel. “uname -a” indicated that I was now at 5.3-RELEASE-p2. I was a bit worried about X, but “startx” worked flawlessly. It was now time to see if 5.3 liked my modified kernel:
# cd /usr/src
# make buildkernel KERNCONF=NEW
This quickly gave me an error that “device pcm” (for my soundcard) was not supported. I remembered reading something about that in the Release Notes . I remmed out that line in “/usr/src/sys/i386/conf/NEW”, reissued the command and read through “man 4 sound”.
The manpage suggested adding this line to “/boot/loader.conf”:
snd_driver_load=”YES” # All sound drivers
I double-checked my edit and saved my change. Once the kernel finished building, I then:
# make installkernel KERNCONF=NEW
Everything seemed fine until I ran “startx” and it stopped cold with this error message:
xf86EnableIO: Failed to open /dev/io for extended I/O
I was glad I had my laptop nearby as it took less than a minute of Googling for that error message to indicate that I needed to add these lines to my kernel configuration file:
So, I recompiled the kernel, rebooted and tried again. It worked, so I decided to push my luck by replacing XFree86 with Xorg. I followed the instructions in “/usr/ports/UPDATING” for 20040723 and ran this series of commands:
# cd /var/db/pkg
# portupgrade -o devel/imake-6 imake-4*
# portupgrade -o x11/xorg-libraries XFree86-libraries
# portupgrade -o x11/xorg-clients XFree86-clients
# portupgrade -o x11/xorg-manpages XFree86-manuals
# portupgrade -o x11/xorg-documents XFree86-documents
# portupgrade -o x11-fonts/xorg-fonts-truetype XFree86-fontScalable
# portupgrade -o x11-fonts/xorg-fonts-100dpi \ XFree86-font100dpi
# portupgrade -o x11-fonts/xorg-fonts-75dpi \ XFree86-font75dpi
# portupgrade -o x11-fonts/xorg-fonts-type1 \ XFree86-fontDefaultBitmaps
# portupgrade -o x11-fonts/xorg-fonts-cyrillic \ XFree86-fontCyrillic
# portupgrade -o x11-fonts/xorg-fonts-encodings \ XFree86-fontEncodings
# portupgrade -o x11-servers/xorg-server XFree86-Server
# portupgrade -o x11/xorg -f XFree86
The “-o” switch tells “portupgrade” to upgrade an existing package with a different package. In this case, to replace XFree86 with Xorg. Some of the commands didn’t work on my system as I hadn’t installed that particular package–for example XFree86-fontCyrillic wasn’t installed on my system.
I then ran “Xorg -configure” on my main system which appeared to work. However, when I ran “startx”, it aborted with an error when X tried to load the default font. So, I looked at the first Font line in the configuration file:
# grep -m1 Font /root/xorg.conf.new
Hmmm, I wondered if I was missing a necessary font?
# ls /usr/ports/x11-fonts |grep misc
That looked like a likely candidate and a search through “pkg_info” indicated it wasn’t on my system. So:
# pkg_add -r xorg-fonts-miscbitmaps
And, that seemed to do the trick. Once KDE was up and running, I opened up XMMS to test my soundcard and was pleased to have sound on the system.
I still have to tweak Xorg a bit. The default display of 1400×1050 was way too tiny for my myopic eyes, but a right-click on the KDE desktop->configure desktop->display let me change the default to something more reasonable. When I have more time, I’ll have to play with the fonts as they look pretty crappy in Firefox.
If you’ve been following the 5.x series through cvsup, it won’t be that difficult upgrading to 5.3. In fact, your upgrade will be even easier if you have already integrated the changes to PF and Xorg. You can decide to keep PF out of the 5.3 base by adding NO_PF to your make.conf BEFORE you issue your “make buildworld” command. You can also choose to continue to use XFree86 if you prefer not to switch to Xorg at this time. Do make sure those two options are in your kernel, though, as either version of X requires them on 5.3.