Acer Aspire 9412ZWSMi
FreeBSD 7.2-RELEASE
I've talked about my laptop before; I made it dualboot Windows Vista and Mandriva 2007 Spring then.
By now I've reached the conclusion I don't use Vista anyway, so I wanted to use the diskspace for fun things. Also my Mandriva installation had become a bit messy because it ran both KDE3 and KDE4 applications.
So, time for a new installation. And because I actually like FreeBSD more than I like Linux, I chose FreeBSD; I always install FreeBSD at the servers I install, and in the past I've also used FreeBSD on the desktop; lately I've been wondering more and more why I ever switched to Mandriva.
So… Here we go again…
- First this
- Second this
- The choices
- The hardware (overview)
- The preparations
- Installing FreeBSD
- Finishing
- Installing software
- Boot menu
- Network
- Wireless
- KDE
- Synaptics TouchPad
- Sound
- DVD player/writer
- Modem
- Extra keys
- Camera
- Card reader
- Firefox
- Running Vista anyway
First this
No warranty.
Own risk.
Author: Rob la Lau <rob[at]nerdstock.org>
Second this
FreeBSD is not for sissies. Nor is it for newbies.
Don't get me wrong: I'm not saying newbies are sissies; I was a newbie once, and I haven't forgotten, which is why I think you should listen to my advice (well, this one specifically, maybe not all… ;) ).
If this is your first experiment with Unix-like systems, do yourself a favour and select a user-friendly Linux distribution (Kubuntu, Mandriva, openSUSE, Fedora or one of the many others). If you don't, the difference between what your used to working with and FreeBSD may be too big, and you might lose interest. We (as in 'we FreeBSD users', if I may speak on behalf of 'the FreeBSD users') would rather see you leave to use Linux than to use Windows (and that's not because we are anti-Windows, but because we know what's stable and secure).
If you have some Linux, BSD or Unix experience: please, read on.
The choices
Read about the choices on the Acer/Vista/Mandriva page.
The hardware
| part | type | works | notes |
|---|---|---|---|
| processor | Intel Pentium dual-core processor T2060 (1.60 GHz, 533 MHz FSB, 1 MB L2 cache) | + | |
| memory | 1 GB DDR2 533 MHz | + | |
| hard disk | 80 GB Hitachi HTS541680J9SA00 ATA | + | |
| dvd | Optiarc DVD RW AD-7530A ATA | ? | --> click <-- |
| display | 17" WXGA+ Acer CrystalBrite LCD | + | --> click <-- |
| display adapter | Mobile Intel 945GM Express | --> click <-- | |
| sound | Intel High Definition Audio | + | --> click <-- |
| card reader | Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD) | ? | --> click <-- |
| camera | Acer OrbiCam 1.3/0,31 megapixel (manufacturer: Bison ?) | ? | --> click <-- |
| LAN | Realtek RTL8168/8111 Family PCI-E Gigabit Ethernet NIC | + | |
| WLAN | Intel PRO/Wireless 3945ABG | + | --> click <-- |
| modem | Agere Systems HDA modem | ? | --> click <-- |
| PCMCIA | Texas Instruments PCIxx12 Cardbus Controller | ? | |
| mouse | Synaptics PS/2 Port TouchPad | + | --> click <-- |
| extra keys | ? | ? | --> click <-- |
The preparations
Since we decided to only use FreeBSD, there's not much preparation involved.
To be on the safe side, create a Knoppix CD; this might come in handy (or maybe better: TrueBSD, but I've never tried that one myself).
Also, since we're going to install FreeBSD, you may want to download and burn a an installation CD or DVD; after following that link, click the latest ISO link for your architecture (if you don't know what your architecture is, it's probably i386) and download 1 or more ISOs. If the pc-to-be-installed will have internet acces during the installation, select the bootonly image; if not, select the disc1/disc2/disc3 ISOs to install from CDs, or the dvd1 ISO to install from DVD.
In this manual I will be using the bootonly image; the only real difference with the other images is that this installation will download the system from the internet, while the CD and DVD installations won't.
Create backups
Backup everything you want to keep. If you previously had Linux installed, don't forget the hidden directories like ~/.ssh, ~/.kde, etcetera; if you previously had Windows installed, you may wish to backup things like your Firefox profile.
Partitioning
Since we decided to only use FreeBSD, we don't need to shrink any partitions.
If you'd like your laptop/pc to be dualboot, you may wish to read my Acer/Vista/Mandriva page and the FreeBSD handbook page on 'Allocating disk space' (but don't worry about the actual partitioning yet, because that's part of the installation).
Installing FreeBSD
The installation of FreeBSD is not a no-brainer like a Windows or Linux installation.
I'd advise you to read Installing FreeBSD chapter of the FreeBSD handbook, because I won't go into all the details of the installation.
If you're installing from the internet (like I am), make sure your ethernet cable is plugged in; you won't have wireless support during the installation.
When you boot your system from CD (edit your BIOS config if your system won't boot from CD), you will first be presented with a menu where you select your location; after that you're asked to select the keyboard you use (select USA ISO if you don't know what to select).
Then the real installation procedure starts.
There are 2 options I'd like you to select before proceding: Usage and Doc -> Errata; there are more options you should select, but those are the most important ones. After that, go back to the main menu by selecting Exit. Back in the main menu, select Options; the most important option here is Media Type; select this option and follow the instructions. Hit Q (or q) when you're done in the Options Editor.
Now select Express.
First you'll be asked to partition your disk. Remove all the partitions except the one that has Compaq Diagnostic as it's description; this is the 'hidden' Vista recovery partition. We may like to use this in the future.
After you've created space, hit C to create a new partition (called 'slice' in FreeBSD); use the size the partition editor suggests (which is all the remaining space). Hit Q when you're done.
You are now asked whether you'd like to install the FreeBSD Boot Manager; you do.
The next screen allows you to cut up the slice into partitions (FreeBSD kind of creates partitions inside partitions).
Hit A to have sysinstall suggest a partitioning scheme, and then adjust that to taste; 1Gb for the root filesystem (/) is more than enough, and the swap space should be about 2-2.5 times the size of your RAM. If you wish to create a separate partition for the home directories (which may be a good idea), note that the home directories are located under /usr/home on FreeBSD; /home is only a link to /usr/home.
Once your done partitioning the disk, you'll be asked to select 'distribution sets' to install. First select Minimal, then select Custom. You'll notice that base and kernels are selected; these make up the Minimal installation. Now add info, man and ports and select src; this will bring you to a menu where you select base, bin, sbin and sys.
Now select Exit until the installation starts.
After the installation completes, you'll be asked whether you'd like to make some post-installation settings (or similar wording); again, you do.
Make sure to at least set a root password, and create a user account for yourself; make sure you're in group wheel, because only users in that group may use su to become root; a group with the same name as the user will automatically be created.
When you reboot the laptop, one of the first things you'll see, is a tiny menu that looks like
F1 ? F2 FreeBSDThis is the FreeBSD Boot Manager; hit F2 to boot FreeBSD; the F1 option will start Vista recovery.
Finishing
There are 3 commands you'll be using quite often when trying to find the support for your hardware:
dmesg
Displays kernel messages.
A snapshot of thedmesgoutput right after boot is saved to/var/run/dmesg.boot, should you ever want to see which devices are recognized at boot time.pciconf -lv
Displays a list of all PCI devices, even the unrecognized ones.lshal
Displays a list of all devices recognized byhald, the Hardware Abstraction Layer.
less (dmesg | less and pciconf -lv | less and lshal | less, respectively; hit q to exit less).
Installing software
You'll be installing software from 'packages' or 'ports' (read more about it here).
My preferred method is the Ports Collection.
To use the ports collection, we'll have to make some preparations: the ports collection should be up-to-date.
To update the ports collection, we use cvsup; this is not installed by default, so we'll install it (from the ports collection). This is also a good example of how to install applications from the ports collection.
root@laptop# cd /usr/ports/net/cvsup-without-gui root@laptop# make install clean…
Yes, that was all; that wasn't too hard, was it? ;)
Now that cvsup is installed, we need a configuration file to tell cvsup where to update what.
root@laptop# mkdir ~/cvsup root@laptop# cp /usr/share/examples/cvsup/ports-supfile ~/cvsup/portsNow open
~/cvsup/ports in a text editor and change the string CHANGE_THIS to the name of a cvsup mirror found here.YourFavoriteEditor™ is probably not installed yet, so here is how to do it in
vi, which is installed.Suppose you live in the Netherlands, and you found the name of a dutch mirror is
cvsup.nl.freebsd.org.
- execute the command
vi ~/cvsup/ports - type
/CHANGE_THIS(slash means 'find' invi) - type
n('n' means 'find next' invi; we need the second occurrence) - the cursor is now on the 'C' in 'CHANGE_THIS'
- type
cw(which means 'change word') and then type 'cvsup.nl' - hit Escape (which means 'done editing')
- type
:wq!('write and quit')
vi to edit a file; some day you may become a real sysadmin… ;)(If you're a FreeBSD developer: before the installation starts I need to select the country I'm in; then how come I need to manually edit this file?)
The configuration file may now be used to update the ports collection:
root@laptop# /usr/local/bin/cvsup -g -L 2 ~/cvsup/portsMake a habbit of always executing this command before you install or update something from the ports collection.
If you do this regularly, it will never take as long as it does the first time you execute it; you could even make it a cronjob.
Now that your ports collection is up-to-date, you can go wild, and install anything you like.
This is simply a matter of going to the desired directory under /usr/ports and typing make install clean.
To find a specific application, type cd /usr/ports and then make search name="bla" (to find 'bla' in the name of the port) or make search key="bla" (to find 'bla' in the name or description of the port).
Of course, you need to be root to install applications.
For instructions on installing KDE, see below.
If you should ever run low on disk space, you may wish to
root@laptop# rm /usr/ports/distfiles/*This will delete all the downloaded software (without removing the installed software, of course).
Boot menu
Actually, with the setup above, there will be 2 boot menus (as you've seen by now): the first menu will ask which slice you wish to boot from (the first slice is Vista recovery, the second is FreeBSD), the second menu will ask how you wish to boot FreeBSD.
Since the default option for the first menu is F1 (Vista recovery), we'll change this first:
root@laptop# boot0cfg -s 2 ad0This will make the second slice (FreeBSD) the default, enabling you to boot your pc and walk away.
The second menu you'll see when booting into FreeBSD asks how you wish to FreeBSD; by default it will wait for a reply for 10 seconds and then boot the default system.
Since we'll usually wish to boot into the default system, there's no need to wait for 10 seconds.
Edit /boot/loader.conf and add
# Minimize boot delay autoboot_delay="2"This will make the system wait for 2 seconds instead of 10, which will give us plenty of time if we ever need to boot in single user mode.
An alternative would be to set
autoboot_delay="-1", completely disabling the menu, and set it to a higher value if we need to reboot into single user; this would, however, create a problem if we need to boot into single user because the system won't boot.
Network
Since this is a laptop, we use routed instead of setting a default route.
Edit /etc/rc.conf and make sure defaultrouter is not set, and that the file contains a line saying router_enable="YES"; this makes sure the default gateway is automatically set, depending on the network the laptop is connected to.
To have an IP address assigned automatically (the router must have a DHCP server enabled), add the next line to /etc/rc.conf:
ifconfig_re0="DHCP"To set a static IP address (you must know the IP address and the netmask), add this line to
/etc/rc.conf instead:
ifconfig_re0="inet AAA.BBB.CCC.DDD netmask ZZZ.YYY.XXX.WWW"where you replace
AAA.BBB.CCC.DDD with the IP address, and ZZZ.YYY.XXX.WWW with the netmask.
For the configuration of wireless network, see the next section.
Wireless
I assume you have configured your wireless router to encrypt the connection using WPA2-Personal (WPA with pre-shared key), and that your router will hand out IP addresses via DHCP. At least, that's what my setup looks like, so that's what I'll document here.
First, log in to your router via it's web or telnet interface, and write down the SSID (network name), the MAC address for it's LAN interface, and the pre-shared key (password). After that, you may log out again.
Create the file /etc/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
fast_reauth=1
network={
ssid="MyNet"
disabled=0
bssid=AA:BB:CC:DD:EE:FF
scan_ssid=1
psk="MyPassword"
key_mgmt=WPA-PSK
}
Where you substitute MyNet with the SSID, AA:BB:CC:DD:EE:FF with the MAC address, and MyPassword with the password.You can add multiple
network={…} blocks for different networks.Make sure the directory
/var/run/wpa_supplicant exists.
Add these lines to /boot/loader.conf:
# Wireless driver (see `man wpi') if_wpi_load="YES" legal.intel_wpi.license_ack=1The second line means you agree to the firmware license which, according to the documentation, should be located at
/usr/share/doc/legal/intel_wpi/LICENSE; you won't find it there, but you will find it at /usr/src/sys/contrib/dev/wpi/LICENSE; make sure you read it, because it's pretty stupid to agree to a license you haven't read.
Finally, add this line to /etc/rc.conf:
ifconfig_wpi0="WPA DHCP"and execute
root@laptop# /etc/rc.d/netif restartYou should now be able to browse the wireless network.
Update:
With the above settings, the card works fine when I'm 'sitting on the router'. However, when I'm in my office on the third floor (with the router at the first floor), the speed drops to 1-2Mbps. I have now changed my /etc/rc.conf to
ifconfig_wpi0="WPA DHCP mode 11g mtu 1500 -powersave txpower 50 protmode cts media OFDM36"This seems to help a little.
For more information, see the manpages for wpi(4), ifconfig(8), and the OpenBSD manpage for ifmedia(4) (which I think should be included in FreeBSD as well).
I've read somewhere that installing new firmware might help even more; if and when I do, I'll update this page.
Another update:
I managed to build a kernel module for a newer version of the firmware for the wireless card. I documented this on a separate page (which hopefully makes it better to find for search engines).
KDE
We now have a laptop with a running FreeBSD system installed and networking configured, but chances are we want to use a graphic user interface; after all, this is a laptop and not a server.
My desktop environment of choice is KDE, but I guess the installation of Gnome shouldn't be too different; my last experience with other desktop environments and window managers was about 10 years ago, so I can't comment on that.
To compile and install KDE4 took about 2 days on my laptop, so make sure you place the computer somewhere where it's not in the way, but also make sure you can easily reach it, because during the installation you will be presented with menus every now and then to make selections for components you do or do not want installed.
I will not go into these selections here, because there are many; if you're not sure what to select, try typing it into your favorite search engine, or leave the defaults untouched.
First make sure X.org is installed; for some reason both the KDE and Gnome ports don't depend on the X.org port, while they do need it.
root@laptop# cd /usr/ports/x11/xorg root@laptop# make install clean
After X.org has been installed, it's time to install KDE; my choice was to only install KDE4 and KDE4 applications, because that's the current version.
root@laptop# cd /usr/ports/x11/kde4 root@laptop# make install cleanThis will install the complete KDE4 and all required dependencies.
To have the KDE login manager start when you boot the computer, add these lines to /etc/rc.conf:
kdm4_enable="YES"
local_startup="${local_startup} /usr/local/kde4/etc/rc.d"
Also add the KDE binaries directory to the path for each user: edit /home/*/.bashrc and add this line:
export PATH="${PATH}:/usr/local/kde4/bin"
and edit /home/*/.cshrc and add this line:
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin /usr/local/kde4/bin)This way you can be sure the KDE4 applications can always be found by the system.
Unfortunately you can't always tell by the names of ports whether they were written for KDE3 or KDE4. So if you, just like me, only want to install ports that were created for KDE4, you'll have to check the Makefile for the port to see which KDE and/or QT version it needs, e.g.:
root@laptop# grep 'USE_.*_VER' /usr/ports/deskutils/karamba/Makefile USE_KDELIBS_VER=3I won't install
/usr/ports/deskutils/karamba, because it depends on the KDE3 libraries.
root@laptop# grep 'USE_.*_VER' /usr/ports/deskutils/kuake/Makefile USE_KDEBASE_VER=3No, won't install
kuake either.
root@laptop# grep 'USE_.*_VER' /usr/ports/devel/kaptain/Makefile USE_QT_VER= 3Nope.
…
Etcetera.
Synaptics TouchPad
By default, the TouchPad is recognized as a regular 3-button mouse. However, TouchPad support is included; you only need to enable it.
To do this, add this to /boot/loader.conf:
# Synaptics TouchPad hw.psm.synaptics_support="1"And this to
/etc/rc.conf:
moused_enable="YES"After a reboot, your TouchPad will be recognized as a TouchPad (which doesn't actually make a lot of difference, yet, although the '2-finger-click' is really cool).
To add some more functionality, see the next section.
X.org configuration
First this:
Somewhere between installing FreeBSD and writing this manual, my system decided to load the kernel modules i915 and drm; judging by the names, I think these modules are both used for the display and display adapter, but because neither have a manpage, I can't be sure.
I don't know how these modules got loaded, I didn't configure it, but today is the first time I see this; strange things may happen when you're experimenting…
This means there may be a gap in this manual.
If things don't work for you, execute kldstat and if you don't see those 2 modules, try adding these lines to /boot/loader.conf and reboot:
i915_load="YES" drm_load="YES"You may need to install
/usr/ports/sysutils/915resolution and /usr/ports/graphics/libdrm for this to work; I did install 915resolution during my experiments, but libdrm was installed as a dependency for some other ports…
X runs fine without a configuration file, but to finetune it (and to add extra functionality for the TouchPad) we need /usr/local/etc/X11/xorg.conf.
X.org can be instructed to generate an initial configuration file, but this can only be done when X is not running: save all your work and execute /usr/local/kde4/etc/rc.d/kdm4 stop; you will be dropped to a console.
Don't pay any attention to all the messages you see, just hit Alt-F2 to go to the second virtual terminal, log into your account and use su to become root. Then
root@laptop# cd root@laptop# Xorg -configure root@laptop# Xorg -config ./xorg.conf.new -retroThis will generate a default configuration and start X.org in test mode. If it looks good (a grey-ish background which looks like a cloth when you look close, and a black cross for the cursor, and your mouse works), hit
Ctrl-Alt-F2 to return to the second virtual console and hit Ctrl-C to exit Xorg.Now this new configuration must be installed. For some reason FreeBSD has 2 locations for X.org configuration:
/etc/X11/ and /usr/local/etc/X11/ of which the former is empty.
root@laptop# rmdir /etc/X11 root@laptop# ln -s /usr/local/etc/X11 /etc root@laptop# cp ~/xorg.conf.new /usr/local/etc/X11/xorg.conf
Start kdm again by executing /usr/local/kde4/etc/rc.d/kdm4 start. When kdm is started, hit Ctrl-Alt-F2 to return to the console and log out; hit Alt-F9 to return to the KDE login manager and log in.
After logging in, open /var/log/Xorg.0.log and check whether
- the correct configuration file was used
- any errors occurred (
EE) - any warnings were issued (
WW)
The TouchPad now works like it did before you created xorg.conf (I just noticed the scroll button between the 2 mouse buttons works; I don't know whether it did before, I never use it).
…
And now things get fuzzy…
According to this page I should now be able to finetune my Touchpad using some sysctl variables, but unfortunately
root@laptop# sysctl hw.psm.synaptics.vscroll_hor_area=1300 sysctl: unknown oid 'hw.psm.synaptics.vscroll_hor_area'Some other solutiuon I read about is using the
synaptics driver for X.org, but this requires disabling moused, leaving me without a mouse in the console.
I think I'll just leave the TouchPad alone for now, and return to this later.
Should this work? Yes. Should it take this much time to have it configured? No.
Isn't it strange that, although desktop environments like KDE and Gnome can use hald to generate a default configuration, there are no tools to export this configuration to an xorg.conf that can then be finetuned?
Sound
Sound support is a matter of loading 1 kernel module. Add this to /boot/loader.conf:
# Sound driver snd_hda_load="YES"This will load the sound driver at boot time.
If you haven't set a securelevel (which I think you should), you can now load the sound driver with the command
kldload snd_hda; otherwise you'll have to reboot.
DVD player/writer
I haven't really tested this, yet.
I can see the DVD player is recognized by the kernel (dmesg), but when I put in a DVD, it doesn't play. The KDE 'auto-do-something-when-some-media-is-inserted-thingy' does show there was some media inserted, but selecting DragonPlayer just displays an empty window.
Since I own only 3 DVDs, this doesn't really have priority for me.
I haven't tried using K3B, yet.
Update to follow.
Tips are welcomed.
Modem
TODO
Untested:
root@laptop# cd /usr/ports/comms/ltmdm root@laptop# make install clean root@laptop# kldload ltmdm
Extra keys
TODO
Some findings so far:
- the 'volume up' (
Fn-ArrowUp) and 'volume down' (Fn-ArrowDown) buttons crash KMix - the 'wireless on/off' toggle switch doesn't do anything
- the 'Bluetooth on/off' toggle switch is useless anyway, because there's no Bluetooth module in the laptop
Update to follow.
Camera
TODO
(Damn me… I had this working under Linux, but forgot to document it…)
Tips are welcomed.
Card reader
TODO
I don't have this working, yet, but I know of at least 3 kernel modules I need; add these lines to /boot/loader.conf:
# Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD). sdhci_load="YES" mmc_load="YES" mmcsd_load="YES"Then check
pciconf -lv.
Tips are welcomed.
Firefox
Firefox needs a kernel module to be installed. From the install docs:
Firefox 3.5 and HTML5 Certain functions used to display HTML5 elements need the sem module. If your Firefox crashes with the following message while viewing a HTML5 page: "Bad system call (core dumped)" you need to load the sem module (kldload sem). To load sem on every boot put the following into your /boot/loader.conf: sem_load="YES"
Running Vista anyway
TODO
(If I find the time, I'd like to try and transfer the data on the 'hidden' Vista recovery partition to a virtual machine to install it there.)
Tips are welcomed.
| Responses are welcomed: rob[at]nerdstock.org |
![]() http://creativecommons.org/licenses/by-nc-sa/3.0/nl/deed.en |
|
| Permission is hereby granted to Acer Inc. (the manufacturer of my laptop) to copy, distribute and display this documentation, as well as to make derivative works, provided that name ('Rob la Lau'), email ('rob[at]nerdstock.org') and website ('http://nerdstock.org/acer_freebsd') of the author are mentioned in those works as being the original source. |
||







