ASRock M3A UCC - FreeBSD

Hardware info on main page.

Test machine, runs the amd64 version of FreeBSD.

Current storage New SSD (Kingston 120GB, ada0)

$ gpart show -p ada0
=>       40  234441568    ada0  GPT  (112G)
         40       1024  ada0p1  freebsd-boot  (512K)
       1064   62914560  ada0p2  freebsd-ufs  (30G)  FreeBSD 12.0-release
   62915624   16777216  ada0p3  freebsd-swap  (8.0G)
   79692840  154748768          - free -  (74G)

old info: this machine is my MythTV backend, and runs the amd64 version of FreeBSD.

Currently, slice 2 is used for "production".

Note: slice 2 is currently using the external network card (xl0: <3Com 3c905B-TX Fast Etherlink XL>) because the built-in one isn't supported by FreeBSD 6.4-stable.

New hard drive: The first PATA hard drive (ad0 - WDC WD3200AAJB - 320 GB) is sliced up as follows:

slice 1 - 80 GB - FreeBSD 6.2-stable
slice 2 - 80 GB - FreeBSD 6.4-stable (RELENG_6)
slice 3 - 80 GB - FreeBSD 7.4-stable (RELENG_7)
slice 4 - 58 GB - FreeBSD 8.2-stable (RELENG_8)

Old hard drive: The first PATA hard drive (ad0 - Samsung SP0822N - 80 GB) was sliced up as follows:

slice 1 - 18 GB - FreeBSD 6.2-stable
slice 2 - 18 GB - FreeBSD 8.1-prerelease (RELENG_8)
slice 3 - 18 GB - FreeBSD 7.2-stable (RELENG_7)
slice 4 - xx GB -

data hard drives mirror one:

root@kg-fil# gmirror status store2
         Name    Status  Components
mirror/store2  COMPLETE  ad4
                         ad6
root@kg-fil# dmesg | grep ad[46]:
ad4: 953869MB <SAMSUNG HD103UJ 1AA01118> at ata2-master SATA300
ad6: 953869MB <SAMSUNG HD103UJ 1AA01118> at ata3-master SATA300

mirror two:

Work log

2019-07-07: ada0p2 - add my user to the video group

root@kg-ucc# pw groupmod video -m tingo
root@kg-ucc# pw groupshow video
video:*:44:tingo

ok. Without nv driver - no change. With nv driver - no change, and the log file says

[  4804.864] (EE) NV: The PCI device 0x10de0161 (GeForce 6200 TurboCache(TM)) at 01@00:00:0 has a kernel module claiming it.
[  4804.864] (EE) NV: This driver cannot operate until it has been unloaded.
[  4804.864] (EE) open /dev/dri/card0: No such file or directory
[  4804.864] (WW) Falling back to old probe method for modesetting
[  4804.864] (EE) open /dev/dri/card0: No such file or directory
[  4804.864] vesa: Ignoring device with a bound kernel driver
[  4804.864] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  4804.864] (EE) Screen 0 deleted because of no matching config section.
[  4804.864] (II) UnloadModule: "modesetting"
[  4804.864] (EE) Screen 0 deleted because of no matching config section.
[  4804.864] (II) UnloadModule: "vesa"
[  4804.864] (EE) Device(s) detected, but none match those in the config file.
[  4804.864] (EE)
Fatal server error:
[  4804.864] (EE) no screens found(EE)

meh.

2019-07-07: ada0p2 - pkg - remove nv driver

Jul  7 10:42:16 kg-ucc pkg[1745]: xf86-video-nv-2.1.21_3 deinstalled

and disable the config file

root@kg-ucc# ll /usr/local/etc/X11/xorg.conf.d/
total 16
drwxr-xr-x  2 root  wheel  512 Jul  7 10:43 ./
drwxr-xr-x  4 root  wheel  512 Jul  7 09:59 ../
-rw-r--r--  1 root  wheel   71 Jul  7 10:34 driver-nv.conf_disabled
-rw-r--r--  1 root  wheel  137 Jul  7 10:07 keyboard-no.conf

but Xorg still doesn't work. From the Xorg.0.log file

[  3634.520] (II) LoadModule: "vesa"
[  3634.520] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[  3634.520] (II) Module vesa: vendor="X.Org Foundation"
[  3634.520]    compiled for 1.18.4, module version = 2.4.0
[  3634.520]    Module class: X.Org Video Driver
[  3634.520]    ABI class: X.Org Video Driver, version 20.0
[  3634.520] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  3634.520] (II) VESA: driver for VESA chipsets: vesa
[  3634.520] (--) Using syscons driver with X support (version 2.0)
[  3634.520] (--) using VT number 9

[  3634.557] (EE) open /dev/dri/card0: No such file or directory
[  3634.557] (WW) Falling back to old probe method for modesetting
[  3634.557] (EE) open /dev/dri/card0: No such file or directory
[  3634.557] vesa: Ignoring device with a bound kernel driver
[  3634.557] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  3634.557] (EE) Screen 0 deleted because of no matching config section.
[  3634.557] (II) UnloadModule: "modesetting"
[  3634.557] (EE) Screen 0 deleted because of no matching config section.
[  3634.557] (II) UnloadModule: "vesa"
[  3634.557] (EE) Device(s) detected, but none match those in the config file.
[  3634.557] (EE)
Fatal server error:
[  3634.557] (EE) no screens found(EE)

hmm... maybe my user needs to be a member of the video group?

2019-07-07: ada0p2 - Xorg - create a config file for nv

root@kg-ucc# cat /usr/local/etc/X11/xorg.conf.d/driver-nv.conf
Section "Device"
    Identifier "Card0"
    Driver     "nv"
EndSection

test startx again - nope the same problem

2019-07-07: ada0p2 - Xorg - 'startx' fails, leving this error in /var/log/Xorg.0.log

[  1724.973] (EE) NV: The PCI device 0x10de0161 (GeForce 6200 TurboCache(TM)) at 01@00:00:0 has a kernel module claiming it.
[  1724.973] (EE) NV: This driver cannot operate until it has been unloaded.

I also see this

[  1724.973] vesa: Ignoring device with a bound kernel driver

and

[  1724.973] (EE) Screen 0 deleted because of no matching config section.
[  1724.973] (II) UnloadModule: "modesetting"
[  1724.973] (EE) Screen 0 deleted because of no matching config section.
[  1724.973] (II) UnloadModule: "vesa"
[  1724.973] (EE) Device(s) detected, but none match those in the config file.

maybe I need a config file

2019-07-07: ada0p2 - Xorg - create a keyboard layout file

root@kg-ucc# more /usr/local/etc/X11/xorg.conf.d/keyboard-no.conf
Section "InputClass"
        Identifier "keyboard defaults"
        MatchIsKeyboard "on"
        Option      "XkbLayout" "no"
EndSection

ok

2019-07-07: ada0p2 - pkg - install Xorg and other necessary packages

Jul  7 09:58:37 kg-ucc pkg[1046]: xorgproto-2019.1 installed
Jul  7 09:58:37 kg-ucc pkg[1046]: libXdmcp-1.1.3 installed
Jul  7 09:58:37 kg-ucc pkg[1046]: libXau-1.0.9 installed
Jul  7 09:58:37 kg-ucc pkg[1046]: libxml2-2.9.9 installed
Jul  7 09:58:37 kg-ucc pkg[1046]: libpthread-stubs-0.4 installed
Jul  7 09:58:38 kg-ucc pkg[1046]: libxcb-1.13.1 installed
Jul  7 09:58:39 kg-ucc pkg[1046]: libX11-1.6.8,1 installed
Jul  7 09:58:39 kg-ucc pkg[1046]: indexinfo-0.3.1 installed
Jul  7 09:58:39 kg-ucc pkg[1046]: pciids-20190620 installed
Jul  7 09:58:39 kg-ucc pkg[1046]: libXext-1.3.4,1 installed
Jul  7 09:58:39 kg-ucc pkg[1046]: libXfixes-5.0.3_2 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: expat-2.2.6_1 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libffi-3.2.1_3 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libepoll-shim-0.0.20190311 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libpciaccess-0.14 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: readline-8.0.0 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: gettext-runtime-0.20.1 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libICE-1.0.9_3,1 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libxshmfence-1.3 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libXxf86vm-1.1.4_3 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libXdamage-1.1.5 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: wayland-1.16.0_1 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libdrm-2.4.98_1,1 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libunwind-20170615 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libXv-1.0.11_2,1 installed
Jul  7 09:58:40 kg-ucc pkg[1046]: libXrender-0.9.10_2 installed
Jul  7 09:58:44 kg-ucc pkg[1046]: python27-2.7.16_1 installed
Jul  7 09:58:50 kg-ucc pkg[1046]: perl5-5.28.2 installed
Jul  7 09:58:51 kg-ucc pkg[1046]: libedit-3.1.20190324,1 installed
Jul  7 09:58:51 kg-ucc pkg[1046]: libSM-1.2.3,1 installed
Jul  7 09:58:51 kg-ucc pkg[1046]: libxkbfile-1.1.0 installed
Jul  7 09:58:51 kg-ucc pkg[1046]: libfontenc-1.1.4 installed
Jul  7 09:58:51 kg-ucc pkg[1046]: freetype2-2.10.0 installed
Jul  7 09:58:51 kg-ucc pkg[1046]: mesa-libs-18.3.2_1 installed
Jul  7 09:58:51 kg-ucc pkg[1046]: libXvMC-1.0.11 installed
Jul  7 09:58:51 kg-ucc pkg[1046]: libXrandr-1.5.2 installed
Jul  7 09:59:12 kg-ucc pkg[1046]: llvm80-8.0.0_2 installed
Jul  7 09:59:12 kg-ucc pkg[1046]: libXt-1.2.0,1 installed
Jul  7 09:59:12 kg-ucc pkg[1046]: xkeyboard-config-2.27 installed
Jul  7 09:59:12 kg-ucc pkg[1046]: xkbcomp-1.4.2 installed
Jul  7 09:59:12 kg-ucc pkg[1046]: pixman-0.34.0_1 installed
Jul  7 09:59:12 kg-ucc pkg[1046]: libXfont-1.5.4_2,2 installed
Jul  7 09:59:13 kg-ucc pkg[1046]: font-util-1.3.1 installed
Jul  7 09:59:13 kg-ucc pkg[1046]: mesa-dri-18.3.2_3 installed
Jul  7 09:59:13 kg-ucc pkg[1046]: libepoxy-1.5.2 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: libXmu-1.1.3,1 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: xorg-server-1.18.4_11,1 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: libXi-1.7.10,1 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: xinit-1.4.1,1 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: xauth-1.0.10 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: xf86-video-vesa-2.4.0_2 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: xf86-input-mouse-1.9.3_2 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: xf86-input-keyboard-1.9.0_3 installed
Jul  7 09:59:14 kg-ucc pkg[1046]: xorg-minimal-7.5.2_2 installed

install driver for nvidia cards

Jul  7 10:02:43 kg-ucc pkg[1538]: xf86-video-nv-2.1.21_3 installed

install xclock, xrandr, twm

Jul  7 10:04:25 kg-ucc pkg[1543]: libXpm-3.5.12_2 installed
Jul  7 10:04:25 kg-ucc pkg[1543]: libXp-1.0.3_2,1 installed
Jul  7 10:04:27 kg-ucc pkg[1543]: fontconfig-2.12.6,1 installed
Jul  7 10:04:28 kg-ucc pkg[1543]: libXaw-1.0.13_2,2 installed
Jul  7 10:04:28 kg-ucc pkg[1543]: libXft-2.3.2_3 installed
Jul  7 10:04:28 kg-ucc pkg[1543]: xclock-1.0.8 installed
Jul  7 10:04:28 kg-ucc pkg[1543]: twm-1.0.10 installed
Jul  7 10:04:28 kg-ucc pkg[1543]: xrandr-1.5.0 installed

ok

2019-07-07: ada0p2 - pkg - upgrade

Jul  7 09:48:16 kg-ucc pkg[983]: pkg upgraded: 1.10.5_5 -> 1.11.1
Jul  7 09:48:57 kg-ucc pkg[1003]: libnghttp2 upgraded: 1.35.1 -> 1.39.1
Jul  7 09:48:57 kg-ucc pkg[1003]: ca_root_nss upgraded: 3.41 -> 3.44.1
Jul  7 09:48:58 kg-ucc pkg[1003]: curl upgraded: 7.62.0 -> 7.65.1

ok

2019-07-07: ada0p2 - reboot, the machine now runs FreeBSD 12.0-release-p7.

root@kg-ucc# freebsd-version -ku
12.0-RELEASE-p7
12.0-RELEASE-p7

kernel

root@kg-ucc# uname -a
FreeBSD kg-ucc.kg4.no 12.0-RELEASE-p7 FreeBSD 12.0-RELEASE-p7 GENERIC  amd64

ok

2019-07-07: ada0p2 - freebsd-update fetch

root@kg-ucc# freebsd-update fetch
[..]
The following files will be removed as part of updating to 12.0-RELEASE-p7:
/usr/share/zoneinfo/Etc/UCT
The following files will be added as part of updating to 12.0-RELEASE-p7:
/usr/share/zoneinfo/Asia/Qostanay
The following files will be updated as part of updating to 12.0-RELEASE-p7:
/bin/freebsd-version
[..]
/usr/share/zoneinfo/Pacific/Saipan
/usr/share/zoneinfo/zone.tab

install

root@kg-ucc# freebsd-update install
src component not installed, skipped
Installing updates... done.

ok

2018-12-24: ada0p2 - send info to dmesgd

$ curl -v -d "nickname=$USER" -d "email=$USER@machine" -d "description=FreeBSD/$(uname -m) on ASRock M3A UCC" -d "do=addd" --data-urlencode 'dmesg@/var/run/dmesg.boot' http://dmesgd.nycbug.org/index.cgi

nice to have

2018-12-24: ada0p2 - pkg - update, install curl messages

Message from ca_root_nss-3.41:

********************************* WARNING *********************************

FreeBSD does not, and can not warrant that the certification authorities
whose certificates are included in this package have in any way been
audited for trustworthiness or RFC 3647 compliance.

Assessment and verification of trust is the complete responsibility of the
system administrator.

*********************************** NOTE **********************************

This package installs symlinks to support root certificates discovery by
default for software that uses OpenSSL.

This enables SSL Certificate Verification by client software without manual
intervention.

If you prefer to do this manually, replace the following symlinks with
either an empty file or your site-local certificate bundle.

  * /etc/ssl/cert.pem
  * /usr/local/etc/ssl/cert.pem
  * /usr/local/openssl/cert.pem

***************************************************************************

packages

Dec 24 17:42:35 kg-ucc pkg[15031]: libnghttp2-1.35.1 installed
Dec 24 17:42:35 kg-ucc pkg[15031]: ca_root_nss-3.41 installed
Dec 24 17:42:36 kg-ucc pkg[15031]: curl-7.62.0 installed

ok

2018-12-24: ada0p2 - pkg - bootstrap (I changed 'quarterly' to 'latest' in /etc/pkg/FreeBSD.conf first)

Dec 24 17:39:00 kg-ucc pkg-static[15006]: pkg-1.10.5_5 installed

ok.

2018-12-19: ada0p2 - I installed FreeBSD 12.0-RELEASE on this partition. dmesg output: normal, verbose.

$ uname -a
FreeBSD kg-ucc.kg4.no 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC  amd64
$ freebsd-version -ku
12.0-RELEASE
12.0-RELEASE

ok

2016-09-01: ad0s2a - still running ancient FreeBSD 6.4-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011
     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64

Things look ok after fsck fininshed:

root@kg-fil# date;swapinfo -h;df -h;uptime;gmirror status
Thu Sep  1 21:00:51 CEST 2016
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b      16777216       0B      16G     0%
Filesystem            Size    Used   Avail Capacity  Mounted on
/dev/ad0s2a           989M     83M    827M     9%    /
devfs                 1.0K    1.0K      0B   100%    /dev
/dev/ad0s2e           989M    104K    910M     0%    /tmp
/dev/ad0s2f            68G    4.1G     58G     7%    /usr
/dev/ad0s2d           7.7G    2.8G    4.3G    40%    /var
/dev/mirror/store2    902G    692G    138G    83%    /backup
 9:00PM  up 21 mins, 1 user, load averages: 0.00, 0.01, 0.05
         Name    Status  Components
mirror/store2  COMPLETE  ad4
                         ad6

good.

2016-08-25: uptime status:

root@kg-fil# date;uptime
Thu Aug 25 22:58:25 CEST 2016
10:58PM  up 63 days, 10:46, 2 users, load averages: 0.00, 0.00, 0.00

ok.

2016-06-23: ad0s2a - more fun with the machine. From /var/log/messages:

Jun 23 12:17:46 kg-fil syslogd: kernel boot file is /boot/kernel/kernel
Jun 23 12:17:46 kg-fil kernel: kernel trap 12 with interrupts disabled
Jun 23 12:17:46 kg-fil kernel:
Jun 23 12:17:46 kg-fil kernel:
Jun 23 12:17:46 kg-fil kernel: Fatal trap 12: page fault while in kernel mode
Jun 23 12:17:46 kg-fil kernel: fault virtual address    = 0x0
Jun 23 12:17:46 kg-fil kernel: fault code               = supervisor read instruction, page not present
Jun 23 12:17:46 kg-fil kernel: instruction pointer      = 0x8:0x0
Jun 23 12:17:46 kg-fil kernel: stack pointer            = 0x10:0xffffffffbf3c78d0
Jun 23 12:17:46 kg-fil kernel: frame pointer            = 0x10:0xc8f1797df03dc50f
Jun 23 12:17:46 kg-fil kernel: code segment             = base 0x0, limit 0xfffff, type 0x1b
Jun 23 12:17:46 kg-fil kernel: = DPL 0, pres 1, long 1, def32 0, gran 1
Jun 23 12:17:46 kg-fil kernel: processor eflags = resume, IOPL = 0
Jun 23 12:17:46 kg-fil kernel: current process          = 855 (mythbackend)
Jun 23 12:17:46 kg-fil kernel: trap number              = 12
Jun 23 12:17:46 kg-fil kernel: panic: page fault
Jun 23 12:17:46 kg-fil kernel: Uptime: 2d14h51m39s
Jun 23 12:17:46 kg-fil kernel: Dumping 4095 MB (3 chunks)
Jun 23 12:17:46 kg-fil kernel: chunk 0: 1MB (159 pages) ... ok
Jun 23 12:17:46 kg-fil kernel: chunk 1: 3327MB (851616 pages) 3311 3295 3279 3263 3247 3231 3215 3199 3183 3167 3151 3135 3119 3103 3087 3071 3055 3039 3023 3007 2991 2975 2959 2943 2927 2911 2895 2879 2863 2847 2831 2815 2799 2783 2767 2751 2735 2719 2703 2687 2671 2655 2639 2623 2607 2591 2575 2559 2543 2527 2511 2495 2479 2463 2447 2431 2415 2399 2383 2367 2351 2335 2319 2303 2287 2271 2255 2239 2223 2207 2191 2175 2159 2143 2127 2111 2095 2079 2063 2047 2031 2015 1999 1983 1967 1951 1935 1919 1903 1887 1871 1855 1839 1823 1807 1791 1775 1759 1743 1727 1711 1695 1679 1663 1647 1631 1615 1599 1583 1567 1551 1535 1519 1503 1487 1471 1455 1439 1423 1407 1391 1375 1359 1343 1327 1311 1295 1279 1263 1247 1231 1215 1199 1183 1167 1151 1135 1119 1103 1087 1071 1055 1039 1023 1007 991 975 959 943 927 911 895 879 863 847 831 815 799 783 767 751 735 719 703 687 671 655 639 623 607 591 575 559 543 527 511 495 479 463 447 431 415 399 383 367 351 335 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15 ... ok
Jun 23 12:17:46 kg-fil kernel: chunk 2: 768MB (196608 pages) 753 737 721 705 689 673 657 641 625 609 593 577 561 545 529 513 497 481 465 449 433 417 401 385 369 353 337 321 305 289 273 257 241 225 209 193 177 161 145 129 113 97 81 65

Jun 23 12:17:46 kg-fil savecore: reboot after panic: page fault
Jun 23 12:17:46 kg-fil savecore: writing core to vmcore.1

last info

root@kg-fil# last
tingo            ttyp0    kg-core1         Thu Jun 23 16:24   still logged in
reboot           ~                         Thu Jun 23 12:19
tingo            ttyp0    kg-core1         Tue Jun 21 09:27 - crash (2+02:52)
reboot           ~                         Mon Jun 20 21:24

wtmp begins Mon Jun 20 21:24:02 CEST 2016

ok.

2016-06-20: ad0s2a - the machine rebooted unexpectedly. From /var/log/messages:

Jun 12 11:07:41 kg-fil ntpd[753]: kernel time sync status change 2001
Jun 20 21:21:49 kg-fil syslogd: kernel boot file is /boot/kernel/kernel
Jun 20 21:21:49 kg-fil kernel: Copyright (c) 1992-2010 The FreeBSD Project.
Jun 20 21:21:49 kg-fil kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
Jun 20 21:21:49 kg-fil kernel: The Regents of the University of California. All rights reserved.
Jun 20 21:21:49 kg-fil kernel: FreeBSD is a registered trademark of The FreeBSD Foundation.
Jun 20 21:21:49 kg-fil kernel: FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011

last info

root@kg-fil# last
tingo            ttyp0    kg-core1         Tue Jun 21 09:27   still logged in
reboot           ~                         Mon Jun 20 21:24

wtmp begins Mon Jun 20 21:24:02 CEST 2016

not sure why.

2015-12-12: ad0s2a - I updated the config file for tv_grab_no_gfeed because the old host was not working anymore. the file is:

$ ls -l ~/.xmltv/tv_grab_no_gfeed.conf
-rw-r--r--  1 mythtv  mythtv  1714 Dec 12 14:30 /home/mythtv/.xmltv/tv_grab_no_gfeed.conf

old host

root-url=http://data.epg.no/xmltv/channels.xml.gz

new host

root-url=http://xmltv.xmltv.se/channels.xml.gz

that's all.

2015-11-14: ad0s2a - change to new firewall noted in /var/log/messages:

Nov 14 13:48:26 kg-fil kernel: arp: 10.1.10.1 moved from 00:10:4b:e3:38:8b to 80:ee:73:60:61:0c on em0

nothing more.

2014-12-24: slice 2 - rebooted the machine because of the interrupt storm.

2014-12-23: slice 2 - another interrupt storm detected:

Dec 23 09:30:55 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Dec 23 09:31:26 kg-fil last message repeated 31 times
Dec 23 09:33:27 kg-fil last message repeated 121 times
Dec 23 09:43:28 kg-fil last message repeated 601 times

nothing more.

2014-08-31: slice 2 - rebooted the machine because of the interrupt storm.

2014-08-30: slice 2 - another interrupt storm detected:

Aug 30 22:53:06 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Aug 30 22:53:37 kg-fil last message repeated 31 times
Aug 30 22:55:38 kg-fil last message repeated 120 times

nothing more.

2014-08-06: slice 2 - rebooted the machine because of the interrupt storm.

2014-08-05: slice 2 - another interrupt storm detected:

Aug  5 08:15:56 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Aug  5 08:16:27 kg-fil last message repeated 31 times
Aug  5 08:18:28 kg-fil last message repeated 121 times

nothing more.

2014-07-15: slice 2 - rebooted the machine because of the interrupt storm.

2014-07-14: slice 2 - another interrupt storm detected:

Jul 14 11:34:17 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Jul 14 11:34:48 kg-fil last message repeated 31 times
Jul 14 11:36:49 kg-fil last message repeated 121 times

nothing more.

2014-07-11: slice 2 - reboot due to a power failure (local circuit breaker tripped) earlier in the day. Nothing more.

2014-07-04: slice 2 - do a vmstat -i before rebooting the machine:

root@kg-fil# vmstat -i
interrupt                          total       rate
irq9: acpi0                            1          0
irq14: ata0                       121554          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq22: em0 atapci0           15640792522      32488
cpu0: timer                    962659200       1999
Total                        16603573293      34487

Ok, so the network card and the PCI controller is on irq22. reboot machine.

2014-07-03: slice 2 - another interrupt storm detected:

Jul  3 21:52:31 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Jul  3 21:53:02 kg-fil last message repeated 30 times
Jul  3 21:55:03 kg-fil last message repeated 121 times
Jul  3 22:05:04 kg-fil last message repeated 601 times

perhaps I need to reboot the machine again.

2014-06-28: slice 2 - network connectivity restored with the PCI adapter. From /var/log/messages:

Jun 28 20:10:58 kg-fil kernel: em0: <Intel(R) PRO/1000 Network Connection Version - 6.7.3> port 0xd800-0xd83f mem 0xfebe0000-0xfebfffff,0xfebc0000-0xfebdffff irq 22 at device 7.0 on pci2
Jun 28 20:10:58 kg-fil kernel: em0: Ethernet address: 90:e2:ba:5c:3b:f6

good.

2014-06-28: slice 2 - testing the Intel Pro/1000CT PCIe Desktop Adapter 1000BaseT, Inc Low Profile Bracket, bulk network adapter. The adapter shows up as em0, and appears to work nicely. Under FreeBSD 6.4-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64

from dmesg output: - it just says "no driver attached", so it doesn't work here. slice 1 - testing with FreeBSD 6.2-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.2-STABLE FreeBSD 6.2-STABLE #20: Mon Mar 12 23:04:49 CET 2007     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL60  amd64

from dmesg output: - it just says "no driver attached", so it doesn't work here. slice 3 - testing with FreeBSD 7.4-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 7.4-STABLE FreeBSD 7.4-STABLE #1: Sat Aug 27 16:32:02 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

from dmesg output:

em0: <Intel(R) PRO/1000 Network Connection 7.1.9> port 0xd800-0xd81f mem 0xfebe0000-0xfebfffff,0xfeb00000-0xfeb7ffff,0xfebdc000-0xfebdffff irq 16 at device 0.0 on pci2
em0: Using MSIX interrupts with 3 vectors
em0: [ITHREAD]
em0: [ITHREAD]
em0: [ITHREAD]
em0: Ethernet address: 68:05:ca:28:a2:e1

slice 4 - testing with FreeBSD 8.2-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat Aug 27 21:00:17 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

from dmesg output:

em0: <Intel(R) PRO/1000 Network Connection 7.2.3> port 0xd800-0xd81f mem 0xfebe0000-0xfebfffff,0xfeb00000-0xfeb7ffff,0xfebdc000-0xfebdffff irq 16 at device 0.0 on pci2
em0: Using MSIX interrupts with 3 vectors
em0: [ITHREAD]
em0: [ITHREAD]
em0: [ITHREAD]
em0: Ethernet address: 68:05:ca:28:a2:e1

That's all.

2014-06-28: slice 2 - testing the Intel Pro/1000GT PCI Desktop Adapter 1000BaseT, bulk network adapter. The adapter shows up as em0, and appears to work nicely. This under FreeBSD 6.4-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64

from dmesg output:

em0: <Intel(R) PRO/1000 Network Connection Version - 6.7.3> port 0xd800-0xd83f mem 0xfebe0000-0xfebfffff,0xfebc0000-0xfebdffff irq 22 at device 7.0 on pci2
em0: Ethernet address: 90:e2:ba:5c:3b:f6

slice 1 - testing with FreeBSD 6.2-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.2-STABLE FreeBSD 6.2-STABLE #20: Mon Mar 12 23:04:49 CET 2007     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL60  amd64

from dmesg output:

em0: <Intel(R) PRO/1000 Network Connection Version - 6.2.9> port 0xd800-0xd83f mem 0xfebe0000-0xfebfffff,0xfebc0000-0xfebdffff irq 22 at device 7.0 on pci2
em0: Ethernet address: 90:e2:ba:5c:3b:f6

slice 3 - testing with FreeBSD 7.4-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 7.4-STABLE FreeBSD 7.4-STABLE #1: Sat Aug 27 16:32:02 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

from dmesg output:

em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.3> port 0xd800-0xd83f mem 0xfebe0000-0xfebfffff,0xfebc0000-0xfebdffff irq 22 at device 7.0 on pci2
em0: [FILTER]
em0: Ethernet address: 90:e2:ba:5c:3b:f6

slice 4 - testing with FreeBSD 8.2-stable:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat Aug 27 21:00:17 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

from dmesg output:

em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.3> port 0xd800-0xd83f mem 0xfebe0000-0xfebfffff,0xfebc0000-0xfebdffff irq 22 at device 7.0 on pci2
em0: [FILTER]
em0: Ethernet address: 90:e2:ba:5c:3b:f6

That's all.

2014-04-08: slice2 - another interrupt storm detected:

Apr  8 12:20:05 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Apr  8 12:20:36 kg-fil last message repeated 31 times
Apr  8 12:22:37 kg-fil last message repeated 121 times

reboot again.

2014-03-13: slice 2 - testing tv_grab_no_gfeed after the move to Sweden (see this thread - in Norwegian). Getting some errors:

removing existing program: tvnorge.no Castle 2014-03-18T00:25:00 - 2014-03-18T01:25:00
inserting new program    : tvnorge.no Castle Tue Mar 18 00:25:00 2014 - Tue Mar 18 01:25:00 2014

2014-03-13 20:37:36.541 DB Error (person insert):
Query was:
INSERT INTO people (name) VALUES ('<actors> <actor>Seamus Dever</actor> <actor>Susan Sullivan</actor> <actor>Molly C. Quinn</actor> <actor>Jon Huertas</actor> <actor>Stana Katic</actor> <actor>Nathan Fillion</actor> </actors>');
Driver error was [2/1582]:
QMYSQL3: Unable to execute query
Database error was:
Duplicate entry '<actors> <actor>Seamus Dever</actor> <act' for key 'name'

Error inserting person
removing existing program: tvnorge.no CSI: Miami 2014-03-18T01:25:00 - 2014-03-18T02:20:00
inserting new program    : tvnorge.no CSI: Miami Tue Mar 18 01:25:00 2014 - Tue Mar 18 02:20:00 2014

most likely because I'm using a (very) old MythTV version.

2014-03-01: slice2 - another interrupt storm detected:

Feb 27 05:02:55 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Feb 27 05:03:26 kg-fil last message repeated 31 times
Feb 27 05:05:27 kg-fil last message repeated 121 times
Feb 27 05:15:28 kg-fil last message repeated 599 times

reboot again.

2014-01-11: slice 2 - interrupt storm again:

Jan 11 03:28:09 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Jan 11 03:28:39 kg-fil last message repeated 29 times
Jan 11 03:30:39 kg-fil last message repeated 120 times

As always, reboot the machine.

2013-12-22: slice 2 - interrupt storm again:

Dec 22 03:00:00 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Dec 22 03:00:31 kg-fil last message repeated 31 times
Dec 22 03:02:32 kg-fil last message repeated 120 times
Dec 22 03:12:33 kg-fil last message repeated 600 times

As always, reboot the machine.

2013-04-18: slice 2 - MythTV: added the scripts from this write-up, so that I could get epg info for Disney Channel and MAX. I had to change the scripts slightly, and install misc/seq2, in order to get grabseguide to work. Scripts are ~/bin/grabseguide and ~/bin/se2xml.pl. Differences from the original se2xml.pl:

$ diff -u ~/dl/se2xml.pl ~/bin/se2xml.pl
--- /home/mythtv/dl/se2xml.pl    2013-03-21 16:16:51.000000000 +0100
+++ /home/mythtv/bin/se2xml.pl    2013-04-18 23:44:46.000000000 +0200
@@ -4,7 +4,8 @@
 # resultat er en fil som kan fores til mythfilldatabase
 #
 # krever en fil med mapping av kanalnummer til xmltvid i mythtv
-$idfile="/data/epg/xmltvid.txt";
+#$idfile="/data/epg/xmltvid.txt";
+$idfile="~/work/xmltvid.txt";

 use Getopt::Std;
 getopts('c');        # '-c' lister kanaler istedet for programmer
Differences from the original grabseguide:
$ diff -u ~/dl/grabseguide ~/bin/grabseguide
--- /home/mythtv/dl/grabseguide    2013-04-09 10:56:49.000000000 +0200
+++ /home/mythtv/bin/grabseguide    2013-04-19 00:19:36.000000000 +0200
@@ -21,11 +21,12 @@
 # scriptet bør kjøres daglig fra crontab med 0-6 som argument (fanger opp evt programendringer)

 # sjekk/edit disse variablene
-sourceid="1 2 3 4"    # nummerering av mythtv tunere
-wget="/usr/bin/wget"
+#sourceid="1 2 3 4"    # nummerering av mythtv tunere
+sourceid="1"    # nummerering av mythtv tunere
+wget="/usr/local/bin/wget"
 filldb="/usr/local/bin/mythfilldatabase"
-epgdir="/data/epg"
-xmlgen="$epgdir/se2xml.pl"
+epgdir="~/work/epg"
+xmlgen="~/bin/se2xml.pl"
 cookies="$epgdir/se_cookies.txt"
 sys=$(uname)

@@ -52,7 +53,8 @@
       ?,*)    d=$(echo $1 | sed -e 's/,/ /g');;
      ?-?)    s=$(echo $1 | cut -d '-' -f 1);
             t=$(echo $1 | cut -d '-' -f 2);
-           d=$(seq $s 1 $t);;
+           #d=$(seq $s 1 $t);;
+           d=$(seq2 -s $s -i 1 -e $t);;
     esac
     shift
 done
@@ -74,7 +76,8 @@
         $xmlgen \> $epgdir/$pdate.xml
     for s in $sourceid
     do
-        rc $filldb --file --sourceid $s --xmlfile $epgdir/$pdate.xml --nodblog \>/dev/null
+        #rc $filldb --file --sourceid $s --xmlfile $epgdir/$pdate.xml --nodblog \>/dev/null
+        rc $filldb --file $s -1 $epgdir/$pdate.xml  \>/dev/null
     done
     rc rm $epgdir/$pdate.xml
 done

That is all.

2013-04-18: slice 2 - MythTV: added channel MAX at program number 10, frequency 154250, xmltvid: max.tvnorge.no.

2013-04-18: slice 2 - MythTV: moved TV2 Nyhetskanalen from program number 20 to 6. Disney Channel from program number 17 to 11,

2013-04-18: slice 2 - MythTV: a few channels are removed, so I used Mythweb to rearrange them, by changing their program number: Viasat 4: 6 -> 98, SVT 2: 10 -> 97, NatGeo: 11 -> 96, Travel: 12 -> 95, CNN: 13 -> 94, MTV: 14 -> 93, SportN: 15 -> 92, Eurosport: 18 -> 91, TCM: 19 -> 90,

2013-04-18: slice 2 - MythTV - I used Mythweb to change frequency on some channels: NRK 2: 253250 -> 168250, TV2 Zebra: 431250 -> 217250, SVT 1: 246250 -> 210250, TV2 Nyhetskanalen: 415250 -> 535250.

2013-02-08: slice 2 - tv_grab_no has failed to get new data for several days now. It seems that db.no's mobile pages are gone, don't know if this is an error, or if they just stopped. Temporary workaround: I copied tv_grab_no_gfeed from the machine quiet:

$ id
uid=119(mythtv) gid=119(mythtv) groups=119(mythtv)
$ tv_grab_no_gfeed --version
XMLTV module version 0.5.45
This is tv_grab_no_gfeed version 1.8, 2010/10/01 17:49:30

I configured it, and run this manually to update the listings:

$ tv_grab_no_gfeed --output ~/work/tv.xml; replace nyhetskanalen.tv2.no nyhet.tv2.no disneychannel.no disneychannel.tv tv3.viasat.no tv3.no -- ~/work/tv.xml; mythfilldatabase --file 1 -1 ~/work/tv.xml

replace is part of MySQL. The only downside is that tv_grab_no_gfeed is missing a few channels: CNN, CNBC & National Geographic, MTV Europe, TCM & Cartoon Network, Travel Channel.

2013-01-26: slice 2 - another interrupt storm:

Jan 26 11:23:37 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Jan 26 11:24:08 kg-fil last message repeated 31 times
Jan 26 11:26:09 kg-fil last message repeated 121 times

Another reboot of the machine.

2013-01-21: slice 2 - mythweb. I patched mythweb so that the TV.com search on the program details page is working. mythweb files are located in /usr/local/www/mythweb, and the relevant template is in ./modules/tv/tmpl/default/detail.php. After the deed, the relevant line looks like this:

                    <a href="http://www.tv.com/search?type=11&stype=all&q=<?php echo urlencode($schedule->title) ?>"><?php echo t('TV.com') ?></a>

Now, fixing the IMDb search too. It's in the same template, and before modifying, it looks like this:

                    <a href="http://www.imdb.com/Find?select=Titles&for=<?php echo urlencode($schedule->title) ?>"><?php echo t('IMDB') ?></a>

afterwards, it looks like this:

                    <a href="http://www.imdb.com/search/title?title=<?php echo urlencode($schedule->title) ?>"><?php echo t('IMDB') ?></a>

all done.

2012-12-15: slice 2 - I set up log rotation for apache log files, by adding the following lines to /etc/newsyslog.conf:

/var/log/httpd-access.log               644  9     100  *     ZB   /var/run/httpd.pid 30
/var/log/httpd-error.log                644  9     100  *     ZB   /var/run/httpd.pid 30

that's it.

2012-12-02: slice 2 - another interrupt storm:

Dec  2 03:22:52 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Dec  2 03:23:23 kg-fil last message repeated 31 times
Dec  2 03:25:24 kg-fil last message repeated 121 times

Another reboot of the machine.

2012-11-25: slice2 - When I look at recorded programs in Mythweb and click on the title of the recording (or the preview picture), I get an error ("internal server error"), and Apache error log (/var/log/httpd-error.log) contains the following lines:

[Sun Nov 25 19:32:11 2012] [error] [client 10.1.150.23] Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/www/mythweb/mythweb.pl line 13., referer: http://fil/mythweb/tv/recorded

When I check, it doesn't look like p5-Class-DBI is installed. Let's try to install it (I use portinstall):

root@kg-fil# portinstall -R p5-Class-DBI

when that completed (I had to locate a couple of files manually) I get another error in the Apache error log:

[Sun Nov 25 19:53:30 2012] [error] [client 10.1.150.23] install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at (eval 7) line 3., referer: http://fil/mythweb/tv/recorded

Ok, so I need to install p5-Class-DBI-mysql:

root@kg-fil# portinstall -R p5-Class-DBI-mysql

that installed without needing any manual steps, which is good. Afterwards, the error messages in the Apache error log is gone, but now I get this in Mythweb:

1003_20121125095700.mpg does not exist in the recordings directory.

Which is strange:

root@kg-fil# l /backup/mythtv/video/1003_20121125095700.mpg*
/backup/mythtv/video/1003_20121125095700.mpg      /backup/mythtv/video/1003_20121125095700.mpg.png

So, is this something wrongly configured in Mythweb, or what? Hmm, the video directory is owned by root, and group users:

root@kg-fil# ll -d /backup/mythtv/video
drwxrwxr-x  2 mythtv  users  10752 Nov 25 11:06 /backup/mythtv/video/

and the web user (www) isn't in users group:

root@kg-fil# id -p www
uid    www
groups    www

Better fix this by adding the www user to the mythtv group, and changing group on the video directory to mythtv. Currently there isn't anyone in the mythtv group:

root@kg-fil# pw groupshow mythtv
mythtv:*:119:

So add the www user:

root@kg-fil# pw groupmod mythtv -m www
verify:
root@kg-fil# pw groupshow mythtv
mythtv:*:119:www
root@kg-fil# id -p www
uid    www
groups    www mythtv

Looks good. To be on the safe side, add my own user to the mythtv group:

root@kg-fil# pw groupmod mythtv -m tingo
root@kg-fil# pw groupshow mythtv
mythtv:*:119:www,tingo

Next, change group on the video directory:

root@kg-fil# chown -R :mythtv /backup/mythtv

verify:

root@kg-fil# ll -d /backup/mythtv
drwxrwxr-x  3 mythtv  mythtv  512 Jun  1  2009 /backup/mythtv/
root@kg-fil# ll -d /backup/mythtv/video
drwxrwxr-x  2 mythtv  mythtv  10752 Nov 25 11:06 /backup/mythtv/video/

(and the files too). Still this doesn't fix the error. Aha - I found it:

root@kg-fil# pwd
/usr/local/www/mythweb/data
root@kg-fil# ls -lF
total 10
-rw-r--r--  1 root  www   180 Mar 16  2007 .htaccess
drwxr-xr-x  2 www   www  5632 Nov 25 19:01 cache/
lrwxr-xr-x  1 www   www    21 Mar 16  2007 recordings@ -> /storage/mythtv/video
drwxr-xr-x  2 www   www   512 Mar 16  2007 tv_icons/

Ok, let's change the recordings link:

root@kg-fil# rm recordings
root@kg-fil# ln -s /backup/mythtv/video recordings

verify:

root@kg-fil# ls -lF
total 10
-rw-r--r--  1 root  www   180 Mar 16  2007 .htaccess
drwxr-xr-x  2 www   www  5632 Nov 25 19:01 cache/
lrwxr-xr-x  1 root  www    20 Nov 25 20:50 recordings@ -> /backup/mythtv/video
drwxr-xr-x  2 www   www   512 Mar 16  2007 tv_icons/

Does it work now? Yes (well, sort of), the link works, but my browser tries to download the file instead of streaming it. Streaming with vlc works. Good enough.

2012-11-21: slice 2 - another interrupt storm:

Nov 21 09:05:44 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Nov 21 09:06:15 kg-fil last message repeated 31 times
Nov 21 09:08:16 kg-fil last message repeated 121 times

Another reboot of the machine.

2012-10-13: slice 2 - I discovered another interrupt storm again:

Oct 11 11:51:22 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Oct 11 11:51:53 kg-fil last message repeated 31 times
Oct 11 11:53:54 kg-fil last message repeated 121 times
Oct 11 12:03:55 kg-fil last message repeated 599 times
Oct 11 12:13:55 kg-fil last message repeated 598 times
Oct 11 12:23:56 kg-fil last message repeated 599 times

So I rebooted the machine.

2012-08-26: slice 2 - the theory about interrupt storms being related to recordings seems to hold: I started a recording after restarting the machine, and now I've got another interrupt storm: from /var/log/messages:

Aug 26 12:58:01 kg-fil kernel: before tuner_command!
Aug 26 12:58:01 kg-fil kernel: tuner: tv freq set to 175.25
Aug 26 12:58:01 kg-fil kernel: tuner: tv 0x0d 0x63 0xce 0x02
Aug 26 12:58:02 kg-fil kernel: done waiting for cx25840 = 21
Aug 26 12:58:02 kg-fil kernel: mmmmmmsmmmmmmssssssss
Aug 26 14:37:56 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Aug 26 14:38:27 kg-fil last message repeated 30 times

The recording started at 12:58, and ended at 15:00. Why the interrupt storm started at 14:37 I do not know. Other info:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64
root@kg-fil# uptime
11:34PM  up 10:43, 3 users, load averages: 0.00, 0.00, 0.00
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          56          0
irq9: acpi0                            1          0
irq14: ata0                        13139          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       400713         10
irq22: xl0 atapci0           10655857073     276366
cpu0: timer                     77094198       1999
Total                        10733365196     278376

Now I am rebooting the machine again.

2012-08-26: slice 2 - another interrupt storm. From /var/log/messages:

Aug 25 23:13:02 kg-fil kernel: done waiting for cx25840 = 21
Aug 25 23:13:02 kg-fil kernel: mmmmmmsmmmmmmssssssss
Aug 26 01:26:26 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Aug 26 01:26:57 kg-fil last message repeated 31 times
Aug 26 01:28:58 kg-fil last message repeated 121 times
Aug 26 01:38:59 kg-fil last message repeated 600 times

other info:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64
root@kg-fil# uptime
12:48PM  up 6 days, 23:38, 2 users, load averages: 0.00, 0.02, 0.01
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          54          0
irq9: acpi0                            1          0
irq14: ata0                       302520          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       961521          1
irq22: xl0 atapci0           13535606696      22428
cpu0: timer                   1206832579       1999
Total                        14743703387      24430

I wonder if it is related to recordings? Anyway, I can't do anything about, so, I'm just going to reboot the machine again.

2012-08-18: slice 2 - the interrupt storm is back again (mythfilldatabase has been behaving properly since the previous entry). From /var/log/messages:

Aug 18 22:33:02 kg-fil kernel: done waiting for cx25840 = 21
Aug 18 22:33:02 kg-fil kernel: mmmmmmsmmmmmmssssssss
Aug 18 23:59:42 kg-fil kernel: interrupt storm detected on "irq20:"; throttling interrupt source
Aug 19 00:00:00 kg-fil last message repeated 18 times
Aug 19 00:00:01 kg-fil kernel: interrupt storm detected on "irq20:"; throttling interrupt source
Aug 19 00:00:32 kg-fil last message repeated 31 times
Aug 19 00:02:32 kg-fil last message repeated 120 times

other info:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64
root@kg-fil# uptime
 1:06PM  up 18 days, 20:04, 2 users, load averages: 0.00, 0.00, 0.00
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          54          0
irq9: acpi0                            1          0
irq14: ata0                       638738          0
irq16: pcm0 ohci0                     11          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                  15714968146       9656
irq22: xl0 atapci0              24782001         15
cpu0: timer                   3254396364       1999
Total                        18994785319      11671

The last time it was 17 days, now 18. Funny. Rebooting the machine now.

2012-08-10: slice 2 - mythfilldatabase crashed on it's nightly run. From /var/log/messages:

Aug 11 00:58:02 kg-fil kernel: mmmmmmsmmmmmmssssssss
Aug 11 02:06:08 kg-fil kernel: pid 35124 (mythfilldatabase), uid 0: exited on signal 6 (core dumped)
Aug 11 06:57:54 kg-fil su: tingo to root on /dev/ttyp1

and from gdb:

root@kg-fil# gdb mythfilldatabase /.mythtv/channels/mythfilldatabase.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `mythfilldatabase'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/local/lib/libmythtv-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmythtv-0.20.so.0
Reading symbols from /usr/local/lib/libmythavformat-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmythavformat-0.20.so.0
Reading symbols from /usr/local/lib/libmythavutil-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmythavutil-0.20.so.0
Reading symbols from /usr/local/lib/libmythavcodec-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmythavcodec-0.20.so.0
Reading symbols from /usr/local/lib/libmythfreemheg-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmythfreemheg-0.20.so.0
Reading symbols from /usr/local/lib/libmythupnp-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmythupnp-0.20.so.0
Reading symbols from /usr/local/lib/libmythlivemedia-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmythlivemedia-0.20.so.0
Reading symbols from /usr/local/lib/libmyth-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmyth-0.20.so.0
Reading symbols from /usr/local/lib/libmythui-0.20.so.0...done.
Loaded symbols for /usr/local/lib/libmythui-0.20.so.0
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /usr/local/lib/libmp3lame.so.0...done.
Loaded symbols for /usr/local/lib/libmp3lame.so.0
Reading symbols from /usr/X11R6/lib/libXinerama.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXinerama.so.1
Reading symbols from /usr/X11R6/lib/libXv.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXv.so.1
Reading symbols from /usr/X11R6/lib/libXxf86vm.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXxf86vm.so.1
Reading symbols from /usr/X11R6/lib/libXrandr.so.2...done.
Loaded symbols for /usr/X11R6/lib/libXrandr.so.2
Reading symbols from /usr/X11R6/lib/libqt-mt.so.3...done.
Loaded symbols for /usr/X11R6/lib/libqt-mt.so.3
Reading symbols from /usr/X11R6/lib/libGLU.so.1...done.
Loaded symbols for /usr/X11R6/lib/libGLU.so.1
Reading symbols from /usr/X11R6/lib/libGL.so.1...done.
Loaded symbols for /usr/X11R6/lib/libGL.so.1
Reading symbols from /usr/X11R6/lib/libXmu.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXmu.so.6
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/libm.so.4...done.
Loaded symbols for /lib/libm.so.4
Reading symbols from /lib/libpthread.so.2...done.
Loaded symbols for /lib/libpthread.so.2
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libz.so.3...done.
Loaded symbols for /lib/libz.so.3
Reading symbols from /usr/X11R6/lib/libXrender.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXrender.so.1
Reading symbols from /usr/X11R6/lib/libaudio.so.2...done.
Loaded symbols for /usr/X11R6/lib/libaudio.so.2
Reading symbols from /usr/X11R6/lib/libXt.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXt.so.6
Reading symbols from /usr/local/lib/libmng.so.1...done.
Loaded symbols for /usr/local/lib/libmng.so.1
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Loaded symbols for /usr/local/lib/libjpeg.so.9
Reading symbols from /usr/local/lib/libpng.so.5...done.
Loaded symbols for /usr/local/lib/libpng.so.5
Reading symbols from /usr/X11R6/lib/libXi.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXi.so.6
Reading symbols from /usr/X11R6/lib/libXcursor.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXcursor.so.1
Reading symbols from /usr/X11R6/lib/libXft.so.2...done.
Loaded symbols for /usr/X11R6/lib/libXft.so.2
Reading symbols from /usr/X11R6/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/X11R6/lib/libfontconfig.so.1
Reading symbols from /usr/X11R6/lib/libSM.so.6...done.
Loaded symbols for /usr/X11R6/lib/libSM.so.6
Reading symbols from /usr/X11R6/lib/libICE.so.6...done.
Loaded symbols for /usr/X11R6/lib/libICE.so.6
Reading symbols from /usr/X11R6/lib/libXau.so.0...done.
Loaded symbols for /usr/X11R6/lib/libXau.so.0
Reading symbols from /usr/local/lib/liblcms.so.1...done.
Loaded symbols for /usr/local/lib/liblcms.so.1
Reading symbols from /usr/X11R6/lib/libXfixes.so.3...done.
Loaded symbols for /usr/X11R6/lib/libXfixes.so.3
Reading symbols from /usr/local/lib/libexpat.so.6...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x00000008040b09ac in pthread_testcancel () from /lib/libpthread.so.2
[New Thread 5b0800 (LWP 100092)]
[New Thread 5b0400 (LWP 100149)]
[New Thread 55a000 (sleeping)]
(gdb) bt
#0  0x00000008040b09ac in pthread_testcancel () from /lib/libpthread.so.2
#1  0x000000080409e673 in sigaction () from /lib/libpthread.so.2
#2  0x00000008040a0192 in sigaction () from /lib/libpthread.so.2
#3  0x0000000804099e46 in pthread_kill () from /lib/libpthread.so.2
#4  0x00000008040996c3 in raise () from /lib/libpthread.so.2
#5  0x000000080428d4fd in abort () from /lib/libc.so.6
#6  0x0000000803deed4e in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.5
#7  0x0000000803df3106 in __cxxabiv1::__terminate () from /usr/lib/libstdc++.so.5
#8  0x0000000803df3133 in std::terminate () from /usr/lib/libstdc++.so.5
#9  0x0000000803e3114f in __cxa_pure_virtual () from /usr/lib/libstdc++.so.5
#10 0x00000008021b733e in MythContext::ClearSettingsCache (this=0x59b500, myKey=
      {static null = {static null = <same as static member of an already seen type>, d = 0x5618c0, static shared_null = 0x5618c0}, d = 0x591e20, static shared_null = 0x5618c0}, newVal=
      {static null = {static null = <same as static member of an already seen type>, d = 0x5618c0, static shared_null = 0x5618c0}, d = 0x591c40, static shared_null = 0x5618c0}) at mythcontext.cpp:1090
#11 0x00000008021b8214 in MythContext::readyRead (this=0x59b500, sock=0x4) at mythcontext.cpp:2457
#12 0x00000008022ba794 in MythSocket::readyReadThread () at mythsocket.cpp:782
#13 0x00000008040a1b49 in pthread_create () from /lib/libpthread.so.2
#14 0x00000008042007b4 in makecontext () from /lib/libc.so.6
#15 0x0000000000000000 in ?? ()
#16 0x00000000005b0800 in ?? ()
#17 0x00000008022b9560 in MythSocket::DownRef () at streambuf:499
#18 0x0000000000000000 in ?? ()
#19 0x0000000000000000 in ?? ()
#20 0x0000000000000000 in ?? ()
#21 0x0000000000000000 in ?? ()
Cannot access memory at address 0x7fffff9fe000
(gdb)

As far as I can tell, everything else is normal:

root@kg-fil# uptime
 7:01AM  up 10 days, 13:58, 3 users, load averages: 0.02, 0.07, 0.03
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          54          0
irq9: acpi0                            1          0
irq14: ata0                       358646          0
irq16: pcm0 ohci0                     11          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       751323          0
irq22: xl0 atapci0               1520490          1
cpu0: timer                   1828328219       1999
Total                         1830958748       2002

That is all.

2012-07-31: slice 2 - the interrupt storm is back again (mythfilldatabase has been failing for several days before this): from /var/log/messages:

Jul 27 04:47:02 kg-fil kernel: done waiting for cx25840 = 21
Jul 27 04:47:02 kg-fil kernel: mmmmmmsmmmmmmssssssss
Jul 31 07:19:40 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Jul 31 07:20:11 kg-fil last message repeated 31 times
Jul 31 07:22:12 kg-fil last message repeated 121 times

other info:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64
root@kg-fil# uptime
 4:58PM  up 17 days,  4:40, 3 users, load averages: 0.00, 0.01, 0.00
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          56          0
irq9: acpi0                            1          0
irq14: ata0                       409779          0
irq16: pcm0 ohci0                     11          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       323491          0
irq22: xl0 atapci0           11529399245       7760
cpu0: timer                   2970770986       1999
Total                        14500903573       9761

That's it. Reboot the machine now.

2012-07-14: slice 2 - the interrupt storm is back again (the machine has been working properly in the mean time):

from /var/log/messages:
Jul 13 04:57:02 kg-fil kernel: mmmmmmsmmmmmmssssssss
Jul 13 05:11:02 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Jul 13 05:11:33 kg-fil last message repeated 31 times
Jul 13 05:13:33 kg-fil last message repeated 120 times
Jul 13 05:23:34 kg-fil last message repeated 599 times

other info:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64
root@kg-fil# uptime
12:16PM  up 79 days,  1:10, 2 users, load averages: 0.00, 0.00, 0.00

So, just reboot it.

2012-04-26: slice 2 - the machine has been working properly since the last reboot, but now the irq storm is back again: from /var/log/messages:

Apr 23 20:27:02 kg-fil kernel: done waiting for cx25840 = 21
Apr 23 20:27:02 kg-fil kernel: mmmmmmsmmmmmmssssssss
Apr 25 15:49:10 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Apr 25 15:49:41 kg-fil last message repeated 31 times
Apr 25 15:51:42 kg-fil last message repeated 120 times
Apr 25 16:01:43 kg-fil last message repeated 599 times

other info:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64
root@kg-fil# uptime
11:01AM  up 104 days, 14:21, 3 users, load averages: 0.00, 0.04, 0.02

Let's see if a reboot fixes things.

2011-12-05: slice 2 - a BIOS upgrade didn't help, the irq storm is back. From /var/log/messages:

Dec  5 20:58:01 kg-fil kernel: mmmmmmsmmmmmmssssssss
Dec  5 22:04:03 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Dec  5 22:04:34 kg-fil last message repeated 31 times
Dec  5 22:06:35 kg-fil last message repeated 121 times
Dec  5 22:16:36 kg-fil last message repeated 600 times
:
Dec  6 00:52:38 kg-fil last message repeated 599 times
Dec  6 01:02:39 kg-fil last message repeated 599 times
Dec  6 01:12:39 kg-fil last message repeated 598 times

and

root@kg-fil# uptime
 1:20AM  up 1 day,  6:53, 2 users, load averages: 0.01, 0.05, 0.02
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          56          0
irq9: acpi0                            1          0
irq14: ata0                        73274          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       594960          5
irq21: cxm1                       216858          1
irq22: xl0 atapci0            3952044429      35536
cpu0: timer                    222391385       1999
Total                         4175320979      37543

How very annoying.

2011-12-04: slice 2 - ok, the irq storm is back: From /var/log/messages:

Dec  3 20:28:02 kg-fil kernel: done waiting for cx25840 = 21
Dec  3 20:28:02 kg-fil kernel: mmmmmmsmmmmmmssssssss
Dec  3 21:23:20 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Dec  3 21:23:50 kg-fil last message repeated 30 times
Dec  3 21:25:50 kg-fil last message repeated 120 times
Dec  3 21:30:02 kg-fil last message repeated 252 times
Dec  3 21:30:03 kg-fil kernel: before tuner_command!
:
Dec  4 17:33:03 kg-fil last message repeated 598 times
Dec  4 17:43:03 kg-fil last message repeated 598 times
Dec  4 17:53:03 kg-fil last message repeated 598 times
Dec  4 18:03:03 kg-fil last message repeated 599 times

and

root@kg-fil# uptime
 6:06PM  up 2 days, 22:43, 2 users, load averages: 0.46, 0.15, 0.05
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          56          0
irq9: acpi0                            1          0
irq14: ata0                       144252          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       387391          1
irq22: xl0 atapci0           24870078324      97682
cpu0: timer                    509131918       1999
Total                        25379741958      99683

Not good. I've upgraded the BIOS to the latest version (see main page), in hope that it will fix the problem.

2011-12-01: slice 2 - Hmm, yesterday (restart after power outage) the irq storm problem has reappeared:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 17:30:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL62  amd64
root@kg-fil# uptime
 7:16PM  up 22:41, 2 users, load averages: 0.00, 0.02, 0.01
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          42          0
irq9: acpi0                            1          0
irq12: psm0                            4          0
irq14: ata0                       105911          1
irq16: pcm0 ohci0                     11          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq22: xl0 atapci0           26790624557     328063
cpu0: timer                    163300958       1999
Total                        26954031488     330064

and output from /var/log/messages:

Nov 30 20:48:09 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Nov 30 20:48:40 kg-fil last message repeated 31 times
:
Nov 30 20:53:08 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Nov 30 20:53:39 kg-fil last message repeated 31 times
:
Dec  1 00:00:01 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Dec  1 00:00:32 kg-fil last message repeated 31 times
:
Dec  1 05:00:01 kg-fil kernel: interrupt storm detected on "irq22:"; throttling interrupt source
Dec  1 05:00:32 kg-fil last message repeated 31 times

Let's find out if a reboot will fix that. After about 8 mins of uptime there is no mention of a irq storm in /var/log/messages and vmstat output looks ok:

root@kg-fil# uptime
 7:31PM  up 8 mins, 2 users, load averages: 0.00, 0.18, 0.16
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          56          0
irq9: acpi0                            1          0
irq14: ata0                         2657          5
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq22: xl0 atapci0                   939          1
cpu0: timer                       995630       1999
Total                             999299       2006

Cool.

2011-10-09: slice 2 - today I had time to look at the problem. First I moved the network card to another PCI slot. I t is now using irq 22:

root@kg-fil#  dmesg | grep xl
xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 22 at device 7.0 on pci2
miibus0: <MII bus> on xl0
xlphy0: <3Com internal media interface> on miibus0
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl0: Ethernet address: 00:10:5a:6c:21:15

Hopefully, that will fix the irq storm. Here is vmstat -i output for good measure:

root@kg-fil# uptime
 4:05PM  up 8 mins, 3 users, load averages: 0.01, 0.22, 0.19
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                         160          0
irq9: acpi0                            1          0
irq14: ata0                         3949          8
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq22: xl0 atapci0                  5805         12
cpu0: timer                       951630       1995
Total                             961561       2015

I also had high packet loss, even with ping locally. So I moved the network connection from the old switch (CNet) to the new one (ZyXEL GS-108B). This seems to have fixed things for now:

root@kg-fil# ping 10.1.10.1
PING 10.1.10.1 (10.1.10.1): 56 data bytes
64 bytes from 10.1.10.1: icmp_seq=0 ttl=64 time=0.499 ms
64 bytes from 10.1.10.1: icmp_seq=1 ttl=64 time=0.525 ms
64 bytes from 10.1.10.1: icmp_seq=2 ttl=64 time=0.453 ms
64 bytes from 10.1.10.1: icmp_seq=3 ttl=64 time=0.392 ms
64 bytes from 10.1.10.1: icmp_seq=4 ttl=64 time=0.439 ms
64 bytes from 10.1.10.1: icmp_seq=5 ttl=64 time=0.458 ms
64 bytes from 10.1.10.1: icmp_seq=6 ttl=64 time=0.505 ms
64 bytes from 10.1.10.1: icmp_seq=7 ttl=64 time=0.428 ms
64 bytes from 10.1.10.1: icmp_seq=8 ttl=64 time=0.439 ms
64 bytes from 10.1.10.1: icmp_seq=9 ttl=64 time=0.438 ms
64 bytes from 10.1.10.1: icmp_seq=10 ttl=64 time=0.413 ms
64 bytes from 10.1.10.1: icmp_seq=11 ttl=64 time=0.519 ms
64 bytes from 10.1.10.1: icmp_seq=12 ttl=64 time=0.599 ms
64 bytes from 10.1.10.1: icmp_seq=13 ttl=64 time=0.438 ms
^C
--- 10.1.10.1 ping statistics ---
14 packets transmitted, 14 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.392/0.467/0.599/0.053 ms
tingo@kg-v2$ ping fil
PING kg-fil.kg4.no (10.1.10.4): 56 data bytes
64 bytes from 10.1.10.4: icmp_seq=0 ttl=64 time=0.137 ms
64 bytes from 10.1.10.4: icmp_seq=1 ttl=64 time=0.155 ms
64 bytes from 10.1.10.4: icmp_seq=2 ttl=64 time=0.144 ms
64 bytes from 10.1.10.4: icmp_seq=3 ttl=64 time=0.140 ms
64 bytes from 10.1.10.4: icmp_seq=4 ttl=64 time=0.141 ms
64 bytes from 10.1.10.4: icmp_seq=5 ttl=64 time=0.744 ms
64 bytes from 10.1.10.4: icmp_seq=6 ttl=64 time=2.168 ms
64 bytes from 10.1.10.4: icmp_seq=7 ttl=64 time=0.151 ms
64 bytes from 10.1.10.4: icmp_seq=8 ttl=64 time=0.151 ms
64 bytes from 10.1.10.4: icmp_seq=9 ttl=64 time=0.158 ms
64 bytes from 10.1.10.4: icmp_seq=10 ttl=64 time=0.135 ms
64 bytes from 10.1.10.4: icmp_seq=11 ttl=64 time=0.147 ms
^C
--- kg-fil.kg4.no ping statistics ---
12 packets transmitted, 12 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.135/0.364/2.168/0.568 ms

Let's hope it stays good.

2011-10-03: slice 2 - interesting, it seems the machine has an irq storm. From /var/log/messages:

Oct  2 18:17:22 kg-fil kernel: interrupt storm detected on "irq20:"; throttling interrupt source
Oct  2 18:17:53 kg-fil last message repeated 31 times
Oct  2 18:19:54 kg-fil last message repeated 121 times
Oct  2 18:29:55 kg-fil last message repeated 600 times
Oct  2 18:31:25 kg-fil last message repeated 89 times
Oct  2 18:31:25 kg-fil kernel: xl0: transmission error: 90
Oct  2 18:31:25 kg-fil kernel: xl0: tx underrun, increasing tx start threshold to 120 bytes
Oct  2 18:31:26 kg-fil kernel: interrupt storm detected on "irq20:"; throttling interrupt source
Oct  2 18:31:57 kg-fil last message repeated 31 times
Oct  2 18:33:58 kg-fil last message repeated 121 times

let's see what is using the irq:

root@kg-fil# uptime
 5:22PM  up 2 days,  3:40, 2 users, load averages: 0.00, 0.00, 0.00
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                          42          0
irq9: acpi0                            1          0
irq14: ata0                       126291          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                  27434093414     147484
irq21: cxm1 xl0                 21817852        117
irq22: atapci0                    677363          3
cpu0: timer                    371947147       1999
Total                        27828662126     149605

from /var/log/messages:

root@kg-fil# bzcat /var/log/messages.0.bz2 | grep "irq 20"
Aug 15 21:59:40 kg-fil kernel: cxm0: <Conexant iTVC16 MPEG Coder> mem 0xf4000000-0xf7ffffff irq 20 at device 8.0 on pci3
Aug 15 22:03:27 kg-fil kernel: cxm0: <Conexant iTVC16 MPEG Coder> mem 0xf4000000-0xf7ffffff irq 20 at device 8.0 on pci3
Aug 15 22:36:41 kg-fil kernel: cxm0: <Conexant iTVC16 MPEG Coder> mem 0xf4000000-0xf7ffffff irq 20 at device 8.0 on pci3
Aug 27 23:08:13 kg-fil kernel: cxm0: <Conexant iTVC16 MPEG Coder> mem 0xf4000000-0xf7ffffff irq 20 at device 8.0 on pci3
Sep 18 23:09:52 kg-fil kernel: cxm0: <Conexant iTVC16 MPEG Coder> mem 0xf4000000-0xf7ffffff irq 20 at device 8.0 on pci3
Oct  1 13:20:32 kg-fil kernel: cxm0: <Conexant iTVC16 MPEG Coder> mem 0xf4000000-0xf7ffffff irq 20 at device 8.0 on pci3
Oct  1 13:43:21 kg-fil kernel: cxm0: <Conexant iTVC16 MPEG Coder> mem 0xf4000000-0xf7ffffff irq 20 at device 8.0 on pci3

Hmm, seems ok. But what about this one:

root@kg-fil# bzcat /var/log/messages.0.bz2 | grep "irq 21"
Aug 15 21:59:40 kg-fil kernel: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
Aug 15 21:59:40 kg-fil kernel: cxm1: <Conexant iTVC16 MPEG Coder> mem 0xf0000000-0xf3ffffff irq 21 at device 9.0 on pci3
Aug 15 22:03:27 kg-fil kernel: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
Aug 15 22:03:27 kg-fil kernel: cxm1: <Conexant iTVC16 MPEG Coder> mem 0xf0000000-0xf3ffffff irq 21 at device 9.0 on pci3
Aug 15 22:36:41 kg-fil kernel: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
Aug 15 22:36:41 kg-fil kernel: cxm1: <Conexant iTVC16 MPEG Coder> mem 0xf0000000-0xf3ffffff irq 21 at device 9.0 on pci3
Aug 27 23:08:13 kg-fil kernel: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
Aug 27 23:08:13 kg-fil kernel: cxm1: <Conexant iTVC16 MPEG Coder> mem 0xf0000000-0xf3ffffff irq 21 at device 9.0 on pci3
Sep 18 23:09:52 kg-fil kernel: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
Sep 18 23:09:52 kg-fil kernel: cxm1: <Conexant iTVC16 MPEG Coder> mem 0xf0000000-0xf3ffffff irq 21 at device 9.0 on pci3
Oct  1 13:20:32 kg-fil kernel: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
Oct  1 13:20:32 kg-fil kernel: cxm1: <Conexant iTVC16 MPEG Coder> mem 0xf0000000-0xf3ffffff irq 21 at device 9.0 on pci3
Oct  1 13:43:21 kg-fil kernel: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
Oct  1 13:43:21 kg-fil kernel: cxm1: <Conexant iTVC16 MPEG Coder> mem 0xf0000000-0xf3ffffff irq 21 at device 9.0 on pci3

Not sure if that is a problem or not.

2011-10-01: slice 2 - MythTV problems. After I replaced the PSU with a new one, I can play recordings in MythTV again, without problems. I wonder if I can put back the Gigabit network switch too? Later: I replaced the 100Mbit switch with the Gigabit one, and it works after I restarted (power off, power on) the other gigabit switch (CNet CGS-800 something). Nice!

2011-09-18: slice 2 - MythTV problems. Now nothing will play on remote frontends from this backend. Not good.

2011-08-29: slice 2 - MythTV problems. This is interesting. I temporarily changed the gigabit network switch that the mythTV backend server is connected to, with another network switch, a 10/100 Mbps one. And suddenly my backend works again. Bad cabling somewhere, perhaps?

2011-08-29: slice 2 - MythTV problems. Trying to fix network by setting a couple of sysctls:

root@kg-fil# sysctl net.inet.tcp.sendspace
net.inet.tcp.sendspace: 32768
root@kg-fil# sysctl net.inet.tcp.sendspace=65536
net.inet.tcp.sendspace: 32768 -> 65536

and

root@kg-fil# sysctl net.inet.tcp.recvspace
net.inet.tcp.recvspace: 65536
root@kg-fil# sysctl net.inet.tcp.recvspace=131072
net.inet.tcp.recvspace: 65536 -> 131072

Does it work? Nope, doesn't help. Looking for interrupt problems:

root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                         132          0
irq9: acpi0                            1          0
irq14: ata0                       128633          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       436067          2
irq21: cxm1 xl0                  2945467         17
irq22: atapci0                    550228          3
cpu0: timer                    345110118       1999
Total                          349170662       2023
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                         132          0
irq9: acpi0                            1          0
irq14: ata0                       128640          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       436067          2
irq21: cxm1 xl0                  3001034         17
irq22: atapci0                    550238          3
cpu0: timer                    345203427       1999
Total                          349319555       2023
root@kg-fil# vmstat -i
interrupt                          total       rate
irq1: atkbd0                         132          0
irq9: acpi0                            1          0
irq14: ata0                       128651          0
irq16: pcm0 ohci0                     12          0
irq17: ohci1 ohci3                     2          0
irq18: ohci2 ohci4                     2          0
irq20: cxm0                       436067          2
irq21: cxm1 xl0                  3012108         17
irq22: atapci0                    550258          3
cpu0: timer                    345296705       1999
Total                          349423938       2023

Ok, it doesn't look like there is a problem there either.

2011-08-29: slice 2 - it seems that there is a problem with my MythTV backend and/or frontend, related to playback. I just tried viewing a few recordings (both old and new, the old ones I have successfully viewed before), but all stopped in mid-playback, after some time (a minute or so, or a few minutes). I even tried connecting my frontend via wired ethernet instead of WLAN; that didn't help. In /var/log/mythbackend.log I can see this:

2011-08-28 23:57:30.213 MainServer::HandleAnnounce Playback
2011-08-28 23:57:30.214 adding: kg-jobbpc.kg4.no as a client (events: 0)
2011-08-28 23:57:30.216 MainServer::HandleAnnounce FileTransfer
2011-08-28 23:57:30.217 adding: kg-jobbpc.kg4.no as a remote file transfer
Mutex unlock failure: Operation not permitted
Mutex destroy failure: Device busy
QDateTime::fromString: Parameter out of range
2011-08-28 23:58:23.235 MainServer::HandleAnnounce Playback
2011-08-28 23:58:23.236 adding: kg-jobbpc.kg4.no as a client (events: 0)
2011-08-28 23:58:23.253 MainServer::HandleAnnounce FileTransfer
2011-08-28 23:58:23.254 adding: kg-jobbpc.kg4.no as a remote file transfer
2011-08-28 23:58:42.777 MythSocket(6b2d00:19): writeData: Error, zerocnt timeout
2011-08-29 00:00:06.210 MythSocket(6b2d00:19): writeData: Error, zerocnt timeout
Mutex unlock failure: Operation not permitted
Mutex destroy failure: Device busy
2011-08-29 00:00:14.631 MainServer::HandleAnnounce Playback
2011-08-29 00:00:14.632 adding: kg-jobbpc.kg4.no as a client (events: 0)
2011-08-29 00:00:14.642 MainServer::HandleAnnounce FileTransfer
2011-08-29 00:00:14.642 adding: kg-jobbpc.kg4.no as a remote file transfer
2011-08-29 00:01:29.940 MythSocket(6b2b00:18): writeData: Error, zerocnt timeout
Mutex unlock failure: Operation not permitted
Mutex destroy failure: Device busy
2011-08-29 00:09:34.632 MainServer::HandleAnnounce Monitor
2011-08-29 00:09:34.633 adding: kg-jobbpc.kg4.no as a client (events: 0)
2011-08-29 00:09:34.635 MainServer::HandleAnnounce Monitor
2011-08-29 00:09:34.636 adding: kg-jobbpc.kg4.no as a client (events: 1)
2011-08-29 00:09:44.531 MainServer::HandleAnnounce Playback
2011-08-29 00:09:44.532 adding: kg-jobbpc.kg4.no as a client (events: 0)
2011-08-29 00:09:44.534 MainServer::HandleAnnounce FileTransfer
2011-08-29 00:09:44.535 adding: kg-jobbpc.kg4.no as a remote file transfer
2011-08-29 00:10:05.891 MythSocket(6b2b00:18): writeData: Error, zerocnt timeout
Mutex unlock failure: Operation not permitted
Mutex destroy failure: Device busy
2011-08-29 00:10:12.578 MainServer::HandleAnnounce Playback
2011-08-29 00:10:12.579 adding: kg-jobbpc.kg4.no as a client (events: 0)
2011-08-29 00:10:12.597 MainServer::HandleAnnounce FileTransfer
2011-08-29 00:10:12.597 adding: kg-jobbpc.kg4.no as a remote file transfer
2011-08-29 00:11:13.942 MythSocket(6b2c00:18): writeData: Error, zerocnt timeout
Mutex unlock failure: Operation not permitted
Mutex destroy failure: Device busy
2011-08-29 00:11:23.614 MainServer::HandleAnnounce Playback
2011-08-29 00:11:23.615 adding: kg-jobbpc.kg4.no as a client (events: 0)
2011-08-29 00:11:23.617 MainServer::HandleAnnounce FileTransfer
2011-08-29 00:11:23.643 adding: kg-jobbpc.kg4.no as a remote file transfer
Mutex unlock failure: Operation not permitted
Mutex destroy failure: Device busy
2011-08-29 00:12:12.800 MainServer::HandleAnnounce Playback
2011-08-29 00:12:12.801 adding: kg-jobbpc.kg4.no as a client (events: 0)
2011-08-29 00:12:12.826 MainServer::HandleAnnounce FileTransfer
2011-08-29 00:12:12.826 adding: kg-jobbpc.kg4.no as a remote file transfer
2011-08-29 00:12:36.547 MythSocket(6b2c00:18): writeData: Error, zerocnt timeout
Mutex unlock failure: Operation not permitted
Mutex destroy failure: Device busy

Hmm, I wonder what the reason is. The main problem is that this has worked before, with my new hardware. Strange.

2011-08-27: slice 4 - upgraded to FreeBSD 8.2-stable via csup and make world. dmesg output: normal, verbose. Internal NIC seems to work:

root@kg-fil# ifconfig re0
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
    ether 00:25:22:88:aa:b7
    media: Ethernet autoselect (10baseT/UTP <half-duplex>)
    status: no carrier
root@kg-fil# ifconfig -m re0
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
    capabilities=399b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
    ether 00:25:22:88:aa:b7
    media: Ethernet autoselect (10baseT/UTP <half-duplex>)
    status: no carrier
    supported media:
        media autoselect mediaopt flowcontrol
        media autoselect
        media 1000baseT mediaopt full-duplex,flowcontrol,master
        media 1000baseT mediaopt full-duplex,flowcontrol
        media 1000baseT mediaopt full-duplex,master
        media 1000baseT mediaopt full-duplex
        media 1000baseT mediaopt master
        media 1000baseT
        media 100baseTX mediaopt full-duplex,flowcontrol
        media 100baseTX mediaopt full-duplex
        media 100baseTX
        media 10baseT/UTP mediaopt full-duplex,flowcontrol
        media 10baseT/UTP mediaopt full-duplex
        media 10baseT/UTP
        media none
root@kg-fil# pciconf -lv | grep -A 4 re0
re0@pci0:4:0:0:    class=0x020000 card=0x81681849 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet

Good.

2011-08-27: slice 3 - upgraded to FreeBSD 7.4-stable via csup and make world. dmesg output: normal, verbose.

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 7.4-STABLE FreeBSD 7.4-STABLE #1: Sat Aug 27 16:32:02 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

The machine still panics if the modules cxm_iic and cxm are loaded from /boot/loader.conf. I'm using my cxmload script to load the modules later instead. The script lives at

root@kg-fil# ls -l /usr/local/etc/rc.d/cxmload
-rwxr-xr-x  1 root  wheel  512 Jan 25  2010 /usr/local/etc/rc.d/cxmload

and I put this into /etc/rc.conf:

cxmload_enable="YES"

Also, it looks like the integrated NIC is working now:

root@kg-fil# ifconfig re0
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
    ether 00:25:22:88:aa:b7
    media: Ethernet autoselect (10baseT/UTP <half-duplex>)
    status: no carrier
root@kg-fil# ifconfig -m re0
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
    capabilities=399b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
    ether 00:25:22:88:aa:b7
    media: Ethernet autoselect (10baseT/UTP <half-duplex>)
    status: no carrier
    supported media:
        media autoselect mediaopt flowcontrol
        media autoselect
        media 1000baseTX mediaopt full-duplex,flowcontrol,master
        media 1000baseTX mediaopt full-duplex,flowcontrol
        media 1000baseTX mediaopt full-duplex,master
        media 1000baseTX mediaopt full-duplex
        media 1000baseTX mediaopt master
        media 1000baseTX
        media 100baseTX mediaopt full-duplex,flowcontrol
        media 100baseTX mediaopt full-duplex
        media 100baseTX
        media 10baseT/UTP mediaopt full-duplex,flowcontrol
        media 10baseT/UTP mediaopt full-duplex
        media 10baseT/UTP
        media none
root@kg-fil# pciconf -lv | grep -A 4 re0
re0@pci0:4:0:0:    class=0x020000 card=0x81681849 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet

Cool.

2011-08-27: slice 3 - restore of FreeBSD 7.2-stable was a success:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 7.2-STABLE FreeBSD 7.2-STABLE #0: Fri Jan  1 20:50:58 CET 2010     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

Some adjustments in /boot/loader.conf is needed. Remove nfsmb_load="YES", this motherboard has a different smb chip, which is not supported:

root@kg-fil# pciconf -lv | grep -A 4 none0
none0@pci0:0:20:0:    class=0x0c0500 card=0x43851849 chip=0x43851002 rev=0x13 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI SMBus (ATI RD600/RS600)'
    class      = serial bus
    subclass   = SMBus

change sound driver to snd_hda (snd_hda_load="YES"):

root@kg-fil# pciconf -lv | grep -A 4 hda
hdac0@pci0:0:20:2:    class=0x040300 card=0x03971849 chip=0x43831002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA

That's about it.

2011-08-27: data rescue: today I'm trying to restore slice 3 from a backup. First I boot on slice 4 (that's where he backups are) and mount the image for slice 3:

root@kg-fil# mdconfig -f /home/tingo/backups/fil-s3.image
md0
root@kg-fil# ls -l /dev/md0*
crw-r-----  1 root  operator    0, 132 Aug 27 14:21 /dev/md0
crw-r-----  1 root  operator    0, 136 Aug 27 14:21 /dev/md0a
crw-r-----  1 root  operator    0, 137 Aug 27 14:21 /dev/md0d
crw-r-----  1 root  operator    0, 138 Aug 27 14:21 /dev/md0e
crw-r-----  1 root  operator    0, 139 Aug 27 14:21 /dev/md0f

Ok, then fsck. root partition first:

root@kg-fil# fsck_ffs -y /dev/md0a
** /dev/md0a
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1713 files, 61725 used, 192090 free (1730 frags, 23795 blocks, 0.7% fragmentation)

***** FILE SYSTEM IS CLEAN *****

then /var:

root@kg-fil# fsck_ffs -y /dev/md0d
** /dev/md0d
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
3139 files, 32686 used, 971625 free (497 frags, 121391 blocks, 0.0% fragmentation)

***** FILE SYSTEM IS CLEAN *****

and /tmp:

root@kg-fil# fsck_ffs -y /dev/md0e
** /dev/md0e
** Last Mounted on /tmp
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
15 files, 108 used, 253707 free (43 frags, 31708 blocks, 0.0% fragmentation)

***** FILE SYSTEM IS CLEAN *****

Finally, /usr:

root@kg-fil# fsck_ffs -y /dev/md0f
** /dev/md0f
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
338357 files, 3038440 used, 4585867 free (77491 frags, 563547 blocks, 1.0% fragmentation)

***** FILE SYSTEM IS CLEAN *****

Everything ok. Nice. Now, the restore operation.

root@kg-fil# mount /dev/ad0s3a /mnt
root@kg-fil# dump -C16 -0af - /dev/md0a | ( cd /mnt; restore -rf - )
  DUMP: Date of this level 0 dump: Sat Aug 27 14:33:07 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md0a to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: Cache 16 MB, blocksize = 65536
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 122456 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
  DUMP: DUMP: 122456 tape blocks
  DUMP: finished in 20 seconds, throughput 6122 KBytes/sec
  DUMP: DUMP IS DONE

That was the root file system.

root@kg-fil# mount /dev/ad0s3d /mnt/var
root@kg-fil# dump -C16 -0af - /dev/md0d | ( cd /mnt/var; restore -rf - )
  DUMP: Date of this level 0 dump: Sat Aug 27 14:36:19 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md0d to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: Cache 16 MB, blocksize = 65536
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 66058 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
  DUMP: DUMP: 66024 tape blocks
  DUMP: finished in 7 seconds, throughput 9432 KBytes/sec
  DUMP: DUMP IS DONE

done with /var.

root@kg-fil# mount /dev/ad0s3e /mnt/tmp
root@kg-fil# dump -C16 -0af - /dev/md0e | ( cd /mnt/tmp; restore -rf - )
  DUMP: Date of this level 0 dump: Sat Aug 27 14:38:30 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md0e to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: Cache 16 MB, blocksize = 65536
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 260 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
  DUMP: DUMP: 251 tape blocks
  DUMP: finished in less than a second
  DUMP: DUMP IS DONE

and /tmp done.

root@kg-fil# mount /dev/ad0s3f /mnt/usr
root@kg-fil# dump -C16 -0af - /dev/md0f | ( cd /mnt/usr; restore -rf - )
  DUMP: Date of this level 0 dump: Sat Aug 27 14:39:52 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md0f to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: Cache 16 MB, blocksize = 65536
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 6113290 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
  DUMP: 25.10% done, finished in 0:14 at Sat Aug 27 14:59:48 2011
  DUMP: 55.67% done, finished in 0:07 at Sat Aug 27 14:57:51 2011
  DUMP: 88.57% done, finished in 0:01 at Sat Aug 27 14:56:50 2011
  DUMP: DUMP: 6120767 tape blocks
  DUMP: finished in 1029 seconds, throughput 5948 KBytes/sec
  DUMP: DUMP IS DONE

finally, /usr done. I fixed /etc/rc.conf to use xl0 as the network interface, and /etc/dhclient.conf so that it will request a known ip address.

2011-08-15: slice 4 - network: changed /etc/rc.conf so that the 3C905B-TX card is used:

ifconfig_xl0="DHCP"

from /var/log/messages:

xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
miibus1: <MII bus> on xl0
xlphy0: <3Com internal media interface> PHY 24 on miibus1
xlphy0:  10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, auto, auto-flow
xl0: Ethernet address: 00:10:5a:6c:21:15
xl0: [ITHREAD]
xl0: link state changed to UP

2011-08-15: slice 2 - network: I replaced the wireless PCI NIX with a 3Com 3C905B-TX, which shows up as:

root@kg-fil# pciconf -lv | grep -A 4 xl0
xl0@pci2:6:0:    class=0x020000 card=0x905510b7 chip=0x905510b7 rev=0x30 hdr=0x00
    vendor     = '3COM Corp, Networking Division'
    device     = '3C905-TX Fast Etherlink 10/100 PCI TX NIC'
    class      = network
    subclass   = ethernet
root@kg-fil# ifconfig -m xl0
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=9<RXCSUM,VLAN_MTU>
    capabilities=9<RXCSUM,VLAN_MTU>
    inet 10.1.10.4 netmask 0xffff0000 broadcast 10.1.255.255
    ether 00:10:5a:6c:21:15
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
    supported media:
        media autoselect
        media 100baseTX mediaopt full-duplex
        media 100baseTX
        media 10baseT/UTP mediaopt full-duplex
        media 10baseT/UTP
        media 100baseTX mediaopt hw-loopback

from /var/log/messages:

xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xfebffc00-0xfebffc7f irq 21 at device 6.0 on pci2
miibus0: <MII bus> on xl0
xlphy0: <3Com internal media interface> on miibus0
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl0: Ethernet address: 00:10:5a:6c:21:15

As expected, it just works.

2011-08-14: slice 2 - MythTV: yes, recording works. As I expected, my wireless network doesn't have bandwidth enough for playback when both the MythTV backend (this machine) and the MythTV frontend (Mac mini G4) is on wireless; too much breakups in the video stream.

2011-08-14: slice 2 - apinger showed errors in /var/log/messages, like this:

Aug 14 20:37:34 kg-fil apinger: Error while sending mail.
Aug 14 20:37:34 kg-fil apinger: sendmail exited with status: 127

This is because the default mailer of apinger is /usr/lib/sendmail, but in FreeBSD, sendmail is at /usr/sbin/sendmail. Fixed by adding a line to /usr/local/etc/apinger.conf:

mailer "/usr/sbin/sendmail -t"

and restarting apinger:

root@kg-fil# /usr/local/etc/rc.d/apinger.sh stop
root@kg-fil# /usr/local/etc/rc.d/apinger.sh start

That is all.

2011-08-14: slice 2 - tested MythTV (0.20): LiveTV appears to be working, scheduling appears to be working. Later I will know if recording works, too.

2011-08-14: slice 2 - the network card (ral0) stops responding if there is too much time without packets; I can see this in the log of my ntp server:

Aug 14 02:18:36 kg-omni1 ntpd[3007]: sendto(10.1.10.4) (fd=26): Host is down
Aug 14 02:19:52 kg-omni1 ntpd[3007]: sendto(10.1.10.4) (fd=26): Host is down
Aug 14 02:24:00 kg-omni1 ntpd[3007]: sendto(10.1.10.4) (fd=26): Host is down

If I go to the console of the machine and start a ping to another machine, it starts working again.As a workaround, I have installed the apinger port and configured it to monitor another server (web). Hopefully this will be enough to keep ral0 working all the time.

2011-08-13: slice 2 - adding a mirror, using to newly added disks:

root@kg-fil# kldload geom_mirror
root@kg-fil# gmirror label store2 ad4 ad6
root@kg-fil# ls -l /dev/mirror/s*
crw-r-----  1 root  operator    0, 131 Aug 13 22:11 /dev/mirror/store2

and newfs it:

root@kg-fil# newfs /dev/mirror/store2
Reduced frags per cylinder group from 94064 to 94056 to enlarge last cyl group
/dev/mirror/store2: 953869.7MB (1953525164 sectors) block size 16384, fragment size 2048
    using 5193 cylinder groups of 183.70MB, 11757 blks, 23552 inodes.
super-block backups (for fsck -b #) at:

(output truncated) create a mountpoint, and set rights:

root@kg-fil# mkdir /backup
root@kg-fil# chgrp users /backup
root@kg-fil# chmod g+w /backup

and mount it:

root@kg-fil# mount /dev/mirror/store2 /backup

remember to fix /etc/fstab, and /boot/loader.conf.

2011-08-13: slice 2 - installing a few more ports: mysql-server-5.1.15, smartmontools-5.37, xfce-4.4.0, xorg-6.9.0, p5-xmltv-0.5.45, mythtv-0.20,

2011-08-13: slice 2 - I copied /usr/ports from slice 1 to this slice. Trying to install the pvrxxx port:

root@kg-fil# pwd
/usr/ports/multimedia/pvrxxx

patching iicbb

root@kg-fil# make patch-iicbb
Hmm...  Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** dev/iicbus/iicbb.c.ORIGINAL    Sun Aug 24 13:49:13 2003
|--- dev/iicbus/iicbb.c    Fri Jul  1 15:55:21 2005
--------------------------
Patching file dev/iicbus/iicbb.c using Plan A...
Hunk #1 succeeded at 66.
Hunk #2 succeeded at 83.
Hunk #3 succeeded at 132.
Hunk #4 succeeded at 404 with fuzz 1.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** dev/iicbus/iicbus_if.m.ORIGINAL    Wed Apr 13 14:25:01 2005
|--- dev/iicbus/iicbus_if.m    Mon Oct 24 00:51:05 2005
--------------------------
Patching file dev/iicbus/iicbus_if.m using Plan A...
Reversed (or previously applied) patch detected!  Assume -R? [y] n
Apply anyway? [n]
Hunk #1 ignored at 91.
1 out of 1 hunks ignored--saving rejects to dev/iicbus/iicbus_if.m.rej
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** dev/iicbus/iiconf.h.ORIGINAL    Wed Jun 16 22:51:57 2004
|--- dev/iicbus/iiconf.h    Mon Oct 24 00:43:41 2005
--------------------------
Patching file dev/iicbus/iiconf.h using Plan A...
Hunk #1 succeeded at 116 (offset 2 lines).
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** dev/iicbus/iiconf.c.ORIGINAL    Wed Jun 16 22:51:57 2004
|--- dev/iicbus/iiconf.c    Mon Oct 24 00:47:32 2005
--------------------------
Patching file dev/iicbus/iiconf.c using Plan A...
Hunk #1 succeeded at 234.
done
*** Error code 1

Stop in /usr/ports/multimedia/pvrxxx.

Now build a new kernel.

root@kg-fil# cd /usr/src
root@kg-fil# ln -s /root/kernels/FIL62 /sys/amd64/conf
root@kg-fil# make kernel KERNCONF=FIL62

if that works... the kernel config file is simple:

root@kg-fil# more /sys/amd64/conf/FIL62
#
# FIL62    - GENERIC kernel for FreeBSD 6.x, plus iic bus
#            kernel configuration file for FreeBSD/amd64
#
include GENERIC

ident   FIL62-GENERIC

#iic bus
device          iicbus
device          iicbb

Well, the pvrxxx port didn't work (it's old). I just got the updated port (pvrxxx-20080409_2) from: http://www.muc.de/~ag/pvrxxx-20080409_1.tgz and compiled that. After a reboot, I load the modules (cxm_iic, cxm) output in /var/log/messages:

Aug 13 17:57:56 kg-fil kernel: kldload: /boot/modules/cxm_iic.ko: Unsupported file type
Aug 13 17:58:02 kg-fil kernel: kldload: /boot/modules/cxm.ko: Unsupported file type
Aug 13 17:58:02 kg-fil kernel: kldload: /boot/kernel/firmware.ko: Unsupported file type
Aug 13 17:58:02 kg-fil kernel: cxm0: <Conexant iTVC16 MPEG Coder> mem 0xf4000000-0xf7ffffff irq 20 at device 8.0 on pci3
Aug 13 17:58:02 kg-fil kernel: cxm_iic0: <Conexant iTVC15 / iTVC16 I2C controller> on cxm0
Aug 13 17:58:02 kg-fil kernel: iicbb0: <I2C bit-banging driver> on cxm_iic0
Aug 13 17:58:02 kg-fil kernel: iicbus0: <Philips I2C bus> on iicbb0 master-only
Aug 13 17:58:02 kg-fil kernel: <2>tveeprom: Second (radio) tuner idx 101
Aug 13 17:58:02 kg-fil kernel: <2>tveeprom: ivtv version
Aug 13 17:58:02 kg-fil kernel: <2>tveeprom: Hauppauge: model = 23559, rev = D591, serial# = 2990584
Aug 13 17:58:02 kg-fil kernel: <2>tveeprom: tuner = Philips FQ1216AME MK4 (idx = 91, type = 56)
Aug 13 17:58:02 kg-fil kernel: <2>tveeprom: tuner fmt = PAL(B/G) PAL(I) SECAM(L/L') PAL(D/K) (eeprom = 0x74, v4l2 = 0x00400e17)
Aug 13 17:58:02 kg-fil kernel: <2>tveeprom: audio processor = CX25843 (type = 25)
Aug 13 17:58:02 kg-fil kernel: <2>tveeprom: decoder processor = CX25843 (type = 1e)
Aug 13 17:58:02 kg-fil kernel: tuner type: 56
Aug 13 17:58:02 kg-fil kernel: cxm0: Eeprom PAL
Aug 13 17:58:02 kg-fil kernel: tuner: type set to 56 (Philips PAL/SECAM multi (FQ1216AME MK4)) by cxm
Aug 13 17:58:02 kg-fil kernel: tuner: switching to v4l2
Aug 13 17:58:02 kg-fil kernel: before tuner_command!
Aug 13 17:58:02 kg-fil kernel: tuner: tv freq set to 55.25
Aug 13 17:58:02 kg-fil kernel: tuner: tv 0x05 0xe3 0xce 0x01
Aug 13 17:58:16 kg-fil kernel: kldload: /boot/modules/cxm_cx25840fw.ko: Unsupported file type
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Video signal:              not present
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Detected format:           NTSC-M
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Detected audio mode:       forced mode
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Detected audio standard:   forced audio standard
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Audio muted:               yes
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Audio microcontroller:     running
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Configured audio standard: A2-BG
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Configured audio mode:     undefined
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Specified standard:        PAL-BDGHI
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Specified input:           Tuner
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Specified audio input:     Tuner
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Specified audioclock freq: 48 kHz
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Preferred audio mode:      stereo
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Selected 65 MHz format:    autodetect
Aug 13 17:58:16 kg-fil kernel: <2>cxm 0-0000: Selected 45 MHz format:    chroma
Aug 13 17:58:16 kg-fil kernel: kldload: /boot/modules/cxm_encfw.ko: Unsupported file type
Aug 13 17:58:18 kg-fil kernel: cxm0: encoder firmware version 0x2060039
Aug 13 17:58:18 kg-fil kernel: cxm1: <Conexant iTVC16 MPEG Coder> mem 0xf0000000-0xf3ffffff irq 21 at device 9.0 on pci3
Aug 13 17:58:18 kg-fil kernel: cxm_iic1: <Conexant iTVC15 / iTVC16 I2C controller> on cxm1
Aug 13 17:58:18 kg-fil kernel: iicbb1: <I2C bit-banging driver> on cxm_iic1
Aug 13 17:58:18 kg-fil kernel: iicbus1: <Philips I2C bus> on iicbb1 master-only
Aug 13 17:58:18 kg-fil kernel: <2>tveeprom: Second (radio) tuner idx 101
Aug 13 17:58:18 kg-fil kernel: <2>tveeprom: ivtv version
Aug 13 17:58:18 kg-fil kernel: <2>tveeprom: Hauppauge: model = 23559, rev = D591, serial# = 2990584
Aug 13 17:58:18 kg-fil kernel: <2>tveeprom: tuner = Philips FQ1216AME MK4 (idx = 91, type = 56)
Aug 13 17:58:18 kg-fil kernel: <2>tveeprom: tuner fmt = PAL(B/G) PAL(I) SECAM(L/L') PAL(D/K) (eeprom = 0x74, v4l2 = 0x00400e17)
Aug 13 17:58:18 kg-fil kernel: <2>tveeprom: audio processor = CX25843 (type = 25)
Aug 13 17:58:18 kg-fil kernel: <2>tveeprom: decoder processor = CX25843 (type = 1e)
Aug 13 17:58:18 kg-fil kernel: tuner type: 56
Aug 13 17:58:18 kg-fil kernel: cxm1: Eeprom PAL
Aug 13 17:58:18 kg-fil kernel: tuner: type set to 56 (Philips PAL/SECAM multi (FQ1216AME MK4)) by cxm
Aug 13 17:58:18 kg-fil kernel: tuner: switching to v4l2
Aug 13 17:58:18 kg-fil kernel: before tuner_command!
Aug 13 17:58:18 kg-fil kernel: tuner: tv freq set to 55.25
Aug 13 17:58:18 kg-fil kernel: tuner: tv 0x05 0xe3 0xce 0x01
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Video signal:              not present
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Detected format:           NTSC-M
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Detected audio mode:       forced mode
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Detected audio standard:   forced audio standard
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Audio muted:               yes
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Audio microcontroller:     running
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Configured audio standard: A2-BG
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Configured audio mode:     undefined
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Specified standard:        PAL-BDGHI
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Specified input:           Tuner
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Specified audio input:     Tuner
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Specified audioclock freq: 48 kHz
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Preferred audio mode:      stereo
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Selected 65 MHz format:    autodetect
Aug 13 17:58:33 kg-fil kernel: <2>cxm 0-0000: Selected 45 MHz format:    chroma
Aug 13 17:58:33 kg-fil kernel: cxm1: encoder firmware version 0x2060039

It loads at least. Hopefully if it works too.

2011-08-13: slice 2 - upgraded to FreeBSD 6.4-stable via csup, make world. dmesg output: normal, verbose.

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.4-STABLE FreeBSD 6.4-STABLE #0: Sat Aug 13 15:54:21 CEST 2011     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
Unfortunately, the integrated network card isn't detected:
root@kg-fil# pciconf -lv | grep -A 4 none2
none2@pci4:0:0:    class=0x020000 card=0x81681849 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC'
    class      = network
    subclass   = ethernet

From dmesg:

root@kg-fil# dmesg | grep pci4
pci4: <ACPI PCI bus> on pcib2
pci4: <network, ethernet> at device 0.0 (no driver attached)
pci4: <ACPI PCI bus> on pcib2
pci4: physical bus=4
pci4: <network, ethernet> at device 0.0 (no driver attached)
pci4: driver added
pci4:0:0: reprobing on driver added

I need a new network card, or I'll have to settle for wireless.

2011-08-13: slice 2 - I installed FreeBSD 6.4-release from a CD by using Custom Install. Since the re0 network interface still isn't working, I installed a usb wireless adapter (ural0) and configured that. dmesg output: normal, verbose.

tingo@kg-fil$ uname -a
FreeBSD kg-fil.kg4.no 6.4-RELEASE FreeBSD 6.4-RELEASE #0: Wed Nov 26 08:21:48 UTC 2008     root@palmer.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
tingo@kg-fil$ usbdevs -v -f /dev/usb5 -a 2
Controller /dev/usb5:
addr 2: high speed, power 300 mA, config 1, 802.11g WLAN + Pen Drive(0x6861), Ralink(0x0db0), rev 0.01
tingo@kg-fil$ ifconfig ural0
ural0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet 10.1.10.4 netmask 0xffff0000 broadcast 10.1.255.255
    ether 00:13:d3:7a:b8:c1
    media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/9Mbps)
    status: associated
    ssid kg4 channel 13 bssid 00:0f:66:51:aa:41
    authmode WPA privacy ON deftxkey UNDEF TKIP 2:128-bit txpowmax 100
    bmiss 7 protmode CTS roaming MANUAL bintval 100

Now on to upgrade to newest -stable. Unfortunately, the ural0 network adapter made the machine panic all the time:

root@kg-fil# more /var/crash/info.0
Dump header from device /dev/ad0s1b
  Architecture: amd64
  Architecture Version: 2
  Dump Length: 4294180864B (4095 MB)
  Blocksize: 512
  Dumptime: Sat Aug 13 14:17:46 2011
  Hostname: kg-fil.kg4.no
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 6.4-RELEASE #0: Wed Nov 26 08:21:48 UTC 2008
    root@palmer.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
  Panic String: page fault
  Dump Parity: 2003213558
  Bounds: 0
  Dump Status: good

So now I'll try another adapter:

root@kg-fil# pciconf -lv | grep -A 3 ral0
ral0@pci2:6:0:    class=0x028000 card=0x25611814 chip=0x03011814 rev=0x00 hdr=0x00
    vendor     = 'Ralink Technology, Corp'
    device     = 'RT2561/RT61 802.11g PCI'
    class      = network
root@kg-fil# ifconfig ral0
ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet 10.1.10.4 netmask 0xffff0000 broadcast 10.1.255.255
    ether 00:11:6b:38:d9:ca
    media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
    status: associated
    ssid kg4 channel 13 bssid 00:0f:66:51:aa:41
    authmode WPA privacy ON deftxkey UNDEF TKIP 3:128-bit txpowmax 100
    bmiss 7 protmode CTS roaming MANUAL bintval 100

From dmesg

root@kg-fil# dmesg | grep ral0
ral0: <Ralink Technology RT2561S> mem 0xfebf8000-0xfebfffff irq 21 at device 6.0 on pci2
ral0: MAC/BBP RT2661B, RF RT2527
ral0: Ethernet address: 00:11:6b:38:d9:ca
ral0: link state changed to UP

We'll soon see if this one is any better. Looks good so far; I have now updated the source via csup.

2011-08-13: slice 1 - ok, FreeBSD 6.2-stable is working again. But - as before; the internal network card isn't detected (none3@pci4:0:0). The separate pci network card is detected as re0 (re0@pci2:6:0, RTL8169 Gigabit Ethernet Adapter), ifconfig shows it as up, unfortunately it doesn't work; no packets are passing through. I need to get a working net interface so that I can update this machine. I found a FreeBSD 6.3-release cd, booted and tested with that, no re0 doesn't pass packets there either. I'll try with a FreeBSD 6.4 cd.

2011-08-12 data rescue. I used another machine (vm) to recover the data from the old hard drive; I connected the hard drive via an usb-to-ide adapter and used dd_rescue on each slice. On slice 2 there was only errors, but slice 1 and slice 3 seems to have worked, now it is time to see what I can get out of them. First, mount the image for slice 1:

root@kg-fil# mdconfig -f /home/tingo/backups/fil-s1.image
md0
root@kg-fil# ls -l /dev/md0*
crw-r-----  1 root  operator    0, 134 Aug 13 00:57 /dev/md0
crw-r-----  1 root  operator    0, 135 Aug 13 00:57 /dev/md0a
crw-r-----  1 root  operator    0, 136 Aug 13 00:57 /dev/md0b
crw-r-----  1 root  operator    0, 137 Aug 13 00:57 /dev/md0d
crw-r-----  1 root  operator    0, 138 Aug 13 00:57 /dev/md0e
crw-r-----  1 root  operator    0, 139 Aug 13 00:57 /dev/md0f

Ok. Check with fsck, root file system first:

root@kg-fil# fsck_ffs -y /dev/md0a
** /dev/md0a
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1421 files, 34926 used, 218889 free (465 frags, 27303 blocks, 0.2% fragmentation)

***** FILE SYSTEM IS CLEAN *****

Skip the swap partition (b).

root@kg-fil# fsck_ffs -y /dev/md0d
** /dev/md0d
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2468 files, 80563 used, 546868 free (924 frags, 68243 blocks, 0.1% fragmentation)

***** FILE SYSTEM MARKED CLEAN *****

And /var checked out fine too.

root@kg-fil# fsck_ffs -y /dev/md0f
** /dev/md0f
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
325615 files, 4800117 used, 2185021 free (71517 frags, 264188 blocks, 1.0% fragmentation)

***** FILE SYSTEM IS CLEAN *****

Finally, /usr was clean. Good. mount the receiving root file system:

root@kg-fil# mount /dev/ad0s1a /mnt

Restore the root file system on slice 1:

root@kg-fil# dump -C16 -0af - /dev/md0a | ( cd /mnt; restore -rf - )
  DUMP: Date of this level 0 dump: Sat Aug 13 01:18:57 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md0a to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: Cache 16 MB, blocksize = 65536
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 69725 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
  DUMP: DUMP: 69724 tape blocks
  DUMP: finished in 12 seconds, throughput 5810 KBytes/sec
  DUMP: DUMP IS DONE

Seems to have worked. Next, the /var file system:

root@kg-fil# mount /dev/ad0s1d /mnt/var
root@kg-fil# dump -C16 -0af - /dev/md0d | ( cd /mnt/var; restore -rf - )
  DUMP: Date of this level 0 dump: Sat Aug 13 01:24:33 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md0d to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: Cache 16 MB, blocksize = 65536
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 161141 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
  DUMP: DUMP: 161121 tape blocks
  DUMP: finished in 23 seconds, throughput 7005 KBytes/sec
  DUMP: DUMP IS DONE

That one worked too. Next, /tmp:

root@kg-fil# dump -C16 -0af - /dev/md0e | ( cd /mnt/tmp; restore -rf - )
  DUMP: Date of this level 0 dump: Sat Aug 13 01:27:33 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md0e to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: Cache 16 MB, blocksize = 65536
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 377 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
  DUMP: DUMP: 369 tape blocks
  DUMP: finished in less than a second
  DUMP: DUMP IS DONE

OK, done with that. Finally, /usr:

root@kg-fil# mount /dev/ad0s1f /mnt/usr
root@kg-fil# dump -C16 -0af - /dev/md0f | ( cd /mnt/usr; restore -rf - )
  DUMP: Date of this level 0 dump: Sat Aug 13 01:29:42 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md0f to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: Cache 16 MB, blocksize = 65536
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 9650044 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
  DUMP: 5.46% done, finished in 1:26 at Sat Aug 13 03:01:19 2011
  DUMP: 14.28% done, finished in 1:00 at Sat Aug 13 02:39:46 2011
  DUMP: 23.32% done, finished in 0:49 at Sat Aug 13 02:34:04 2011
  DUMP: 36.48% done, finished in 0:34 at Sat Aug 13 02:24:34 2011
  DUMP: 43.98% done, finished in 0:31 at Sat Aug 13 02:26:35 2011
  DUMP: 52.08% done, finished in 0:27 at Sat Aug 13 02:27:21 2011
  DUMP: 89.59% done, finished in 0:04 at Sat Aug 13 02:08:49 2011
  DUMP: DUMP: 9657246 tape blocks
  DUMP: finished in 2184 seconds, throughput 4421 KBytes/sec
  DUMP: DUMP IS DONE

Great. Now to boot and test it.

2011-08-11: slice 4 - Installing FreeBSD 8.2-release. I had to use a usb dvd drive to install from, since the hard drive would not show up if the internal dvd drive was connected on the same cable. Perhaps the internal dvd drive is set for master, not for cable select. After install, it looks like this:

root@kg-fil# mount
/dev/ad0s4a on / (ufs, local)
devfs on /dev (devfs, local, multilabel)
/dev/ad0s4e on /tmp (ufs, local, soft-updates)
/dev/ad0s4f on /usr (ufs, local, soft-updates)
/dev/ad0s4d on /var (ufs, local, soft-updates)

root@kg-fil# more /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s1b             none            swap    sw              0       0
/dev/ad0s4a             /               ufs     rw              1       1
/dev/ad0s4e             /tmp            ufs     rw              2       2
/dev/ad0s4f             /usr            ufs     rw              2       2
/dev/ad0s4d             /var            ufs     rw              2       2
root@kg-fil# swapinfo -h
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b      16777216       0B      16G     0%
root@kg-fil# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s4a    989M    273M    638M    30%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad0s4e    989M     12K    910M     0%    /tmp
/dev/ad0s4f     47G    168M     43G     0%    /usr
/dev/ad0s4d    7.7G    354K    7.1G     0%    /var

That is: 16 GB swap, 1G / (root), 1 GB /tmp, 7.7 GB /var and the rest (47 GB) for /usr. bsdlabel shows:

root@kg-fil# bsdlabel ad0s4
# /dev/ad0s4:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152        0    4.2BSD        0     0     0
  c: 121827888        0    unused        0     0         # "raw" part, don't edit
  d: 16740352  2097152    4.2BSD        0     0     0
  e:  2097152 18837504    4.2BSD        0     0     0
  f: 100893232 20934656    4.2BSD        0     0     0

Now, let's check slice 1 (keep in min that there is a swap partition there and change it):

root@kg-fil# bsdlabel ad0s1
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152        0    4.2BSD        0     0     0
  b: 33554432  2097152      swap                   
  c: 167771457        0    unused        0     0         # "raw" part, don't edit

changing it with bsdlabel -e ad0s1 (use '*' for offset, bsdlabel will auto calulate the offset): in the editor:

# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152        0    4.2BSD        0     0     0
  b: 33554432  2097152      swap
  c: 167771457        0    unused        0     0         # "raw" part, don't edit
  d: 16740352   *       4.2BSD  0       0       0
  e:  2097152   *       4.2BSD  0       0       0
  f:    *       *       4.2BSD  0       0       0

(tells it to use auto offset ('*') and auto size of the last partition (f)). result "Operation not permitted". Bah. Trying bsdlabel -e ad0s2. In editor:

# /dev/ad0s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 2097152       *    4.2BSD        0     0
  c: 167771520        0    unused        0     0         # "raw" part, don't edit
  d: 16740352  *    4.2BSD        0     0     0
  e:  2097152 *    4.2BSD        0     0     0
  f: * *    4.2BSD        0     0     0

Will it work? Yes, it did:

root@kg-fil# bsdlabel ad0s2
# /dev/ad0s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152       16    4.2BSD        0     0     0
  c: 167771520        0    unused        0     0         # "raw" part, don't edit
  d: 16740352  2097168    4.2BSD        0     0     0
  e:  2097152 18837520    4.2BSD        0     0     0
  f: 146836848 20934672    4.2BSD        0     0     0

Cool. Next up is slice 3: bsdlabel -e ad0s3. Worked out nicely:

root@kg-fil# bsdlabel ad0s3
# /dev/ad0s3:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152       16    4.2BSD        0     0     0
  c: 167771520        0    unused        0     0         # "raw" part, don't edit
  d: 16740352  2097168    4.2BSD        0     0     0
  e:  2097152 18837520    4.2BSD        0     0     0
  f: 146836848 20934672    4.2BSD        0     0     0

Let's turn off swap and try labeling slice 1 again:

root@kg-fil# swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b      16777216        0 16777216     0%
root@kg-fil# swapoff /dev/ad0s1b

swap is off. and bsdlabel -e ad0s1 now works.

root@kg-fil# bsdlabel ad0s1
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152        0    4.2BSD        0     0     0
  b: 33554432  2097152      swap                   
  c: 167771457        0    unused        0     0         # "raw" part, don't edit
  d: 16740352 35651584    4.2BSD        0     0     0
  e:  2097152 52391936    4.2BSD        0     0     0
  f: 113282369 54489088    4.2BSD        0     0     0

Ok, then it is newfs on slice 1:

root@kg-fil# newfs /dev/ad0s1a
/dev/ad0s1a: 1024.0MB (2097152 sectors) block size 16384, fragment size 2048
    using 6 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440
root@kg-fil# newfs -U /dev/ad0s1d
/dev/ad0s1d: 8174.0MB (16740352 sectors) block size 16384, fragment size 2048
    using 45 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440, 2257696, 2633952, 3010208, 3386464, 3762720, 4138976, 4515232,
 4891488, 5267744, 5644000, 6020256, 6396512, 6772768, 7149024, 7525280, 7901536, 8277792, 8654048, 9030304,
 9406560, 9782816, 10159072, 10535328, 10911584, 11287840, 11664096, 12040352, 12416608, 12792864, 13169120,
 13545376, 13921632, 14297888, 14674144, 15050400, 15426656, 15802912, 16179168, 16555424
root@kg-fil# newfs -U /dev/ad0s1e
/dev/ad0s1e: 1024.0MB (2097152 sectors) block size 16384, fragment size 2048
    using 6 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440
root@kg-fil# newfs -U /dev/ad0s1f
/dev/ad0s1f: 55313.7MB (113282368 sectors) block size 16384, fragment size 2048
    using 302 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440, 2257696, 2633952, 3010208, 3386464, 3762720, 4138976, 4515232,
 4891488, 5267744, 5644000, 6020256, 6396512, 6772768, 7149024, 7525280, 7901536, 8277792, 8654048, 9030304,
 9406560, 9782816, 10159072, 10535328, 10911584, 11287840, 11664096, 12040352, 12416608, 12792864, 13169120,
 13545376, 13921632, 14297888, 14674144, 15050400, 15426656, 15802912, 16179168, 16555424, 16931680, 17307936,
 17684192, 18060448, 18436704, 18812960, 19189216, 19565472, 19941728, 20317984, 20694240, 21070496, 21446752,
 21823008, 22199264, 22575520, 22951776, 23328032, 23704288, 24080544, 24456800, 24833056, 25209312, 25585568,
 25961824, 26338080, 26714336, 27090592, 27466848, 27843104, 28219360, 28595616, 28971872, 29348128, 29724384,
 30100640, 30476896, 30853152, 31229408, 31605664, 31981920, 32358176, 32734432, 33110688, 33486944, 33863200,
 34239456, 34615712, 34991968, 35368224, 35744480, 36120736, 36496992, 36873248, 37249504, 37625760, 38002016,
 38378272, 38754528, 39130784, 39507040, 39883296, 40259552, 40635808, 41012064, 41388320, 41764576, 42140832,
 42517088, 42893344, 43269600, 43645856, 44022112, 44398368, 44774624, 45150880, 45527136, 45903392, 46279648,
 46655904, 47032160, 47408416, 47784672, 48160928, 48537184, 48913440, 49289696, 49665952, 50042208, 50418464,
 50794720, 51170976, 51547232, 51923488, 52299744, 52676000, 53052256, 53428512, 53804768, 54181024, 54557280,
 54933536, 55309792, 55686048, 56062304, 56438560, 56814816, 57191072, 57567328, 57943584, 58319840, 58696096,
 59072352, 59448608, 59824864, 60201120, 60577376, 60953632, 61329888, 61706144, 62082400, 62458656, 62834912,
 63211168, 63587424, 63963680, 64339936, 64716192, 65092448, 65468704, 65844960, 66221216, 66597472, 66973728,
 67349984, 67726240, 68102496, 68478752, 68855008, 69231264, 69607520, 69983776, 70360032, 70736288, 71112544,
 71488800, 71865056, 72241312, 72617568, 72993824, 73370080, 73746336, 74122592, 74498848, 74875104, 75251360,
 75627616, 76003872, 76380128, 76756384, 77132640, 77508896, 77885152, 78261408, 78637664, 79013920, 79390176,
 79766432, 80142688, 80518944, 80895200, 81271456, 81647712, 82023968, 82400224, 82776480, 83152736, 83528992,
 83905248, 84281504, 84657760, 85034016, 85410272, 85786528, 86162784, 86539040, 86915296, 87291552, 87667808,
 88044064, 88420320, 88796576, 89172832, 89549088, 89925344, 90301600, 90677856, 91054112, 91430368, 91806624,
 92182880, 92559136, 92935392, 93311648, 93687904, 94064160, 94440416, 94816672, 95192928, 95569184, 95945440,
 96321696, 96697952, 97074208, 97450464, 97826720, 98202976, 98579232, 98955488, 99331744, 99708000, 100084256,
 100460512, 100836768, 101213024, 101589280, 101965536, 102341792, 102718048, 103094304, 103470560, 103846816,
 104223072, 104599328, 104975584, 105351840, 105728096, 106104352, 106480608, 106856864, 107233120, 107609376,
 107985632, 108361888, 108738144, 109114400, 109490656, 109866912, 110243168, 110619424, 110995680, 111371936,
 111748192, 112124448, 112500704, 112876960, 113253216

slice 2:

root@kg-fil# newfs /dev/ad0s2a
/dev/ad0s2a: 1024.0MB (2097152 sectors) block size 16384, fragment size 2048
    using 6 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440
root@kg-fil# newfs -U /dev/ad0s2d
/dev/ad0s2d: 8174.0MB (16740352 sectors) block size 16384, fragment size 2048
    using 45 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440, 2257696, 2633952, 3010208, 3386464, 3762720, 4138976, 4515232,
 4891488, 5267744, 5644000, 6020256, 6396512, 6772768, 7149024, 7525280, 7901536, 8277792, 8654048, 9030304,
 9406560, 9782816, 10159072, 10535328, 10911584, 11287840, 11664096, 12040352, 12416608, 12792864, 13169120,
 13545376, 13921632, 14297888, 14674144, 15050400, 15426656, 15802912, 16179168, 16555424
root@kg-fil# newfs -U /dev/ad0s2e
/dev/ad0s2e: 1024.0MB (2097152 sectors) block size 16384, fragment size 2048
    using 6 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440
root@kg-fil# newfs -U /dev/ad0s2f
/dev/ad0s2f: 71697.7MB (146836848 sectors) block size 16384, fragment size 2048
    using 391 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440, 2257696, 2633952, 3010208, 3386464, 3762720, 4138976, 4515232,
 4891488, 5267744, 5644000, 6020256, 6396512, 6772768, 7149024, 7525280, 7901536, 8277792, 8654048, 9030304,
 9406560, 9782816, 10159072, 10535328, 10911584, 11287840, 11664096, 12040352, 12416608, 12792864, 13169120,
 13545376, 13921632, 14297888, 14674144, 15050400, 15426656, 15802912, 16179168, 16555424, 16931680, 17307936,
 17684192, 18060448, 18436704, 18812960, 19189216, 19565472, 19941728, 20317984, 20694240, 21070496, 21446752,
 21823008, 22199264, 22575520, 22951776, 23328032, 23704288, 24080544, 24456800, 24833056, 25209312, 25585568,
 25961824, 26338080, 26714336, 27090592, 27466848, 27843104, 28219360, 28595616, 28971872, 29348128, 29724384,
 30100640, 30476896, 30853152, 31229408, 31605664, 31981920, 32358176, 32734432, 33110688, 33486944, 33863200,
 34239456, 34615712, 34991968, 35368224, 35744480, 36120736, 36496992, 36873248, 37249504, 37625760, 38002016,
 38378272, 38754528, 39130784, 39507040, 39883296, 40259552, 40635808, 41012064, 41388320, 41764576, 42140832,
 42517088, 42893344, 43269600, 43645856, 44022112, 44398368, 44774624, 45150880, 45527136, 45903392, 46279648,
 46655904, 47032160, 47408416, 47784672, 48160928, 48537184, 48913440, 49289696, 49665952, 50042208, 50418464,
 50794720, 51170976, 51547232, 51923488, 52299744, 52676000, 53052256, 53428512, 53804768, 54181024, 54557280,
 54933536, 55309792, 55686048, 56062304, 56438560, 56814816, 57191072, 57567328, 57943584, 58319840, 58696096,
 59072352, 59448608, 59824864, 60201120, 60577376, 60953632, 61329888, 61706144, 62082400, 62458656, 62834912,
 63211168, 63587424, 63963680, 64339936, 64716192, 65092448, 65468704, 65844960, 66221216, 66597472, 66973728,
 67349984, 67726240, 68102496, 68478752, 68855008, 69231264, 69607520, 69983776, 70360032, 70736288, 71112544,
 71488800, 71865056, 72241312, 72617568, 72993824, 73370080, 73746336, 74122592, 74498848, 74875104, 75251360,
 75627616, 76003872, 76380128, 76756384, 77132640, 77508896, 77885152, 78261408, 78637664, 79013920, 79390176,
 79766432, 80142688, 80518944, 80895200, 81271456, 81647712, 82023968, 82400224, 82776480, 83152736, 83528992,
 83905248, 84281504, 84657760, 85034016, 85410272, 85786528, 86162784, 86539040, 86915296, 87291552, 87667808,
 88044064, 88420320, 88796576, 89172832, 89549088, 89925344, 90301600, 90677856, 91054112, 91430368, 91806624,
 92182880, 92559136, 92935392, 93311648, 93687904, 94064160, 94440416, 94816672, 95192928, 95569184, 95945440,
 96321696, 96697952, 97074208, 97450464, 97826720, 98202976, 98579232, 98955488, 99331744, 99708000, 100084256,
 100460512, 100836768, 101213024, 101589280, 101965536, 102341792, 102718048, 103094304, 103470560, 103846816,
 104223072, 104599328, 104975584, 105351840, 105728096, 106104352, 106480608, 106856864, 107233120, 107609376,
 107985632, 108361888, 108738144, 109114400, 109490656, 109866912, 110243168, 110619424, 110995680, 111371936,
 111748192, 112124448, 112500704, 112876960, 113253216, 113629472, 114005728, 114381984, 114758240, 115134496,
 115510752, 115887008, 116263264, 116639520, 117015776, 117392032, 117768288, 118144544, 118520800, 118897056,
 119273312, 119649568, 120025824, 120402080, 120778336, 121154592, 121530848, 121907104, 122283360, 122659616,
 123035872, 123412128, 123788384, 124164640, 124540896, 124917152, 125293408, 125669664, 126045920, 126422176,
 126798432, 127174688, 127550944, 127927200, 128303456, 128679712, 129055968, 129432224, 129808480, 130184736,
 130560992, 130937248, 131313504, 131689760, 132066016, 132442272, 132818528, 133194784, 133571040, 133947296,
 134323552, 134699808, 135076064, 135452320, 135828576, 136204832, 136581088, 136957344, 137333600, 137709856,
 138086112, 138462368, 138838624, 139214880, 139591136, 139967392, 140343648, 140719904, 141096160, 141472416,
 141848672, 142224928, 142601184, 142977440, 143353696, 143729952, 144106208, 144482464, 144858720, 145234976,
 145611232, 145987488, 146363744, 146740000

and slice 3:

root@kg-fil# newfs /dev/ad0s3a
/dev/ad0s3a: 1024.0MB (2097152 sectors) block size 16384, fragment size 2048
    using 6 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440
root@kg-fil# newfs -U /dev/ad0s3d
/dev/ad0s3d: 8174.0MB (16740352 sectors) block size 16384, fragment size 2048
    using 45 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440, 2257696, 2633952, 3010208, 3386464, 3762720, 4138976, 4515232,
 4891488, 5267744, 5644000, 6020256, 6396512, 6772768, 7149024, 7525280, 7901536, 8277792, 8654048, 9030304,
 9406560, 9782816, 10159072, 10535328, 10911584, 11287840, 11664096, 12040352, 12416608, 12792864, 13169120,
 13545376, 13921632, 14297888, 14674144, 15050400, 15426656, 15802912, 16179168, 16555424
root@kg-fil# newfs -U /dev/ad0s3e
/dev/ad0s3e: 1024.0MB (2097152 sectors) block size 16384, fragment size 2048
    using 6 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440
root@kg-fil# newfs -U /dev/ad0s3f
/dev/ad0s3f: 71697.7MB (146836848 sectors) block size 16384, fragment size 2048
    using 391 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376416, 752672, 1128928, 1505184, 1881440, 2257696, 2633952, 3010208, 3386464, 3762720, 4138976, 4515232,
 4891488, 5267744, 5644000, 6020256, 6396512, 6772768, 7149024, 7525280, 7901536, 8277792, 8654048, 9030304,
 9406560, 9782816, 10159072, 10535328, 10911584, 11287840, 11664096, 12040352, 12416608, 12792864, 13169120,
 13545376, 13921632, 14297888, 14674144, 15050400, 15426656, 15802912, 16179168, 16555424, 16931680, 17307936,
 17684192, 18060448, 18436704, 18812960, 19189216, 19565472, 19941728, 20317984, 20694240, 21070496, 21446752,
 21823008, 22199264, 22575520, 22951776, 23328032, 23704288, 24080544, 24456800, 24833056, 25209312, 25585568,
 25961824, 26338080, 26714336, 27090592, 27466848, 27843104, 28219360, 28595616, 28971872, 29348128, 29724384,
 30100640, 30476896, 30853152, 31229408, 31605664, 31981920, 32358176, 32734432, 33110688, 33486944, 33863200,
 34239456, 34615712, 34991968, 35368224, 35744480, 36120736, 36496992, 36873248, 37249504, 37625760, 38002016,
 38378272, 38754528, 39130784, 39507040, 39883296, 40259552, 40635808, 41012064, 41388320, 41764576, 42140832,
 42517088, 42893344, 43269600, 43645856, 44022112, 44398368, 44774624, 45150880, 45527136, 45903392, 46279648,
 46655904, 47032160, 47408416, 47784672, 48160928, 48537184, 48913440, 49289696, 49665952, 50042208, 50418464,
 50794720, 51170976, 51547232, 51923488, 52299744, 52676000, 53052256, 53428512, 53804768, 54181024, 54557280,
 54933536, 55309792, 55686048, 56062304, 56438560, 56814816, 57191072, 57567328, 57943584, 58319840, 58696096,
 59072352, 59448608, 59824864, 60201120, 60577376, 60953632, 61329888, 61706144, 62082400, 62458656, 62834912,
 63211168, 63587424, 63963680, 64339936, 64716192, 65092448, 65468704, 65844960, 66221216, 66597472, 66973728,
 67349984, 67726240, 68102496, 68478752, 68855008, 69231264, 69607520, 69983776, 70360032, 70736288, 71112544,
 71488800, 71865056, 72241312, 72617568, 72993824, 73370080, 73746336, 74122592, 74498848, 74875104, 75251360,
 75627616, 76003872, 76380128, 76756384, 77132640, 77508896, 77885152, 78261408, 78637664, 79013920, 79390176,
 79766432, 80142688, 80518944, 80895200, 81271456, 81647712, 82023968, 82400224, 82776480, 83152736, 83528992,
 83905248, 84281504, 84657760, 85034016, 85410272, 85786528, 86162784, 86539040, 86915296, 87291552, 87667808,
 88044064, 88420320, 88796576, 89172832, 89549088, 89925344, 90301600, 90677856, 91054112, 91430368, 91806624,
 92182880, 92559136, 92935392, 93311648, 93687904, 94064160, 94440416, 94816672, 95192928, 95569184, 95945440,
 96321696, 96697952, 97074208, 97450464, 97826720, 98202976, 98579232, 98955488, 99331744, 99708000, 100084256,
 100460512, 100836768, 101213024, 101589280, 101965536, 102341792, 102718048, 103094304, 103470560, 103846816,
 104223072, 104599328, 104975584, 105351840, 105728096, 106104352, 106480608, 106856864, 107233120, 107609376,
 107985632, 108361888, 108738144, 109114400, 109490656, 109866912, 110243168, 110619424, 110995680, 111371936,
 111748192, 112124448, 112500704, 112876960, 113253216, 113629472, 114005728, 114381984, 114758240, 115134496,
 115510752, 115887008, 116263264, 116639520, 117015776, 117392032, 117768288, 118144544, 118520800, 118897056,
 119273312, 119649568, 120025824, 120402080, 120778336, 121154592, 121530848, 121907104, 122283360, 122659616,
 123035872, 123412128, 123788384, 124164640, 124540896, 124917152, 125293408, 125669664, 126045920, 126422176,
 126798432, 127174688, 127550944, 127927200, 128303456, 128679712, 129055968, 129432224, 129808480, 130184736,
 130560992, 130937248, 131313504, 131689760, 132066016, 132442272, 132818528, 133194784, 133571040, 133947296,
 134323552, 134699808, 135076064, 135452320, 135828576, 136204832, 136581088, 136957344, 137333600, 137709856,
 138086112, 138462368, 138838624, 139214880, 139591136, 139967392, 140343648, 140719904, 141096160, 141472416,
 141848672, 142224928, 142601184, 142977440, 143353696, 143729952, 144106208, 144482464, 144858720, 145234976,
 145611232, 145987488, 146363744, 146740000

That was it - we're ready for the backup / restore operation.

2011-08-11: slice 2 - with the new hard drive temporarily connected as ad1, I'm ready to set it up and transfer the data onto it:

root@kg-fil# dmesg | grep ad[01]
ad0: 76350MB <SAMSUNG SP0822N WA100-33> at ata0-master UDMA100
ad1: 305245MB <WDC WD3200AAJB-00J3A0 01.03E01> at ata0-slave UDMA133
Trying to mount root from ufs:/dev/ad0s2a

First, I slice it up using fdisk in sysinstall: create 3 x 80 GB slices, leaving the fourth slice unpartitioned at 58 GB. SEtting the first slice as bootable (doesn't matter, I'll install the boot manager on it). The result:

root@kg-fil# fdisk ad1
******* Working on device /dev/ad1 *******
parameters extracted from in-core disklabel are:
cylinders=620181 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=620181 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 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 167771457 (81919 Meg), flag 80 (active)
    beg: cyl 0/ head 1/ sector 1;
    end: cyl 1023/ head 15/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 167771520, size 167771520 (81919 Meg), flag 0
    beg: cyl 1023/ head 255/ sector 63;
    end: cyl 1023/ head 15/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 335543040, size 167771520 (81919 Meg), flag 0
    beg: cyl 1023/ head 255/ sector 63;
    end: cyl 1023/ head 15/ sector 63
The data for partition 4 is:
<UNUSED>

Next, I create BSD partitions in the slices. Again, sysinstall, the configure, label. I create a 1G root partition, a 16 GB swap partition (on ad1s1 only) and "auto" on the rest. Change of plan (old hard drive is dying): connect new hard drive as ad0, connect the optical drive and do minimal install on slice 4.

2011-08-11: slice 2 - the separate network card works in FreeBSD 8.1-prerelease too:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #4: Fri May 21 00:20:01 CEST 2010     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

root@kg-fil# pciconf -lv | grep -A 4 re1
re1@pci0:2:6:0:    class=0x020000 card=0x434e1371 chip=0x816910ec rev=0x10 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Single Gigabit LOM Ethernet Controller (RTL8110)'
    class      = network
    subclass   = ethernet

from dmesg:

re1: <RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet> port 0xd800-0xd8ff mem 0xfebffc00-0xfebffcff irq 21 at device 6.0 on pci2
re1: Chip rev. 0x04000000
re1: MAC rev. 0x00000000
miibus1: <MII bus> on re1
rgephy1: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus1
rgephy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
re1: Ethernet address: 00:08:a1:77:8a:e1
re1: [FILTER]
re1: link state changed to UP

The internal network card (re0) also works, but things are easier if I don't have to switch network cables when I reboot into another slice.

2011-08-11: slice 3 - using a separate PCI network card which shows up as re1 allows FreeBSD 7.2-stable to get a network:

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 7.2-STABLE FreeBSD 7.2-STABLE #0: Fri Jan  1 20:50:58 CET 2010     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

root@kg-fil# pciconf -lv | grep -A 4 re1
re1@pci0:2:6:0:    class=0x020000 card=0x434e1371 chip=0x816910ec rev=0x10 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Single Gigabit LOM Ethernet Controller (RTL8119)'
    class      = network
    subclass   = ethernet

dmesg output:

re1: <RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet> port 0xd800-0xd8ff mem 0xfebffc00-0xfebffcff irq 21 at device 6.0 on pci2
re1: Chip rev. 0x04000000
re1: MAC rev. 0x00000000
miibus0: <MII bus> on re1
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
re1: Ethernet address: 00:08:a1:77:8a:e1
re1: [FILTER]
re1: link state changed to UP

The internal card isn't working properly:

root@kg-fil# pciconf -lv | grep -A 4 re0
re0@pci0:4:0:0:    class=0x020000 card=0x81681849 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111)'
    class      = network
    subclass   = ethernet

dmesg messages:

re0: <RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet> port 0xe800-0xe8ff mem 0xfafff000-0xfaffffff,0xfaff8000-0xfaffbfff irq 17 at device 0.0 on pci4
re0: Using 1 MSI messages
re0: Chip rev. 0x2c000000
re0: MAC rev. 0x00000000
re0: Unknown H/W revision: 0x2c000000
device_attach: re0 attach returned 6

Good enough for now.

2010-08-10: slice 2 - currently running SMART tests on ad0, it stopped up while booting from slice 1. First a short test:

root@kg-fil# smartctl -t short /dev/ad0
smartctl 5.40 2010-10-16 r3189 [FreeBSD 8.1-PRERELEASE amd64] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Wed Aug 10 23:13:38 2011

results from the short test:

root@kg-fil# smartctl -l selftest /dev/ad0
smartctl 5.40 2010-10-16 r3189 [FreeBSD 8.1-PRERELEASE amd64] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 0
Warning: ATA Specification requires self-test log structure revision number = 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       00%     48676         3448940
# 2  Extended offline    Completed without error       00%     17969         -
# 3  Short offline       Completed without error       00%     17930         -
# 4  Extended offline    Interrupted (host reset)      90%     17930         -

This hard drive (and the old machine itself) has been running for 48676 hours, or about five and a half years - quite accurate. Then a offline test:

root@kg-fil# smartctl -t offline /dev/ad0
smartctl 5.40 2010-10-16 r3189 [FreeBSD 8.1-PRERELEASE amd64] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART off-line routine immediately in off-line mode".
Drive command "Execute SMART off-line routine immediately in off-line mode" successful.
Testing has begun.
Please wait 1980 seconds for test to complete.
Test will complete after Wed Aug 10 23:47:45 2011

Use smartctl -X to abort test.

results from the offline test:

root@kg-fil# smartctl -l selftest /dev/ad0
smartctl 5.40 2010-10-16 r3189 [FreeBSD 8.1-PRERELEASE amd64] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 0
Warning: ATA Specification requires self-test log structure revision number = 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       00%     48676         3448940
# 2  Extended offline    Completed without error       00%     17969         -
# 3  Short offline       Completed without error       00%     17930         -
# 4  Extended offline    Interrupted (host reset)      90%     17930         -

Hmm, not very useful I think. Yet, if I try

fsck_ffs -y /dev/ad0s1d (which is /var) it goes to
** Phase 2 - Check Pathnames

then the disk does something (a reset?), the hard drive light turns off, and there it hangs. Trying to let it sit for a bit now, to see if that helps.

2011-08-10: slice 1 - tried to add new files for if_re ("re.6x") found on the machine vm, but these files are from 2008-11-02, and the kernel compile failed.

2011-08-09: slice 3 - booted the machine into FreeBSD 7.2-stable. Changed the network interface in /etc/rc.conf to be re0. Changed sound module in /boot/loader.conf from snd_ich to snd_hda. dmesg output: normal, verbose. dmesg says this about re0: "Unknown H/W revision: 0x2c000000". Probably needs an upgrade.

2011-08-09: slice 2 - booted the machine into FreeBSD 8.1-prerelease. Changed the network interface in /etc/rc.conf to be re0. dmesg output: normal, verbose.

tingo@kg-fil$ uname -a
FreeBSD kg-fil.kg4.no 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #4: Fri May 21 00:20:01 CEST 2010     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

Removed nfsmb_load="YES" from /boot/loader.conf, because this machine has a different SMBus chip, and there is no driver for it:

root@kg-fil# pciconf -lv | grep -A 4 none
none0@pci0:0:20:0:    class=0x0c0500 card=0x43851849 chip=0x43851002 rev=0x13 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI SMBus (ATI RD600/RS600)'
    class      = serial bus
    subclass   = SMBus

pciconf output:

root@kg-fil# pciconf -lv
hostb0@pci0:0:0:0:    class=0x060000 card=0x59511849 chip=0x59511002 rev=0x01 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'Radeon Xpress 200 (RS480/RS482/RX480/RX482) Host bridge'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:2:0:    class=0x060400 card=0x5a341849 chip=0x5a341002 rev=0x00 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'RS480 PCI-X Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:5:0:    class=0x060400 card=0x5a371849 chip=0x5a371002 rev=0x00 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'RS480 PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
atapci0@pci0:0:18:0:    class=0x01018f card=0x43801849 chip=0x43801002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 Serial ATA Controller'
    class      = mass storage
    subclass   = ATA
ohci0@pci0:0:19:0:    class=0x0c0310 card=0x43871849 chip=0x43871002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 USB Controller (OHCI0)'
    class      = serial bus
    subclass   = USB
ohci1@pci0:0:19:1:    class=0x0c0310 card=0x43881849 chip=0x43881002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 USB Controller (OHCI1)'
    class      = serial bus
    subclass   = USB
ohci2@pci0:0:19:2:    class=0x0c0310 card=0x43891849 chip=0x43891002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 USB Controller (OHCI2)'
    class      = serial bus
    subclass   = USB
ohci3@pci0:0:19:3:    class=0x0c0310 card=0x438a1849 chip=0x438a1002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 USB Controller (OHCI3)'
    class      = serial bus
    subclass   = USB
ohci4@pci0:0:19:4:    class=0x0c0310 card=0x438b1849 chip=0x438b1002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 USB Controller (OHCI4)'
    class      = serial bus
    subclass   = USB
ehci0@pci0:0:19:5:    class=0x0c0320 card=0x43861849 chip=0x43861002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 USB Controller (EHCI)'
    class      = serial bus
    subclass   = USB
none0@pci0:0:20:0:    class=0x0c0500 card=0x43851849 chip=0x43851002 rev=0x13 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI SMBus (ATI RD600/RS600)'
    class      = serial bus
    subclass   = SMBus
atapci1@pci0:0:20:1:    class=0x01018a card=0x438c1849 chip=0x438c1002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI RD600/RS600 IDE Controller (RD600/RS600)'
    class      = mass storage
    subclass   = ATA
hdac0@pci0:0:20:2:    class=0x040300 card=0x03971849 chip=0x43831002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
isab0@pci0:0:20:3:    class=0x060100 card=0x438d1849 chip=0x438d1002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 PCI to LPC Bridge'
    class      = bridge
    subclass   = PCI-ISA
pcib3@pci0:0:20:4:    class=0x060401 card=0x00000000 chip=0x43841002 rev=0x00 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 PCI to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
hostb1@pci0:0:24:0:    class=0x060000 card=0x00000000 chip=0x12001022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron HyperTransport Technology Configuration'
    class      = bridge
    subclass   = HOST-PCI
hostb2@pci0:0:24:1:    class=0x060000 card=0x00000000 chip=0x12011022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron Address Map'
    class      = bridge
    subclass   = HOST-PCI
hostb3@pci0:0:24:2:    class=0x060000 card=0x00000000 chip=0x12021022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
hostb4@pci0:0:24:3:    class=0x060000 card=0x00000000 chip=0x12031022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron Miscellaneous Control'
    class      = bridge
    subclass   = HOST-PCI
hostb5@pci0:0:24:4:    class=0x060000 card=0x00000000 chip=0x12041022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron Link Control'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:1:0:0:    class=0x030000 card=0x81ae1043 chip=0x016110de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'NVIDIA GeForce 6200 TurboCache(TM) (NV44)'
    class      = display
    subclass   = VGA
re0@pci0:4:0:0:    class=0x020000 card=0x81681849 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet
pcib4@pci0:2:5:0:    class=0x060400 card=0x00000000 chip=0x00213388 rev=0x11 hdr=0x01
    vendor     = 'PLX Technology (Was: HiNT Corp)'
    device     = 'PCI 6140/52/6254 HB1/1-SE/HB6 Universal PCI to PCI Bridge (non-transparent mode)'
    class      = bridge
    subclass   = PCI-PCI
cxm0@pci0:3:8:0:    class=0x040000 card=0xe8070070 chip=0x00164444 rev=0x01 hdr=0x00
    vendor     = 'Conexant Inc (Was: Globespan, ICompression Inc)'
    device     = 'iTVC16/CX23416 MPEG Codec'
    class      = multimedia
    subclass   = video
cxm1@pci0:3:9:0:    class=0x040000 card=0xe8170070 chip=0x00164444 rev=0x01 hdr=0x00
    vendor     = 'Conexant Inc (Was: Globespan, ICompression Inc)'
    device     = 'iTVC16/CX23416 MPEG Codec'
    class      = multimedia
    subclass   = video

kenv output:

root@kg-fil# kenv | grep smbios
smbios.bios.reldate="11/16/2010"
smbios.bios.vendor="American Megatrends Inc."
smbios.bios.version="P1.20"
smbios.chassis.maker="To Be Filled By O.E.M."
smbios.chassis.serial="To Be Filled By O.E.M."
smbios.chassis.tag="To Be Filled By O.E.M."
smbios.chassis.version="To Be Filled By O.E.M."
smbios.memory.enabled="4194304"
smbios.planar.maker="ASRock"
smbios.planar.product="M3A UCC"
smbios.planar.serial="                      "
smbios.planar.version="                      "
smbios.socket.enabled="1"
smbios.socket.populated="1"
smbios.system.maker="To Be Filled By O.E.M."
smbios.system.product="To Be Filled By O.E.M."
smbios.system.serial="To Be Filled By O.E.M."
smbios.system.uuid="00020003-0004-0005-0006-000700080009"
smbios.system.version="To Be Filled By O.E.M."
smbios.version="2.5"

dmidecode output:

root@kg-fil# dmidecode
# dmidecode 2.10
SMBIOS 2.5 present.
26 structures occupying 1395 bytes.
Table at 0x000FD5F0.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
    Vendor: American Megatrends Inc.
    Version: P1.20
    Release Date: 11/16/2010
    Address: 0xF0000
    Runtime Size: 64 kB
    ROM Size: 512 kB
    Characteristics:
        PCI is supported
        BIOS is upgradeable
        BIOS shadowing is allowed
        Boot from CD is supported
        Selectable boot is supported
        BIOS ROM is socketed
        EDD is supported
        5.25"/1.2 MB floppy services are supported (int 13h)
        3.5"/720 kB floppy services are supported (int 13h)
        3.5"/2.88 MB floppy services are supported (int 13h)
        Print screen service is supported (int 5h)
        8042 keyboard services are supported (int 9h)
        Serial services are supported (int 14h)
        Printer services are supported (int 17h)
        CGA/mono video services are supported (int 10h)
        ACPI is supported
        USB legacy is supported
        LS-120 boot is supported
        ATAPI Zip drive boot is supported
        BIOS boot specification is supported
        Function key-initiated network boot is supported
        Targeted content distribution is supported
    BIOS Revision: 8.15

Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: To Be Filled By O.E.M.
    Product Name: To Be Filled By O.E.M.
    Version: To Be Filled By O.E.M.
    Serial Number: To Be Filled By O.E.M.
    UUID: 00020003-0004-0005-0006-000700080009
    Wake-up Type: Power Switch
    SKU Number: To Be Filled By O.E.M.
    Family: To Be Filled By O.E.M.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
    Manufacturer: ASRock
    Product Name: M3A UCC
    Version:                      
    Serial Number:                      
    Asset Tag:                      
    Features:
        Board is a hosting board
        Board is replaceable
    Location In Chassis:                      
    Chassis Handle: 0x0003
    Type: Motherboard
    Contained Object Handles: 0

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
    Manufacturer: To Be Filled By O.E.M.
    Type: Desktop
    Lock: Not Present
    Version: To Be Filled By O.E.M.
    Serial Number: To Be Filled By O.E.M.
    Asset Tag: To Be Filled By O.E.M.
    Boot-up State: Safe
    Power Supply State: Safe
    Thermal State: Safe
    Security Status: None
    OEM Information: 0x00000000
    Height: Unspecified
    Number Of Power Cords: 1
    Contained Elements: 0

Handle 0x0004, DMI type 4, 40 bytes
Processor Information
    Socket Designation: CPUSocket
    Type: Central Processor
    Family: Sempron
    Manufacturer: AMD             
    ID: 63 0F 10 00 FF FB 8B 07
    Signature: Family 16, Model 6, Stepping 3
    Flags:
        FPU (Floating-point unit on-chip)
        VME (Virtual mode extension)
        DE (Debugging extension)
        PSE (Page size extension)
        TSC (Time stamp counter)
        MSR (Model specific registers)
        PAE (Physical address extension)
        MCE (Machine check exception)
        CX8 (CMPXCHG8 instruction supported)
        APIC (On-chip APIC hardware supported)
        SEP (Fast system call)
        MTRR (Memory type range registers)
        PGE (Page global enable)
        MCA (Machine check architecture)
        CMOV (Conditional move instruction supported)
        PAT (Page attribute table)
        PSE-36 (36-bit page size extension)
        CLFSH (CLFLUSH instruction supported)
        MMX (MMX technology supported)
        FXSR (Fast floating-point save and restore)
        SSE (Streaming SIMD extensions)
        SSE2 (Streaming SIMD extensions 2)
    Version: AMD Sempron(tm) 145 Processor                      
    Voltage: 1.5 V
    External Clock: 200 MHz
    Max Speed: 2800 MHz
    Current Speed: 2800 MHz
    Status: Populated, Enabled
    Upgrade: Socket 940
    L1 Cache Handle: 0x0005
    L2 Cache Handle: 0x0006
    L3 Cache Handle: 0x0007
    Serial Number: To Be Filled By O.E.M.
    Asset Tag: To Be Filled By O.E.M.
    Part Number: To Be Filled By O.E.M.
    Core Count: 1
    Core Enabled: 1
    Characteristics:
        64-bit capable

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L1-Cache
    Configuration: Enabled, Not Socketed, Level 1
    Operational Mode: Varies With Memory Address
    Location: Internal
    Installed Size: 128 kB
    Maximum Size: 128 kB
    Supported SRAM Types:
        Pipeline Burst
    Installed SRAM Type: Pipeline Burst
    Speed: Unknown
    Error Correction Type: Single-bit ECC
    System Type: Data
    Associativity: 4-way Set-associative

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L2-Cache
    Configuration: Enabled, Not Socketed, Level 2
    Operational Mode: Varies With Memory Address
    Location: Internal
    Installed Size: 1024 kB
    Maximum Size: 1024 kB
    Supported SRAM Types:
        Pipeline Burst
    Installed SRAM Type: Pipeline Burst
    Speed: Unknown
    Error Correction Type: Single-bit ECC
    System Type: Unified
    Associativity: 4-way Set-associative

Handle 0x0007, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L3-Cache
    Configuration: Disabled, Not Socketed, Level 3
    Operational Mode: Unknown
    Location: Internal
    Installed Size: 0 kB
    Maximum Size: 0 kB
    Supported SRAM Types:
        Unknown
    Installed SRAM Type: Unknown
    Speed: Unknown
    Error Correction Type: Unknown
    System Type: Unknown
    Associativity: Unknown

Handle 0x0008, DMI type 9, 13 bytes
System Slot Information
    Designation: PCI1
    Type: 32-bit PCI
    Current Usage: In Use
    Length: Short
    ID: 1
    Characteristics:
        3.3 V is provided
        Opening is shared
        PME signal is supported

Handle 0x0009, DMI type 9, 13 bytes
System Slot Information
    Designation: PCI2
    Type: 32-bit PCI
    Current Usage: Available
    Length: Short
    ID: 2
    Characteristics:
        3.3 V is provided
        Opening is shared
        PME signal is supported

Handle 0x000A, DMI type 9, 13 bytes
System Slot Information
    Designation: PCI3
    Type: 32-bit PCI
    Current Usage: Available
    Length: Short
    ID: 3
    Characteristics:
        3.3 V is provided
        Opening is shared
        PME signal is supported

Handle 0x000B, DMI type 9, 13 bytes
System Slot Information
    Designation: PCIE1
    Type: x1 PCI Express
    Current Usage: Available
    Length: Short
    ID: 17
    Characteristics:
        3.3 V is provided
        Opening is shared
        PME signal is supported

Handle 0x000C, DMI type 9, 13 bytes
System Slot Information
    Designation: PCIE2
    Type: x16 PCI Express
    Current Usage: In Use
    Length: Short
    ID: 18
    Characteristics:
        3.3 V is provided
        Opening is shared
        PME signal is supported

Handle 0x000D, DMI type 9, 13 bytes
System Slot Information
    Designation: PCIE3
    Type: x1 PCI Express
    Current Usage: Available
    Length: Short
    ID: 19
    Characteristics:
        3.3 V is provided
        Opening is shared
        PME signal is supported

Handle 0x000E, DMI type 16, 15 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 8 GB
    Error Information Handle: Not Provided
    Number Of Devices: 4

Handle 0x000F, DMI type 19, 15 bytes
Memory Array Mapped Address
    Starting Address: 0x00000000000
    Ending Address: 0x0012FFFFFFF
    Range Size: 4864 MB
    Physical Array Handle: 0x000E
    Partition Width: 0

Handle 0x0010, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x000E
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB
    Form Factor: DIMM
    Set: None
    Locator: DIMM0
    Bank Locator: BANK0
    Type: Other
    Type Detail: Synchronous
    Speed: 667 MHz
    Manufacturer: Manufacturer00
    Serial Number: SerNum00
    Asset Tag: AssetTagNum0
    Part Number: ModulePartNumber00

Handle 0x0011, DMI type 20, 19 bytes
Memory Device Mapped Address
    Starting Address: 0x00000000000
    Ending Address: 0x0007FFFFFFF
    Range Size: 2 GB
    Physical Device Handle: 0x0010
    Memory Array Mapped Address Handle: 0x000F
    Partition Row Position: 1

Handle 0x0012, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x000E
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB
    Form Factor: DIMM
    Set: None
    Locator: DIMM1
    Bank Locator: BANK1
    Type: Other
    Type Detail: Synchronous
    Speed: 667 MHz
    Manufacturer: Manufacturer01
    Serial Number: SerNum01
    Asset Tag: AssetTagNum1
    Part Number: ModulePartNumber01

Handle 0x0013, DMI type 20, 19 bytes
Memory Device Mapped Address
    Starting Address: 0x00080000000
    Ending Address: 0x000FFFFFFFF
    Range Size: 2 GB
    Physical Device Handle: 0x0012
    Memory Array Mapped Address Handle: 0x000F
    Partition Row Position: 1

Handle 0x0014, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x000E
    Error Information Handle: Not Provided
    Total Width: Unknown
    Data Width: 64 bits
    Size: No Module Installed
    Form Factor: Other
    Set: None
    Locator: DIMM2
    Bank Locator: BANK2
    Type: Unknown
    Type Detail: None
    Speed: Unknown
    Manufacturer: Manufacturer02
    Serial Number: SerNum02
    Asset Tag: AssetTagNum2
    Part Number: ModulePartNumber02

Handle 0x0015, DMI type 126, 19 bytes
Inactive

Handle 0x0016, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x000E
    Error Information Handle: Not Provided
    Total Width: Unknown
    Data Width: 64 bits
    Size: No Module Installed
    Form Factor: Other
    Set: None
    Locator: DIMM3
    Bank Locator: BANK3
    Type: Unknown
    Type Detail: None
    Speed: Unknown
    Manufacturer: Manufacturer03
    Serial Number: SerNum03
    Asset Tag: AssetTagNum3
    Part Number: ModulePartNumber03

Handle 0x0017, DMI type 126, 19 bytes
Inactive

Handle 0x0018, DMI type 32, 20 bytes
System Boot Information
    Status: No errors detected

Handle 0x0019, DMI type 127, 4 bytes
End Of Table

That's all.

2011-08-09: slice 1 - booted the machine into FreeBSD 6.2-stable. The new network interface (re0) isn't detected. Probably needs a patch. dmesg: normal, verbose. Also, snd_hda doesn't exist in this 6.2-stable. uname output (transcribed):

root@kg-fil# uname -a
FreeBSD kg-fil.kg4.no 6.2-STABLE FreeBSD 6.2-.STABLE #20: Mon Mar 12 23:04:49 CET 2007
     root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL60  amd64