ASRock M3A UCC - FreeBSD - 2011 archive

back to main FreeBSD page for this machine.

2011 archive.

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