Advertisement
In this installment of my notes on alternative operating systems, I give my initial impressions of FreeBSD. I also want to let everyone know about the open source computer emulator QEMU.
For my initial foray into BSD, I installed a stock FreeBSD via the minimum install CD. The CD is less than 50MB, and performs the majority of it's install via the internet. There is a text menu based install procedure. I have time to explore all the options, and there are alot of them. Luckily, it gives sensible defaults, so you can get a basic system up and running without having to know much about how BSD works. After waiting a while while it downloaded the system via FTP, I rebooted into a functional (console only) FreeBSD installation. At this point, I was satisfied I could install a basic FreeBSD system, so decided to try out PC BSD.
PC BSD was even easier to install. A few mouse clicks, and a complete FreeBSD installation, including KDE, was up and running. This ease means that you don't have as many options as with a stock FreeBSD, but it's intended to give you a working Desktop BSD installation, and it does just that. Other things can be added later if desired.
PC BSD includes it's own package management system, which resolves the issue of library dependancy problems. Any program you install via it's package manager installs the program in it's own directory, and installs a copy of all required libraries in this directory as well. This prevents the conflicts between package versions that sometimes occurs when you update a library at the cost of more disk space. There are not many programs available for this new package manager yet, but the ones that are there make installation as easy as on windows. Go to the website, download the PBI to your desktop, then click on it to run. It will download and install the program, and your ready to go. Uninstalling is just as easy.
But the point of installing FreeBSD was to compare it to Linux distributions, especially Gentoo and Kubuntu. So after looking at the PCBSD package manager, I decided to install the normal BSD package management system, ports. Typing "cvsup /root/post-supfile" downloaded the ports tree to the machine. After that, both the standard BSD install methods were available. pkg_add allows you to install precompiled binaries quickly (when they're available). "pkg_add -r nano" (the -r telling it to download it from a remote site) installed my favorite console editor, so I could edit config files (I've never bothered to learn vi). It's fast, it's easy. I'd been looking at qemu earlier, so I decided to see how that installed. "pkg_add -r qemu" showed that it wasn't available as a binary package. So time to try out ports.
"cd /usr/ports" gets me to the directory. Now to find the package. "make search name=qemu" showed that qemu was in portage, as well as the kqemu accelerator. They are both in the emulation directory. "cd /usr/ports/emulation/qemu" gets me to the right place to install. "make install clean" should download the sources, build it, install it, then clean up any temp files. A quick look at the Makefile shows that it can take the WITH_KQEMU and WITH_HACKS configuration directives to build it with kqemu support and IDE DMA support. So "make WITH_KQEMU=1 WITH_HACKS=1 install clean"....whoops, install failed. kqemu requires the kernel sources, which are not installed by default with PCBSD. Simple to fix, run sysinstall, choose to install packages, choose src, choose sys. It downloads the FreeBSD kernel sources. Retrying the install works fine this time.
Under Gentoo, the process is just as easy. emerge -s qemu (or use one of the faster versions, like eix or esearch) shows several qemu packages and kqemu are in portage, but marked unstable. Adding "app-emulation/qemu-softmmu" and "app-emulation/kqemu" to /etc/portage/package.keyword allows the install. adding "app-emulation/qemu-softmmu kqemu" tells portage to install qemu with kqemu support. Typing "emerge qemu-softmmu" starts the install.
I don't know if Kubuntu has qemu in it's package management system, but if it did, install would involve starting up aptitude, doing a search for qemu, clicking install, then choosing commit.
At this point, qemu w/ kqemu acceleration is installed on both Gentoo and FreeBSD. kqemu requires a module to be loaded to take advantage of the acceleration, so we use "kldload kqemu". Under linux we would have used modprobe kqemu (gentoo requires modprobe kqemu major=0). Different names, just as easy either way.
If we want BSD to automatically load the kernel when booting, we add kqemu_load="YES" to /boot/loader.conf. In Gentoo we would have added "kqemu major=0"it to /etc/modules.autoload.d/kernel-2.6. I'm not sure about Kubuntu, but it's most likely similar to Gentoo. Both methods are pretty easy.
Ok, we now have qemu installed. Installation was fairly simple under both Gentoo and FreeBSD. The reason I wanted to install it was to see if I could get WindowsXP running inside Linux and FreeBSD at reasonable speeds. Qemu is a machine emulator, meaning you create a virutal machine, and can run other operating systems inside this emulator. There are several others out there. Bochs is really good for debugging, but doesn't offer dynamic translation, so it's slow as hell. VirtualPC and VMWare are 2 commercial versions (they run faster than qemu, but cost a fair amount). Plex86 is OSS and fast, but only supports Linux as a guest OS. Xen is another open source one, but it requires that the guest OS be modified to support it. Since we can't legally modify Windows, it's out. So qemu is our only option at this point.
So first I create a 10GB file to use as the virtual hard drive. "qemu-image create -f qcow Win.img 10G" does this on both FreeBSD and Linux. We then insert the WinXP cd into the drive and type "qemu -cdrom /dev/cdrom -boot d Win.img" (-cdrom cd0 in FreeBSD) starts the virtual system, and tells it to boot from the CD. After a brief view of the qemu bios screen, the Windows install screen comes up, and the install proceeds like any other Windows XP install (more smoothly than some). Already, the speed hit is evident though. The test machines are AMD64 3200+ running at 2.2GHz, so a normal XP install goes by pretty quick. The install on the emulator takes significantly longer, but it's not painfully slow.
After the install is complete, I did an install of Office 2000 (Including publisher), Acrobat reader, mcafee anti-virus (which blows), flash and shockwave plugins for IE, and 30+ windows security updates, and probably some things I'm forgetting. Starting up Office is takes a bit, but once running, it's perfectly useable. The total Image size with all this installed is 3.1G.
It's really cool to run Windows in a window, while still being booted into Linux. Plus, this image is totally portable. All qemu installs emulate the exact same hardware, so once a Windows XP install is activated on the emulator, it can be used on any computer. And since it's hosted on Linux, I can create a new image on a test machine, then push it out to every computer on campus overnight. Or copy an clean one to all lab machines to clean them up between semesters.
Ok, so back to FreeBSD vs Gentoo vs Kubuntu. The package management systems used by FreeBSD are impressive. pkg_add gives you the quick installation of binary distributions, while the huge ports tree gives you the flexibility to customize your packages and install those which don't have binary packages. Add in the PCBSD package manager, and you have alternatives to match every need. Add BSD's legendary stability and security and you have a really good system, whether you use it as a Desktop or a server.
This stability does have a downside though. FreeBSD has a much more controlled release cycle. The result is that the kernel and packages are more stable and secure, but they tend to lag behind those available in linux. The ability to run linux programs under FreeBSD using the linux compatibility layer reduces the impact of this, but this doesn't work for drivers. Both Nvidia and ATI release drivers for linux, but only nvidia has any for FreeBSD (and these seem to lag behind those in linux). You will have to live w/o hardware acceleration if you use an ATI card. KDE 3.5 is already available in both Gentoo and Kubuntu, while FreeBSD ports still has 3.4.3 in it.
In conclusion, PC-BSD is a perfectly usable Desktop enviornment giving you plenty of options on how to install stuff, as well as stability and security. If you don't need bleeding edge versions of software, it's a great OS.
qemu is a really cool program allowing you to run an O/S inside another O/S (you can even emulate different hardware, to run MacOS inside Linux or Windows). If you don't mind that it runs about half as fast as a native Windows install, it works great.
I'll write again once I have more experience with FreeBSD and let you know if it will become my new O/S of choice, or if I'll stick with Gentoo as my main desktop.
Matthew
P.S. My name is Brian Rodgers, Matt is a member of a newly formed Linux User Group in Las Vegas New Mexico
For my initial foray into BSD, I installed a stock FreeBSD via the minimum install CD. The CD is less than 50MB, and performs the majority of it's install via the internet. There is a text menu based install procedure. I have time to explore all the options, and there are alot of them. Luckily, it gives sensible defaults, so you can get a basic system up and running without having to know much about how BSD works. After waiting a while while it downloaded the system via FTP, I rebooted into a functional (console only) FreeBSD installation. At this point, I was satisfied I could install a basic FreeBSD system, so decided to try out PC BSD.
PC BSD was even easier to install. A few mouse clicks, and a complete FreeBSD installation, including KDE, was up and running. This ease means that you don't have as many options as with a stock FreeBSD, but it's intended to give you a working Desktop BSD installation, and it does just that. Other things can be added later if desired.
PC BSD includes it's own package management system, which resolves the issue of library dependancy problems. Any program you install via it's package manager installs the program in it's own directory, and installs a copy of all required libraries in this directory as well. This prevents the conflicts between package versions that sometimes occurs when you update a library at the cost of more disk space. There are not many programs available for this new package manager yet, but the ones that are there make installation as easy as on windows. Go to the website, download the PBI to your desktop, then click on it to run. It will download and install the program, and your ready to go. Uninstalling is just as easy.
But the point of installing FreeBSD was to compare it to Linux distributions, especially Gentoo and Kubuntu. So after looking at the PCBSD package manager, I decided to install the normal BSD package management system, ports. Typing "cvsup /root/post-supfile" downloaded the ports tree to the machine. After that, both the standard BSD install methods were available. pkg_add allows you to install precompiled binaries quickly (when they're available). "pkg_add -r nano" (the -r telling it to download it from a remote site) installed my favorite console editor, so I could edit config files (I've never bothered to learn vi). It's fast, it's easy. I'd been looking at qemu earlier, so I decided to see how that installed. "pkg_add -r qemu" showed that it wasn't available as a binary package. So time to try out ports.
"cd /usr/ports" gets me to the directory. Now to find the package. "make search name=qemu" showed that qemu was in portage, as well as the kqemu accelerator. They are both in the emulation directory. "cd /usr/ports/emulation/qemu" gets me to the right place to install. "make install clean" should download the sources, build it, install it, then clean up any temp files. A quick look at the Makefile shows that it can take the WITH_KQEMU and WITH_HACKS configuration directives to build it with kqemu support and IDE DMA support. So "make WITH_KQEMU=1 WITH_HACKS=1 install clean"....whoops, install failed. kqemu requires the kernel sources, which are not installed by default with PCBSD. Simple to fix, run sysinstall, choose to install packages, choose src, choose sys. It downloads the FreeBSD kernel sources. Retrying the install works fine this time.
Under Gentoo, the process is just as easy. emerge -s qemu (or use one of the faster versions, like eix or esearch) shows several qemu packages and kqemu are in portage, but marked unstable. Adding "app-emulation/qemu-softmmu" and "app-emulation/kqemu" to /etc/portage/package.keyword allows the install. adding "app-emulation/qemu-softmmu kqemu" tells portage to install qemu with kqemu support. Typing "emerge qemu-softmmu" starts the install.
I don't know if Kubuntu has qemu in it's package management system, but if it did, install would involve starting up aptitude, doing a search for qemu, clicking install, then choosing commit.
At this point, qemu w/ kqemu acceleration is installed on both Gentoo and FreeBSD. kqemu requires a module to be loaded to take advantage of the acceleration, so we use "kldload kqemu". Under linux we would have used modprobe kqemu (gentoo requires modprobe kqemu major=0). Different names, just as easy either way.
If we want BSD to automatically load the kernel when booting, we add kqemu_load="YES" to /boot/loader.conf. In Gentoo we would have added "kqemu major=0"it to /etc/modules.autoload.d/kernel-2.6. I'm not sure about Kubuntu, but it's most likely similar to Gentoo. Both methods are pretty easy.
Ok, we now have qemu installed. Installation was fairly simple under both Gentoo and FreeBSD. The reason I wanted to install it was to see if I could get WindowsXP running inside Linux and FreeBSD at reasonable speeds. Qemu is a machine emulator, meaning you create a virutal machine, and can run other operating systems inside this emulator. There are several others out there. Bochs is really good for debugging, but doesn't offer dynamic translation, so it's slow as hell. VirtualPC and VMWare are 2 commercial versions (they run faster than qemu, but cost a fair amount). Plex86 is OSS and fast, but only supports Linux as a guest OS. Xen is another open source one, but it requires that the guest OS be modified to support it. Since we can't legally modify Windows, it's out. So qemu is our only option at this point.
So first I create a 10GB file to use as the virtual hard drive. "qemu-image create -f qcow Win.img 10G" does this on both FreeBSD and Linux. We then insert the WinXP cd into the drive and type "qemu -cdrom /dev/cdrom -boot d Win.img" (-cdrom cd0 in FreeBSD) starts the virtual system, and tells it to boot from the CD. After a brief view of the qemu bios screen, the Windows install screen comes up, and the install proceeds like any other Windows XP install (more smoothly than some). Already, the speed hit is evident though. The test machines are AMD64 3200+ running at 2.2GHz, so a normal XP install goes by pretty quick. The install on the emulator takes significantly longer, but it's not painfully slow.
After the install is complete, I did an install of Office 2000 (Including publisher), Acrobat reader, mcafee anti-virus (which blows), flash and shockwave plugins for IE, and 30+ windows security updates, and probably some things I'm forgetting. Starting up Office is takes a bit, but once running, it's perfectly useable. The total Image size with all this installed is 3.1G.
It's really cool to run Windows in a window, while still being booted into Linux. Plus, this image is totally portable. All qemu installs emulate the exact same hardware, so once a Windows XP install is activated on the emulator, it can be used on any computer. And since it's hosted on Linux, I can create a new image on a test machine, then push it out to every computer on campus overnight. Or copy an clean one to all lab machines to clean them up between semesters.
Ok, so back to FreeBSD vs Gentoo vs Kubuntu. The package management systems used by FreeBSD are impressive. pkg_add gives you the quick installation of binary distributions, while the huge ports tree gives you the flexibility to customize your packages and install those which don't have binary packages. Add in the PCBSD package manager, and you have alternatives to match every need. Add BSD's legendary stability and security and you have a really good system, whether you use it as a Desktop or a server.
This stability does have a downside though. FreeBSD has a much more controlled release cycle. The result is that the kernel and packages are more stable and secure, but they tend to lag behind those available in linux. The ability to run linux programs under FreeBSD using the linux compatibility layer reduces the impact of this, but this doesn't work for drivers. Both Nvidia and ATI release drivers for linux, but only nvidia has any for FreeBSD (and these seem to lag behind those in linux). You will have to live w/o hardware acceleration if you use an ATI card. KDE 3.5 is already available in both Gentoo and Kubuntu, while FreeBSD ports still has 3.4.3 in it.
In conclusion, PC-BSD is a perfectly usable Desktop enviornment giving you plenty of options on how to install stuff, as well as stability and security. If you don't need bleeding edge versions of software, it's a great OS.
qemu is a really cool program allowing you to run an O/S inside another O/S (you can even emulate different hardware, to run MacOS inside Linux or Windows). If you don't mind that it runs about half as fast as a native Windows install, it works great.
I'll write again once I have more experience with FreeBSD and let you know if it will become my new O/S of choice, or if I'll stick with Gentoo as my main desktop.
Matthew
P.S. My name is Brian Rodgers, Matt is a member of a newly formed Linux User Group in Las Vegas New Mexico
Advertisement
Advertisement