Easter 2003: Installation
When partitioning the hard disk for Linux I left one primary slice
of 8 GByte reserved for FreeBSD. FreeBSD needs a
primary partition (called "slice"). Now I installed
FreeBSD 5.0 using a CD distributed with the german
FreeX magazine. It was
just booting off this CD and beginning the installation. The
existing Linux-partitions were left untouched. Partitioning and
newfs were done using the installation tool straight forward.
FreeBSD 5.X is different from 4.X in some parts of the
system. Therefore I wanted to give it a try. One of the features is
ACPI which is supported by the GENERIC-kernel
booted by the CD. The
dmesg shows the
devices ("acpi0" and "acpi_XXXX").
The basic ACPI functions (fan control, battery- and power status)
work. I found this is important because I heard of grilled machines
because of ACPI not working correctly. Also a
shutdown -p now switches the machine off at the end of a
session, and, at the end of the boot process the "power
profile" is changed to "economy". But going into the boot menues
using the keys Fn-F3 or Fn-F5 is not
functional. I did not look for "suspending" the machine, here
(later more about this).
XFree86-Configuration
The
XFree86-configuration
is the same as used in the Debian installation. After the
NVIDIA-XFree driver was installed from the ports and the modules
were loaded I was able to bring up X typing
startx. Therefor I put the following into
/etc/ttys:
ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm on secure
which will start xdm automatically after
booting. Therefor the NVIDIA-module has to be loaded at boot
time which is also done by putting nvidia_load="YES"
into
/boot/loader.conf
Sound
The Kernel recognized the soundcard as "ESS Technology Maestro3"
(pcm0). After loading the kernel modules "snd_maestro3"
and "snd_pcm" I was able to play sounds. Putting
snd_maestro3_load="YES"
into
/boot/loader.conf
does this job during the boot.
Networking
The internal NIC is recognized as xl0 and the the
network is reachable as soon as the card is configured with the
relevant data (IP, gateway etc). This is usually done in
/etc/rc.conf.
PCMCIA/PCCARD
PCMCIA works. I have tested this with a WLAN-card
(DELL TrueMobile 1150 - which is in fact a Prism2 chipset based
Orinoco Gold). The wi0-device was created (FreeBSD 5 uses
a devfs-daemon and I could see signal strength with
several tools. The wireless connection was not configured.
Compiling the Kernel
When a new system is installed, I usually compile a new
machine-adapted kernel. Therefore the
GENERIC-configuration is copied and everything not needed
(SCSI-devices, unused NICs, RAID-controller) is commented out. Here
is the actual configuration.
May-Jun. 2003: Several Updates
I updated the system using cvsup /etc/CVSUP-CONFIG. First
I tried 5.1-CURRENT. But when booting this kernel
I got messages like ACPI-0625: *** Info: GPE Block0 defined as
GPE0 to GPE15. Therefore I changed later to the
RELEASE-tree of FreeBSD 5. Additionally I commented out
all debug options in /etc/make.conf.
Mar. 2004: external USB-harddisk
After I bought an external UFS harddisk (for backup purpose) I
had to decide which filesystem to use: Linux does not understand
UFS and FreeBSD does not really like EXT2/3. So
this disk now contains a VFAT- for changing data with the
M$/Windoze part of the world, one EXT2- and one
UFS-Partition.
umass0: Genesyslogic USB Mass Storage Device, rev 2.00/0.02, addr 2
GEOM: create disk da0 dp=0xc48b5c50
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <WDC WD12 00BB-00FTA0 0811> Fixed Direct Address SCSI-0 device
da0: 1.000MB/s transfers
da0: 114473MB (234441648 512 byte sectors: 255H 63S/T 14593C)
For slicing and partitioning the disk I used
sysinstall. But I had to use newfs in Version 4;
the filesysten produced by the FreeBSD 5 version was not mountable
by my desktop system (currently running FreeBSD 4.9).
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=14593 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=14593 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA))
start 63, size 19551042 (9546 Meg), flag 0
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 131 (0x83),(Linux native)
start 19551105, size 58605120 (28615 Meg), flag 0
beg: cyl 1023/ head 254/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 78156225, size 117210240 (57231 Meg), flag 0
beg: cyl 1023/ head 254/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
<UNUSED>
Important note: do not specify / or any other
important point in the filesystem tree, because sysinstall
directly mounts the new partition and may cover some important
files (e.g. /sbin/mount) our system.
Oct. 2004: Update to 5.2.1
I used cvsup to update to FreeBSD 5.2.1. At the same
time I replaced XFree86 by Xorg 6.7.
Reason was the new licence of XFree86.
Nov. 2004: Update to 5.3-STABLE
FreeBSD 5 is STABLE! Again, I cvsuped
to FreeBSD 5.3-STABLE. Unfortunately PERL was only updated to
5.6.1. So, I have to recompile the system (and all ports depending
on PERL) again.
At the same time I updated the ports. Usually I do this using
portupgrade. Since 5.3-STABLE
gcc version 3.4 is the default compiler. Therefore all
programs should be re-compiled using
portupgrade -afrR
This causes all (-a) ports to be updated if a new
version is found in the ports-tree; -rR does the same with
ports depending on and ports the actual is dependent of. -f
forces the port to be installed even if an older one is still
installed.
WiFi-Card
The WiFi-card I mentioned above is an Orinoci Gold with Intersil
Prism2 chipset which works quite well under Linux and FreeBSD.
wi0: <Dell TrueMobile 1150 Series PC Card> \
at port 0xe000-0xe03f irq 10 function 0 \
config 1 on pccard1
wi0: using Lucent Technologies, WaveLAN/IEEE
wi0: Lucent Firmware: Station (6.10.1)
wi0: Ethernet address: XX:XX:XX:XX:XX:XX
wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
At this point I have to decide, if I want to run this machine
totally on FreeBSD. Before I have to verify some features:
-
fully working WiFi-Card
-
ACPI: "suspend-to-RAM" and "suspend-to-disk" would be nice
-
Possibillity to change the net-environment quickly
Christmas 2004: Complette New Installation
Because FreeBSD 5 is called STABLE now and because Linux seems
become more and more a hype, this seems to be a good point to
change fully to FreeBSD.
Reasons
-
all my other computers are running FreeBSD
-
Gentoo is pretty near to FreeBSD, but even not close
enough.
-
there is time to do it NOW
Partitioning
Maybe, I want to create a Suspend-to-Disk-partition. But I ran
into problems, when I wanted to download the appropriate tool from
DELLs support pages. Here is, what I got, when I tried to enter
DELLs support (using their Service Tag!).
If it's not possible to get the tool, I have to give up this
task.
The 2nd slice will hold the working installation; size around
30GB. Partition table down below.
At the end there will be a slice of around 8.5GB, an old
tradition, which allows me to test another OS:
DragonFly or maybe
Debian GNU/Hurd
becomes usable; really bizzare idea: Windoze. For the first the old
installation has survived, so that I can use configs directly from
there.
I started the installation with booting directly off the first
CD (image downloaded from a mirror of
FreeBSD). Then the whole hard
disk was newly partitioned.
Partitioning Table:
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=77520 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=77520 heads=16 sectors/track=63 (1008 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 6 (0x06),(Primary 'big' DOS (>= 32MB))
start 63, size 1429722 (698 Meg), flag 0
beg: cyl 0/ head 1/ sector 1;
end: cyl 88/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 1429785, size 59295915 (28953 Meg), flag 80 (active)
beg: cyl 89/ head 0/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 60725700, size 17414460 (8503 Meg), flag 0
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
Sysinstall
After labeling and partitioning all needed packages can be
installed, and of course I need the complete source
packages. Afterward the keyboard layout, the main users get
defined, mouse-daemon turned off. Most of the config files
(/etc/X11/Xorg.conf, /etc/rc.conf etc.) are taken
from the old installation. So, I got a working base system very
quickly.
Base config and networking,
/etc/rc.conf
Compiling a new World
Already mentioned before: the first thing I do, when a new
system is installed, I do a recompilation of kernel and
world. Therefore I synchronise the sources first:
cvsup /etc/cvsup.d/stable-supfile
cvsup /etc/cvsup.d/ports-supfile
Now all the sources are up-to-date. Both files are modified
example files taken from /usr/share/examples/cvsup/.
Especially, a cvsup-mirror nearby should be chosen.
Now the show is about to begin (read
/usr/src/UPDATING before!):
cd /usr/src
shutdown now
script /var/tmp/mw-<date>.out
make buildworld
make buildkernel KERNCONF=LAPPY
make installkernel KERNCONF=LAPPY
reboot
shutdown now
make installworld
mergemaster
reboot
The script-instruction collects the output of the
whole process under /var/tmp (don't forget to remove from
time to time). And now a new system is ready to run.
/boot/loader.conf
X.org 6.8.1
To use the touchpad and the USB-mouse in parallel the
mouse-daemon has to be started by putting:
moused_enable="YES"
in /etc/rc.conf. The daemon provides the mouse events
of both devices. In /etc/X11/xorg.conf the device
/dev/sysmouse has to be specified:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
EndSection
Now it is possible to use the mouse wheel of the
USB-mouse. Connecting the mouse after X came up is signaled to the
X-server; the mouse works.
ACPI
I have not really configured ACPI (because I need the data on
the disk at the moment). But I discovered more by accident that
pressing the POWER button shuts down the machine in an ordinary
way. Cool feature!
Port-Installation
After the base system is running, some Packages need to be
installed. Compilation of some port is really time consuming
(Firefox, Thunderbird, OpenOffice, I'm not using one of those
Gnome-/KDE-monsters). At the moment the
following ports are installed
(list created with pkg_version -v).
Feb. 2005: ACPI-Config, first try
After the first success with ACPI
(see here), I looked for some more
informations about the topic: first you should check, if the
DSDT (the hardware description tables) are correct. This can be
done by dumping the table with
Pfau# acpidump> -o dell.dsdt> /dev/null
which now can be disassembled with
Pfau# iasl -d dell.dsdt
and then reassemble again (iasl). Here no error
messages should appear. The output I got:
Pfau# iasl dell.dsl
Intel ACPI Component Architecture
ASL Optimizing Compiler / AML Disassembler \
version 20041119 [Dec 21 2004]
Copyright (C) 2000 - 2004 Intel Corporation
Supports ACPI Specification Revision 2.0c
dell.dsl 697: Method (\_WAK, 1, NotSerialized)
Warning 2026 - ^ Reserved method must \
return a value (_WAK)
ASL Input: dell.dsl - 2845 lines, 82860 bytes, \
1138 keywords
AML Output: DSDT.aml - 10668 bytes 402 named objects \
736 executable opcodes
Compilation complete. 0 Errors, 1 Warnings, 0 Remarks,\
359 Optimizations
Pfau#
The DSDT can be patched, so that you get a corrected version:
Pfau# patch -p0 < dell-dsl.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- dell.dsl.orig Wed May 14 02:07:27 2003
|+++ dell.dsl Tue May 27 22:18:14 2003
--------------------------
Patching file dell.dsl using Plan A...
Hunk #1 succeeded at 120.
Hunk #2 succeeded at 133.
Hunk #3 succeeded at 153.
Hunk #4 succeeded at 217.
Hunk #5 succeeded at 238.
Hunk #6 succeeded at 277.
done
Pfau#
which now can be recompiled:
Pfau# iasl dell.dsl
Intel ACPI Component Architecture
ASL Optimizing Compiler / AML Disassembler \
version 20041119 [Dec 21 2004]
Copyright (C) 2000 - 2004 Intel Corporation
Supports ACPI Specification Revision 2.0c
dell.dsl 697: Method (\_WAK, 1, NotSerialized)
Warning 2026 - ^ Reserved method \
must return a value (_WAK)
ASL Input: dell.dsl - 2845 lines, 82944 bytes, \
1148 keywords
AML Output: DSDT.aml - 10678 bytes 402 named objects \
746 executable opcodes
Compilation complete. 0 Errors, 1 Warnings, 0 Remarks, \
359 Optimizations
Pfau#
In this case this patch has not changed anything.
A corrected version in ASL (ACPI Source Language) can be found
on
http://acpi.sourceforge.net/. It
can be loaded during the boot process. Therefore an AML-file (ACPI
Machine Language) has to be created with:
iasl Dell_I8100_A15_custom.asl
/boot/loader.conf
because no output name is given the default is used:
DSDT.aml, which I stored in /boot/dsdt/. Loading
is caused by putting
acpi_dsdt_load="YES"
acpi_dsdt_name="/boot/dsdt/DSDT.aml"
in
/boot/loader.conf
That worked after the second attempt (the first went wrong and I
was happy to have a FreeSBIE-CD
ready).
During the boot procedure loading the new DSDT is
indicated:
ACPI: overriding DSDT/SSDT with custom table
ACPI-0377: *** Info: Table [DSDT] replaced by host OS
Besides a slightly longer boot procedure the soundcard now is
not recognized correctly any more:
pcm0: <ESS Technology Maestro3> port 0xec00-0xecff \
mem 0xf8ffe000-0xf8ffffff irq 5 at device 3.0 on pci2
pcm0: failed: rid 0x10 is ioport, requested 3
pcm0: [GIANT-LOCKED]
pcm0: <SigmaTel STAC9721/23 AC97 Codec>
and because of this, no music any more. But even
before the soundcard had some
trouble. The conclusion: ACPI and sound interfere here.
The new DSDT has not changed the behaviour in response to the
Suspend (<Fn>-<Suspend>): the machine still does not go
into a sleep state: the keyboard does not work, the console is dead
but still there and the "Power"-LED is blinking. Because the above
described reaction to pressing the "Power"-button still works the
machine can be switched off in a controlled manner. So, changing
the DSDT didn't bring any advantages and therefore loading a custum
DSDT is deactivated again.
March 2005: System Tuning
During easter this year I found some time to tune the laptop's
system a little bit - especially with respect to security.
What I did:
-
Using blowfish hashes in /etc/master.passwd
-
Putting /tmp into RAM I ran into the problem, that the
directory /tmp/.ICE-unix/ could not be created during the
start of Xfce4; so I found myself
facing the XDM-Login again. As a work-around I use sudo to
create it in my ~/.xsession.
-
Some new options in the kernel config:
-
Use the same make-options as for the system:
makeoptions COPTFLAGS="-O2 -pipe -funroll-loops -ffast-math"
-
the kernel still was configured for NFS. In the near future
the laptop will be a travel machine - so no need for this:
#options NFSCLIENT #Network Filesystem Client
#options NFSSERVER #Network Filesystem Server
#options NFS_ROOT #NFS usable as root device, requires NFS
-
for experimenting with Mandatory Access Control (MAC) I
need the corresponding option:
options MAC
The features now can be switched on by
kldload mac_seeotheruids
or automatically by an entry in
/boot/loader.conf
June 2005: Battery dying?
One or both batteries seem to be dying: the load status
suddenly jumps to very low status, when working on battery (see
plots below):
Literature and some Links
Books
- Greg Lehey, "The Complete FreeBSD", 4th Edition, O'Reilly
- Michael Lukas, "Absolute BSD: The ultimate Guide to FreeBSD"
- Dru Lavigne, "BSD Hacks", 1.Auflage (deutsche Ausgabe), O'Reilly
in german only at the moment
Some Usefull Links
Some links, where I got my information from:
Files
Technical Data:
- Mobile Pentium III 1000 MHz
- 512 MB SDRAM
- Intel Corp. 82820 820 (Camino 2) Chipset PCI (-M) (rev 03)
- 40 GB IBM IDE harddisk (HITACHI_DK23DA-40)
- 15" UXGA LCD Display (1600x1200)
- 32 MB nVidia GeForce2 Go
- 8x DVD Toshiba (TOSHIBA DVD-ROM SD-C2502)
- ESS Maestro 3i Sound Card
- 3Com PCI 3c556 Laptop Tornado Vers LK1.1.16
- Texas Instruments CardBus Controller
- Texas Instruments IEEE1394 (FireWire) controller
- SMC Fast-IR controller
- BIOS version: A15
- additional:
- Logitech Mouseman Traveler opt. USB-Mouse
- DELL True Mobile 1150 Series WiFi-Card
- HAMA PCMCIA-Flash-Card-Adapter
- USB-Stick: PNY Technologies
|