Asus F2A55-M - FreeBSD - 2013 archive

back to main FreeBSD page for this machine.

2013 archive.

2013-07-25: ad4p4 - vlc suddenly stopped working, I tried both

tingo@kg-quiet$ vlc -reset-plugins-cache

and

tingo@kg-quiet$ vlc --reset-config

without any effect. I manually deleted vlc's cache (~/.cache/vlc) and config (~/.config/vlc) - didn't help either. I also quit Xfce / Xorg and restarted - no effect. Current version of vlc is

root@kg-quiet# portversion -v vlc*
vlc-1.1.13_10,3             =  up-to-date with port

I haven't found anything by searching either. Ok, I found it. After looking at my processes, I noticed that there were a large amount of pulseaudio processes:

root@kg-quiet# pgrep -lf pulse
36482 /usr/local/bin/pulseaudio --start --log-target=syslog
36368 /usr/local/bin/pulseaudio --start --log-target=syslog
36303 /usr/local/bin/pulseaudio --start --log-target=syslog
36229 /usr/local/bin/pulseaudio --start --log-target=syslog
36155 /usr/local/bin/pulseaudio --start --log-target=syslog
36090 /usr/local/bin/pulseaudio --start --log-target=syslog
35978 /usr/local/bin/pulseaudio --start
35977 /bin/sh /usr/local/bin/start-pulseaudio-x11
35636 /usr/local/bin/pulseaudio --start --log-target=syslog
31430 /usr/local/bin/pulseaudio --start --log-target=syslog
22029 /usr/local/bin/pulseaudio --start --log-target=syslog
22007 /usr/local/bin/pulseaudio --start --log-target=syslog
21926 /usr/local/bin/pulseaudio --start --log-target=syslog
21910 /usr/local/bin/pulseaudio --start --log-target=syslog

I killed them all

root@kg-quiet# pkill -HUP pulseaudio

which resulted in only one process:

root@kg-quiet# pgrep -lf pulse
21926 /usr/local/bin/pulseaudio --start --log-target=syslog

and now vlc works again. I probably should weed out pulseaudio totally from my system.

2013-06-21: ad4p4 - upgraded to FreeBSD 8.4-stable (via csup, make world). dmesg output: normal, verbose.

root@kg-quiet# uname -a
FreeBSD kg-quiet.kg4.no 8.4-STABLE FreeBSD 8.4-STABLE #4: Fri Jun 21 20:57:59 CEST 2013     root@kg-quiet.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

I also rebuilt a few -kmod ports (cuse4bsd-kmod, fusefs-kmod).

2013-06-21: ad4p4 - I used csup to upgrade the source again:

root@kg-quiet# egrep "^BRANCH|^REVISION" /usr/src/sys/conf/newvers.sh
REVISION="8.4"
BRANCH="STABLE"

Next, update via make world. After the update, I set bootonce on the correct partition on ad4 again:

root@kg-quiet# gpart set -a bootonce -i 4 ad4
bootonce set on ad4p4

That's it.

2013-05-31: ad4p4 - after a power outage (scheduled maintenance by the power company) amule wouldn't start again, it gave the message:

tingo@kg-quiet$ amule
 2013-05-31 09:44:44: Initialising aMule 2.3.1 compiled with wxGTK2 v2.8.12
 2013-05-31 09:44:44: Checking if there is an instance already running...
 2013-05-31 09:44:44: No other instances are running.
    aMule Version: aMule 2.3.1 compiled with wxGTK2 v2.8.12

Terminated after throwing an instance of 'CEOFException'
    what(): SafeIO::EOF: Attempt to read past end of file.
--== no BACKTRACE for your platform ==--

    backtrace:

Abort trap (core dumped)
tingo@kg-quiet$ amule
 2013-05-31 09:45:10: Initialising aMule 2.3.1 compiled with wxGTK2 v2.8.12
 2013-05-31 09:45:10: Checking if there is an instance already running...
 2013-05-31 09:45:10: No other instances are running.
    aMule Version: aMule 2.3.1 compiled with wxGTK2 v2.8.12

Terminated after throwing an instance of 'CEOFException'
    what(): SafeIO::EOF: Attempt to read past end of file.
--== no BACKTRACE for your platform ==--

    backtrace:

Abort trap (core dumped)

looking at my old notes, this looks like a zero byte statistics.dat file:

tingo@kg-quiet$ ls -l ~/.aMule/stat*
-rw-r--r--  1 tingo  users  446 Nov  2  2010 /home/tingo/.aMule/staticservers.dat
-rw-r--r--  1 tingo  users    0 May 31 00:15 /home/tingo/.aMule/statistics.dat

Yep, sure does. Fix it:

tingo@kg-quiet$ rm ~/.aMule/statistics.dat

Done, back to working again.

2013-05-06: ad4p4 - upgraded to FreeBSD 8.4-prerelease. dmesg output: normal, verbose.

root@kg-quiet# uname -a
FreeBSD kg-quiet.kg4.no 8.4-PRERELEASE FreeBSD 8.4-PRERELEASE #3: Mon May  6 21:46:44 CEST 2013     root@kg-quiet.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

Xorg: after the upgrade, Xorg runs default at 1920x1080, without me doing anything (no, I have not recompiled the ports):

tingo@kg-quiet$ DISPLAY=:0.0 xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm
   1920x1080       0.0*
   1280x1024       0.0 
   1024x768        0.0 
   800x600         0.0 
   640x480         0.0 

Nice.

2013-05-06: ad4p4 - I used csup to fetch a newer version of the source:

root@kg-quiet# egrep "^BRANCH|^REVISION" /usr/src/sys/conf/newvers.sh
REVISION="8.4"
BRANCH="PRERELEASE"

next I upgraded using 'make world'. After that, set to manually boot from ad4p4:

root@kg-quiet# gpart set -a bootonce -i 4 ad4
bootonce set on adp4

2013-05-06: ada0p3 - after upgrading the bios, the machine boots into 9.1-release again, so set it manually for boot from ada0p4:

root@kg-quiet# gpart set -a bootonce -i 4 ada0
bootonce set on ada0p4

2013-04-05: ad4p4 - the machine came up after fsck'ing / (root). From /var/log/messages:

Apr  5 01:41:44 kg-quiet kernel: WARNING: / was not properly dismounted
Apr  5 01:41:44 kg-quiet kernel: WARNING: /: mount pending error: blocks 35984 files 3

the other filesystems are also affected (fsck is currently doing it's job on them):

Apr  5 01:41:44 kg-quiet kernel: WARNING: /d1 was not properly dismounted
Apr  5 01:41:44 kg-quiet kernel: WARNING: /d1: mount pending error: blocks 148 files 24
Apr  5 01:41:44 kg-quiet kernel: WARNING: /d2 was not properly dismounted
Apr  5 01:41:44 kg-quiet kernel: WARNING: /d4 was not properly dismounted

hopefully they will be ok.

2013-04-05: ada0p3 - after I rebooted, the machine came up in 9.1-release again. gpart shows this:

root@kg-quiet# gpart show ada0
=>        34  1953525101  ada0  GPT  (931G)
          34           6        - free -  (3.0k)
          40    37748736     1  freebsd-swap  (18G)
    37748776         128     2  freebsd-boot  (64k)
    37748904   314572664     3  freebsd-ufs  (150G)
   352321568   314572800     4  freebsd-ufs  (150G)
   666894368   314572800     5  freebsd-ufs  (150G)
   981467168   125829120     6  freebsd-ufs  (60G)
  1107296288   846228847        - free -  (403G)

I had to set it to boot p4 manually, like this:

root@kg-quiet# gpart set -a bootonce -i 4 ada0
bootonce set on ada0p4

2013-04-05: there was a spike on the main power, resulting in the machine rebooting due to the "anti-surge protection circuit". Oh well. The machine stayed on the UEFI screen with this message until I rebooted it.

2013-02-17: ad4p4 - the amdtemp module doesn't work on this CPU, so I get a newer version of amdtemp.c from svn, and will try to compile it:

root@kg-quiet# locate amdtemp.c
/usr/src/sys/dev/amdtemp/amdtemp.c
root@kg-quiet# cd /usr/src/sys/dev/amdtemp
root@kg-quiet# ls -l /home/tingo/dl/amd*
lrwxr-xr-x  1 tingo  users     25 Feb 17 13:20 /home/tingo/dl/amdtemp.c -> amdtemp.c?revision=246128
-rw-r--r--  1 tingo  users  14509 Feb 17 13:17 /home/tingo/dl/amdtemp.c?revision=246128
root@kg-quiet# mv amdtemp.c amdtemp.c_old
root@kg-quiet# cp /home/tingo/dl/amdtemp.c .
root@kg-quiet# cd /usr/src/sys/modules/amdtemp
root@kg-quiet# make
Warning: Object directory not changed from original /usr/src/sys/modules/amdtemp
@ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/amdtemp/../../dev/amdtemp/amdtemp.c
/usr/src/sys/modules/amdtemp/../../dev/amdtemp/amdtemp.c:50:28: error: x86/pci_cfgreg.h: No such file or directory
cc1: warnings being treated as errors
/usr/src/sys/modules/amdtemp/../../dev/amdtemp/amdtemp.c: In function 'amdtemp_attach':
/usr/src/sys/modules/amdtemp/../../dev/amdtemp/amdtemp.c:314: warning: implicit declaration of function 'pci_cfgregread'
/usr/src/sys/modules/amdtemp/../../dev/amdtemp/amdtemp.c:314: warning: nested extern declaration of 'pci_cfgregread'
*** Error code 1

Stop in /usr/src/sys/modules/amdtemp.

Ok, that didn't work. Let's try a different revision (taken from 9.1.0 release)

root@kg-quiet# ls -l /home/tingo/dl/amd*
lrwxr-xr-x  1 tingo  users     25 Feb 17 13:31 /home/tingo/dl/amdtemp.c -> amdtemp.c?revision=243808
-rw-r--r--  1 tingo  users  13598 Feb 17 13:29 /home/tingo/dl/amdtemp.c?revision=243808
-rw-r--r--  1 tingo  users  14509 Feb 17 13:17 /home/tingo/dl/amdtemp.c?revision=246128
root@kg-quiet# cp /home/tingo/dl/amdtemp.c .
root@kg-quiet# make
Warning: Object directory not changed from original /usr/src/sys/modules/amdtemp
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/amdtemp/../../dev/amdtemp/amdtemp.c
ld  -d -warn-common -r -d -o amdtemp.ko amdtemp.o
:> export_syms
awk -f /usr/src/sys/modules/amdtemp/../../conf/kmod_syms.awk amdtemp.ko  export_syms | xargs -J% objcopy % amdtemp.ko
objcopy --strip-debug amdtemp.ko
that one compiled at least. But will it work?
root@kg-quiet# kldunload amdtemp
root@kg-quiet# kldload ./amdtemp.ko
root@kg-quiet# sysctl dev.amdtemp
sysctl: unknown oid 'dev.amdtemp'

No, it will not.

2013-02-17: ad4p4 - Xorg. the built in Radeon in the APU (A8-5600K, supposeed to be a Radeon HD 7560D) is only detected as vesa. I set up a xorg.conf using the vesa driver, here is some output from /var/log/Xorg.0.log:

X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 8.2-STABLE amd64
Current Operating System: FreeBSD kg-quiet.kg4.no 8.3-STABLE FreeBSD 8.3-STABLE #2: Fri Jan  4 19:18:15 CET 2013    
root@kg-quiet.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 25 April 2012  11:48:10PM

(--) PCI:*(0:0:1:0) 1002:9904:1043:8526 Advanced Micro Devices [AMD] nee ATI rev 0, Mem @ 0xc0000000/268435456, 0xfeb00000/262144, I/O @ 0x0000f000/256, BIOS @ 0x????????/65536

(II) VESA(0): VESA BIOS detected
(II) VESA(0): VESA VBE Version 3.0
(II) VESA(0): VESA VBE Total Mem: 16384 kB
(II) VESA(0): VESA VBE OEM: AMD ATOMBIOS
(II) VESA(0): VESA VBE OEM Software Rev: 15.22
(II) VESA(0): VESA VBE OEM Vendor: (C) 1988-2010, Advanced Micro Devices, Inc.
(II) VESA(0): VESA VBE OEM Product: DVST
(II) VESA(0): VESA VBE OEM Product Rev: 01.00

(II) VESA(0): VESA VBE DDC read successfully
(II) VESA(0): Manufacturer: BNQ  Model: 78a6  Serial#: 21573
(II) VESA(0): Year: 2011  Week: 34
(II) VESA(0): EDID Version: 1.3
(II) VESA(0): Analog Display Input,  Input Voltage Level: 0.700/0.300 V
(II) VESA(0): Sync:  Separate  Composite  SyncOnGreen
(II) VESA(0): Max Image Size [cm]: horiz.: 53  vert.: 30
(II) VESA(0): Gamma: 2.20
(II) VESA(0): DPMS capabilities: Off; RGB/Color Display
(II) VESA(0): Default color space is primary color space
(II) VESA(0): First detailed timing is preferred mode
(II) VESA(0): redX: 0.631 redY: 0.351   greenX: 0.334 greenY: 0.615
(II) VESA(0): blueX: 0.157 blueY: 0.051   whiteX: 0.313 whiteY: 0.329
(II) VESA(0): Supported established timings:
(II) VESA(0): 720x400@70Hz
(II) VESA(0): 640x480@60Hz
(II) VESA(0): 640x480@75Hz
(II) VESA(0): 800x600@60Hz
(II) VESA(0): 800x600@75Hz
(II) VESA(0): 832x624@75Hz
(II) VESA(0): 1024x768@60Hz
(II) VESA(0): 1024x768@75Hz
(II) VESA(0): 1280x1024@75Hz
(II) VESA(0): 1152x864@75Hz
(II) VESA(0): Manufacturer's mask: 0
(II) VESA(0): Supported standard timings:
(II) VESA(0): #0: hsize: 1280  vsize 800  refresh: 60  vid: 129
(II) VESA(0): #1: hsize: 1280  vsize 720  refresh: 60  vid: 49281
(II) VESA(0): #2: hsize: 1280  vsize 1024  refresh: 60  vid: 32897
(II) VESA(0): #3: hsize: 1600  vsize 900  refresh: 60  vid: 49321
(II) VESA(0): #4: hsize: 1680  vsize 1050  refresh: 60  vid: 179
(II) VESA(0): #5: hsize: 1920  vsize 1080  refresh: 60  vid: 49361
(II) VESA(0): Supported detailed timing:
(II) VESA(0): clock: 148.5 MHz   Image Size:  531 x 298 mm
(II) VESA(0): h_active: 1920  h_sync: 2008  h_sync_end 2052 h_blank_end 2200 h_border: 0
(II) VESA(0): v_active: 1080  v_sync: 1084  v_sync_end 1089 v_blanking: 1125 v_border: 0
(II) VESA(0): Serial No: R8B00481SL0
(II) VESA(0): Ranges: V min: 50 V max: 76 Hz, H min: 30 H max: 83 kHz, PixClock max 210 MHz
(II) VESA(0): Monitor name: BenQ GL2450H

(II) VESA(0): Using EDID range info for horizontal sync
(II) VESA(0): Using EDID range info for vertical refresh

(II) VESA(0): Total Memory: 256 64KB banks (16384kB)
(II) VESA(0): Monitor0: Using hsync range of 30.00-83.00 kHz
(II) VESA(0): Monitor0: Using vrefresh range of 50.00-76.00 Hz
(II) VESA(0): Monitor0: Using maximum pixel clock of 210.00 MHz
(WW) VESA(0): Unable to estimate virtual size
(II) VESA(0): Not using built-in mode "1400x1050" (no mode of this name)
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(II) VESA(0): Not using built-in mode "1280x960" (no mode of this name)
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(II) VESA(0): Not using built-in mode "640x350" (no mode of this name)
(II) VESA(0): Not using built-in mode "512x384" (no mode of this name)
(II) VESA(0): Not using built-in mode "320x240" (no mode of this name)
(II) VESA(0): Not using built-in mode "320x200" (no mode of this name)
(--) VESA(0): Virtual size is 1280x1024 (pitch 1280)
(**) VESA(0): *Built-in mode "1280x1024"
(**) VESA(0): *Built-in mode "1152x864"
(**) VESA(0): *Built-in mode "1024x768"
(**) VESA(0): *Built-in mode "800x600"
(**) VESA(0): *Built-in mode "640x480"
(**) VESA(0): *Built-in mode "720x400"
(**) VESA(0): Display dimensions: (530, 300) mm
(**) VESA(0): DPI set to (61, 86)

So I'm limited to 1280x1024 with VESA.

2013-02-17: ad4p6 - I booted FreeBSD 6.4-stable, the network interface isn't supported. dmesg output: normal, verbose. from /etc/motd:

FreeBSD 6.4-STABLE (QUIET) #27: Sun Mar 15 19:42:19 CET 2009

from /var/log/messages:

Feb 17 02:34:53 kg-quiet kernel: pci3: <network, ethernet> at device 0.0 (no driver attached)

FreeBSD 6.4 doesn't even have gpart.

2013-02-17: ad4p4 - prepare to boot from ad4p6:

root@kg-quiet# gpart set -a bootonce -i 6 ad4
bootonce set on ad4p6
root@kg-quiet# gpart show -p ad4
=>        34  1953525101    ad4  GPT  (931G)
          34           6         - free -  (3.0k)
          40    37748736  ad4p1  freebsd-swap  (18G)
    37748776         128  ad4p2  freebsd-boot  (64k)
    37748904   314572664  ad4p3  freebsd-ufs  (150G)
   352321568   314572800  ad4p4  freebsd-ufs  (150G)
   666894368   314572800  ad4p5  freebsd-ufs  (150G)
   981467168   125829120  ad4p6  freebsd-ufs  [bootonce,bootme]  (60G)
  1107296288   846228847         - free -  (403G)

2013-02-17: ad4p4 - now copy over RELENG_6 from the usb-connected drive. create a partition:

root@kg-quiet# gpart add -t freebsd-ufs -s 60G ad4
ad4p6 added

create a filesystem:

root@kg-quiet# newfs -U /dev/ad4p6
/dev/ad4p6: 61440.0MB (125829120 sectors) block size 16384, fragment size 2048
    using 335 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

mount dest:

root@kg-quiet# mount /dev/ad4p6 /media

mount source (which is on da0s2):

root@kg-quiet# mount /dev/da0s2a /mnt
root@kg-quiet# more /mnt/etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s1b             none            swap    sw              0       0
/dev/ad0s2a             /               ufs     rw              1       1
/dev/ad0s2e             /tmp            ufs     rw              2       2
/dev/ad0s2f             /usr            ufs     rw              2       2
/dev/ad0s2d             /var            ufs     rw              2       2
#/dev/ad0s4d            /extra          ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
/dev/ad4p1              /d1             ufs     rw              2       2
/dev/ad6s1d             /d2             ufs     rw              2       2
#/dev/da4s1d            /d3             ufs     rw              2       2
/dev/ad8p1              /d4             ufs     rw              2       2
linprocfs               /compat/linux/proc      linprocfs       rw      0       0
root@kg-quiet# mount /dev/da0s2e /mnt/tmp
root@kg-quiet# mount /dev/da0s2d /mnt/var
root@kg-quiet# mount /dev/da0s2f /mnt/usr

copy with find and cpio:

root@kg-quiet# cd /mnt
root@kg-quiet# find . | cpio -pdumv /media
(long and boring output skipped)
/media/./extra
/media/./d9
/media/./d1
44446310 blocks

Fixed the fstab, it now looks like this:

root@kg-quiet# more /media/etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad4p1              none            swap    sw              0       0
/dev/ad4p6              /               ufs     rw              1       1
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
/dev/ad8p1              /d1             ufs     rw              2       2
/dev/ad6s1d             /d2             ufs     rw              2       2
/dev/ad10p1             /d4             ufs     rw              2       2
linprocfs               /compat/linux/proc      linprocfs       rw      0       0

Only booting remains.

2013-02-16: ad4p5 - FreeBSD 7.4-stable booted, but the network interface doesn't work. dmesg output: normal, verbose. from /etc/motd:

FreeBSD 7.4-STABLE (QUIET) #9: Mon Apr  4 00:59:26 CEST 2011

from /var/log/messages:

Feb 17 00:06:58 kg-quiet kernel: re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xe000-0xe0ff mem 0xd0004000-0xd0004fff,0xd0000000-0xd0003fff irq 17 at device 0.0 on pci3
Feb 17 00:06:58 kg-quiet kernel: re0: Using 1 MSI-X message
Feb 17 00:06:58 kg-quiet kernel: re0: Chip rev. 0x48000000
Feb 17 00:06:58 kg-quiet kernel: re0: MAC rev. 0x00000000
Feb 17 00:06:58 kg-quiet kernel: re0: Unknown H/W revision: 0x48000000
Feb 17 00:06:58 kg-quiet kernel: device_attach: re0 attach returned 6

And gpart under this old FreeBSD doesn't understand the 'bootonce' attribute. That's it.

2013-02-16: ad4p4 - prepare to boot from ad4p5:

root@kg-quiet# gpart set -a bootonce -i 5 ad4
bootonce set on ad4p5
root@kg-quiet# gpart show -p ad4
=>        34  1953525101    ad4  GPT  (931G)
          34           6         - free -  (3.0k)
          40    37748736  ad4p1  freebsd-swap  (18G)
    37748776         128  ad4p2  freebsd-boot  (64k)
    37748904   314572664  ad4p3  freebsd-ufs  (150G)
   352321568   314572800  ad4p4  freebsd-ufs  (150G)
   666894368   314572800  ad4p5  freebsd-ufs  [bootonce,bootme]  (150G)
   981467168   972057967         - free -  (463G)

2013-02-16: ad4p4 - now copy over RELENG_7 from the usb-connected drive. create a partition for it:

root@kg-quiet# gpart add -t freebsd-ufs -s 150G ad4
ad4p5 added
root@kg-quiet# gpart show -p ad4
=>        34  1953525101    ad4  GPT  (931G)
          34           6         - free -  (3.0k)
          40    37748736  ad4p1  freebsd-swap  (18G)
    37748776         128  ad4p2  freebsd-boot  (64k)
    37748904   314572664  ad4p3  freebsd-ufs  (150G)
   352321568   314572800  ad4p4  freebsd-ufs  (150G)
   666894368   314572800  ad4p5  freebsd-ufs  (150G)
   981467168   972057967         - free -  (463G)

create a filesystem on it:

root@kg-quiet# newfs -U /dev/ad4p5
/dev/ad4p5: 153600.0MB (314572800 sectors) block size 16384, fragment size 2048
    using 837 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, 147116256, 147492512, 147868768, 148245024, 148621280, 148997536,
 149373792, 149750048, 150126304, 150502560, 150878816, 151255072, 151631328, 152007584, 152383840, 152760096,
 153136352, 153512608, 153888864, 154265120, 154641376, 155017632, 155393888, 155770144, 156146400, 156522656,
 156898912, 157275168, 157651424, 158027680, 158403936, 158780192, 159156448, 159532704, 159908960, 160285216,
 160661472, 161037728, 161413984, 161790240, 162166496, 162542752, 162919008, 163295264, 163671520, 164047776,
 164424032, 164800288, 165176544, 165552800, 165929056, 166305312, 166681568, 167057824, 167434080, 167810336,
 168186592, 168562848, 168939104, 169315360, 169691616, 170067872, 170444128, 170820384, 171196640, 171572896,
 171949152, 172325408, 172701664, 173077920, 173454176, 173830432, 174206688, 174582944, 174959200, 175335456,
 175711712, 176087968, 176464224, 176840480, 177216736, 177592992, 177969248, 178345504, 178721760, 179098016,
 179474272, 179850528, 180226784, 180603040, 180979296, 181355552, 181731808, 182108064, 182484320, 182860576,
 183236832, 183613088, 183989344, 184365600, 184741856, 185118112, 185494368, 185870624, 186246880, 186623136,
 186999392, 187375648, 187751904, 188128160, 188504416, 188880672, 189256928, 189633184, 190009440, 190385696,
 190761952, 191138208, 191514464, 191890720, 192266976, 192643232, 193019488, 193395744, 193772000, 194148256,
 194524512, 194900768, 195277024, 195653280, 196029536, 196405792, 196782048, 197158304, 197534560, 197910816,
 198287072, 198663328, 199039584, 199415840, 199792096, 200168352, 200544608, 200920864, 201297120, 201673376,
 202049632, 202425888, 202802144, 203178400, 203554656, 203930912, 204307168, 204683424, 205059680, 205435936,
 205812192, 206188448, 206564704, 206940960, 207317216, 207693472, 208069728, 208445984, 208822240, 209198496,
 209574752, 209951008, 210327264, 210703520, 211079776, 211456032, 211832288, 212208544, 212584800, 212961056,
 213337312, 213713568, 214089824, 214466080, 214842336, 215218592, 215594848, 215971104, 216347360, 216723616,
 217099872, 217476128, 217852384, 218228640, 218604896, 218981152, 219357408, 219733664, 220109920, 220486176,
 220862432, 221238688, 221614944, 221991200, 222367456, 222743712, 223119968, 223496224, 223872480, 224248736,
 224624992, 225001248, 225377504, 225753760, 226130016, 226506272, 226882528, 227258784, 227635040, 228011296,
 228387552, 228763808, 229140064, 229516320, 229892576, 230268832, 230645088, 231021344, 231397600, 231773856,
 232150112, 232526368, 232902624, 233278880, 233655136, 234031392, 234407648, 234783904, 235160160, 235536416,
 235912672, 236288928, 236665184, 237041440, 237417696, 237793952, 238170208, 238546464, 238922720, 239298976,
 239675232, 240051488, 240427744, 240804000, 241180256, 241556512, 241932768, 242309024, 242685280, 243061536,
 243437792, 243814048, 244190304, 244566560, 244942816, 245319072, 245695328, 246071584, 246447840, 246824096,
 247200352, 247576608, 247952864, 248329120, 248705376, 249081632, 249457888, 249834144, 250210400, 250586656,
 250962912, 251339168, 251715424, 252091680, 252467936, 252844192, 253220448, 253596704, 253972960, 254349216,
 254725472, 255101728, 255477984, 255854240, 256230496, 256606752, 256983008, 257359264, 257735520, 258111776,
 258488032, 258864288, 259240544, 259616800, 259993056, 260369312, 260745568, 261121824, 261498080, 261874336,
 262250592, 262626848, 263003104, 263379360, 263755616, 264131872, 264508128, 264884384, 265260640, 265636896,
 266013152, 266389408, 266765664, 267141920, 267518176, 267894432, 268270688, 268646944, 269023200, 269399456,
 269775712, 270151968, 270528224, 270904480, 271280736, 271656992, 272033248, 272409504, 272785760, 273162016,
 273538272, 273914528, 274290784, 274667040, 275043296, 275419552, 275795808, 276172064, 276548320, 276924576,
 277300832, 277677088, 278053344, 278429600, 278805856, 279182112, 279558368, 279934624, 280310880, 280687136,
 281063392, 281439648, 281815904, 282192160, 282568416, 282944672, 283320928, 283697184, 284073440, 284449696,
 284825952, 285202208, 285578464, 285954720, 286330976, 286707232, 287083488, 287459744, 287836000, 288212256,
 288588512, 288964768, 289341024, 289717280, 290093536, 290469792, 290846048, 291222304, 291598560, 291974816,
 292351072, 292727328, 293103584, 293479840, 293856096, 294232352, 294608608, 294984864, 295361120, 295737376,
 296113632, 296489888, 296866144, 297242400, 297618656, 297994912, 298371168, 298747424, 299123680, 299499936,
 299876192, 300252448, 300628704, 301004960, 301381216, 301757472, 302133728, 302509984, 302886240, 303262496,
 303638752, 304015008, 304391264, 304767520, 305143776, 305520032, 305896288, 306272544, 306648800, 307025056,
 307401312, 307777568, 308153824, 308530080, 308906336, 309282592, 309658848, 310035104, 310411360, 310787616,
 311163872, 311540128, 311916384, 312292640, 312668896, 313045152, 313421408, 313797664, 314173920, 314550176

mount destination:

root@kg-quiet# mount /dev/ad4p5 /media

RELENG_7 is on da0s1, mount sources:

root@kg-quiet# mount /dev/da0s1a /mnt
root@kg-quiet# more /mnt/etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/da0s1b             none            swap    sw              0       0
/dev/da0s1a             /               ufs     rw              1       1
/dev/da0s1e             /tmp            ufs     rw              2       2
/dev/da0s1f             /usr            ufs     rw              2       2
/dev/da0s1d             /var            ufs     rw              2       2
#/dev/ad0s4d            /extra          ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
#linprocfs               /compat/linux/proc      linprocfs       rw      0       0
#/dev/ad4p1             /d1             ufs     rw              2       2
#/dev/ad6s1d            /d2             ufs     rw              2       2
#/dev/da4s1d            /d3             ufs     rw              2       2
#/dev/ad8p1             /d4             ufs     rw              2       2
root@kg-quiet# mount /dev/da0s1e /mnt/tmp
root@kg-quiet# mount /dev/da0s1d /mnt/var
root@kg-quiet# mount /dev/da0s1f /mnt/usr

copy with find and cpio

root@kg-quiet# cd /mnt
root@kg-quiet# find . | cpio -pdumv /media

(output skipped - again, this takes some time)

/media/./.cshrc
/media/./.profile
39237179 blocks

After fixing the fstab, it looks like this:

root@kg-quiet# more /media/etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad4p1              none            swap    sw              0       0
/dev/ad4p5              /               ufs     rw              1       1
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
#linprocfs               /compat/linux/proc      linprocfs       rw      0       0
/dev/ad8p1              /d1             ufs     rw              2       2
/dev/ad6s1d             /d2             ufs     rw              2       2
/dev/ad10p1             /d4             ufs     rw              2       2

Now, try to boot it.

2013-02-16: ad4p4 - the fixed-up /etc/fstab looks like this:

root@kg-quiet# more /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad4p1              none            swap    sw              0       0
/dev/ad4p4              /               ufs     rw              1       1
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
proc                    /proc           procfs  rw              0       0
#linprocfs               /compat/linux/proc      linprocfs       rw      0       0
/dev/ad8p1              /d1             ufs     rw              2       2
/dev/ad6s1d             /d2             ufs     rw              2       2
/dev/ad10p1             /d4             ufs     rw              2       2

that's all

2013-02-16: ad4p4 - I booted FreeBSD 8.3-stable from the new partition. dmesg output: normal, verbose.

root@kg-quiet# uname -a
FreeBSD kg-quiet.kg4.no 8.3-STABLE FreeBSD 8.3-STABLE #2: Fri Jan  4 19:18:15 CET 2013     root@kg-quiet.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

disk layout:

root@kg-quiet# swapinfo -h; df -h
Device          1K-blocks     Used    Avail Capacity
/dev/ad4p1       18874368       0B      18G     0%
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/ad4p4    145G     21G    111G    16%    /
devfs         1.0k    1.0k      0B   100%    /dev
procfs        4.0k    4.0k      0B   100%    /proc

It is strange that the drives doesn't show up as ada0 etc. pciconf output:

root@kg-quiet# pciconf -lv
hostb0@pci0:0:0:0:    class=0x060000 card=0x85261043 chip=0x14101022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:1:0:    class=0x030000 card=0x85261043 chip=0x99041002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    class      = display
    subclass   = VGA
none0@pci0:0:1:1:    class=0x040300 card=0x85261043 chip=0x99021002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    class      = multimedia
    subclass   = HDA
atapci0@pci0:0:17:0:    class=0x010601 card=0x85271043 chip=0x78011022 rev=0x40 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = mass storage
    subclass   = SATA
ohci0@pci0:0:18:0:    class=0x0c0310 card=0x85271043 chip=0x78071022 rev=0x11 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = serial bus
    subclass   = USB
ehci0@pci0:0:18:2:    class=0x0c0320 card=0x85271043 chip=0x78081022 rev=0x11 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = serial bus
    subclass   = USB
ohci1@pci0:0:19:0:    class=0x0c0310 card=0x85271043 chip=0x78071022 rev=0x11 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = serial bus
    subclass   = USB
ehci1@pci0:0:19:2:    class=0x0c0320 card=0x85271043 chip=0x78081022 rev=0x11 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = serial bus
    subclass   = USB
none1@pci0:0:20:0:    class=0x0c0500 card=0x85271043 chip=0x780b1022 rev=0x14 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = serial bus
    subclass   = SMBus
hdac0@pci0:0:20:2:    class=0x040300 card=0x84441043 chip=0x780d1022 rev=0x01 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = multimedia
    subclass   = HDA
isab0@pci0:0:20:3:    class=0x060100 card=0x85271043 chip=0x780e1022 rev=0x11 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-ISA
pcib1@pci0:0:20:4:    class=0x060401 card=0x00000000 chip=0x780f1022 rev=0x40 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:21:0:    class=0x060400 card=0x00001022 chip=0x43a01022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:21:1:    class=0x060400 card=0x00001022 chip=0x43a11022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:21:2:    class=0x060400 card=0x00001022 chip=0x43a21022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
hostb1@pci0:0:24:0:    class=0x060000 card=0x00000000 chip=0x14001022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb2@pci0:0:24:1:    class=0x060000 card=0x00000000 chip=0x14011022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb3@pci0:0:24:2:    class=0x060000 card=0x00000000 chip=0x14021022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb4@pci0:0:24:3:    class=0x060000 card=0x00000000 chip=0x14031022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb5@pci0:0:24:4:    class=0x060000 card=0x00000000 chip=0x14041022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb6@pci0:0:24:5:    class=0x060000 card=0x00000000 chip=0x14051022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
re0@pci0:3:0:0:    class=0x020000 card=0x85051043 chip=0x816810ec rev=0x09 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet
none2@pci0:4:0:0:    class=0x0c0330 card=0x84881043 chip=0x10421b21 rev=0x00 hdr=0x00
    class      = serial bus
    subclass   = USB

2013-02-16: ada0p3 - set up for booting from ada0p4 (just once):

root@kg-quiet# gpart set -a bootonce -i 4 ada0
bootonce set on ada0p4

check:

root@kg-quiet# gpart show -p ada0
=>        34  1953525101    ada0  GPT  (931G)
          34           6          - free -  (3.0k)
          40    37748736  ada0p1  freebsd-swap  (18G)
    37748776         128  ada0p2  freebsd-boot  (64k)
    37748904   314572664  ada0p3  freebsd-ufs  (150G)
   352321568   314572800  ada0p4  freebsd-ufs  [bootonce,bootme]  (150G)
   666894368  1286630767          - free -  (613G)

Now try it. Ok, it didn't work, the drive was still recognized as ad4. Strange, as the ataahci (or ata-ahci) driver is included in the generic kernel. Anyway, easy to fix by changing the fstab.

2013 02-16: ada0p3 - time to copy over the installations from the old hard drive (ide). I conncted it to a ide-to-usb adapter, and connected that to the machine. It shows up as da0 in /var/log/messages:

Feb 16 20:03:29 kg-quiet kernel: usbd_set_config_index: could not read device status: USB_ERR_SHORT_XFER
Feb 16 20:03:29 kg-quiet kernel: ugen1.2: <JMicron> at usbus1
Feb 16 20:03:29 kg-quiet kernel: umass0: <MSC Bulk-Only Transfer> on usbus1
Feb 16 20:03:29 kg-quiet kernel: umass0:  SCSI over Bulk-Only; quirks = 0x4000
Feb 16 20:03:29 kg-quiet kernel: umass0:7:0:-1: Attached to scbus7
Feb 16 20:03:29 kg-quiet kernel: da0 at umass-sim0 bus 0 scbus7 target 0 lun 0
Feb 16 20:03:29 kg-quiet kernel: da0: <WDC WD16 00AVJB-63J5A0 3E01> Fixed Direct Access SCSI-2 device
Feb 16 20:03:29 kg-quiet kernel: da0: 40.000MB/s transfers
Feb 16 20:03:29 kg-quiet kernel: da0: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)
Feb 16 20:03:29 kg-quiet kernel: GEOM: da0s1: geometry does not match label (16h,63s != 255h,63s).
Feb 16 20:03:29 kg-quiet kernel: GEOM: da0s2: geometry does not match label (16h,63s != 255h,63s).
Feb 16 20:03:29 kg-quiet kernel: GEOM: da0s3: geometry does not match label (16h,63s != 255h,63s).
Feb 16 20:03:29 kg-quiet kernel: GEOM: da0s4: geometry does not match label (16h,63s != 255h,63s).

and gpart says this:

root@kg-quiet# gpart show -p da0
=>       63  312581745    da0  MBR  (149G)
         63   78140097  da0s1  freebsd  [active]  (37G)
   78140160   78140160  da0s2  freebsd  (37G)
  156280320   78140160  da0s3  freebsd  (37G)
  234420480   78156225  da0s4  freebsd  (37G)
  312576705       5103         - free -  (2.5M)

From my notes, I know that the contents are as follows: da0s1 - RELENG_7

root@kg-quiet# l /dev/da0s1*
/dev/da0s1   /dev/da0s1a  /dev/da0s1b  /dev/da0s1d  /dev/da0s1e  /dev/da0s1f

da0s2 - RELENG_6

root@kg-quiet# l /dev/da0s2*
/dev/da0s2   /dev/da0s2a  /dev/da0s2d  /dev/da0s2e  /dev/da0s2f

da0s3 - FreeBSD 8.3-stable

root@kg-quiet# l /dev/da0s3*
/dev/da0s3   /dev/da0s3a  /dev/da0s3d  /dev/da0s3e  /dev/da0s3f

da0s4 - free / not used

root@kg-quiet# l /dev/da0s4*
/dev/da0s4

So I'll try with FreeBSD 8.3 first. Create a partition for it:

root@kg-quiet# gpart show -p ada0
=>        34  1953525101    ada0  GPT  (931G)
          34           6          - free -  (3.0k)
          40    37748736  ada0p1  freebsd-swap  (18G)
    37748776         128  ada0p2  freebsd-boot  (64k)
    37748904   314572664  ada0p3  freebsd-ufs  (150G)
   352321568  1601203567          - free -  (763G)
root@kg-quiet# gpart add -t freebsd-ufs -s 150G ada0
ada0p4 added
root@kg-quiet# gpart show -p ada0
=>        34  1953525101    ada0  GPT  (931G)
          34           6          - free -  (3.0k)
          40    37748736  ada0p1  freebsd-swap  (18G)
    37748776         128  ada0p2  freebsd-boot  (64k)
    37748904   314572664  ada0p3  freebsd-ufs  (150G)
   352321568   314572800  ada0p4  freebsd-ufs  (150G)
   666894368  1286630767          - free -  (613G)

create a filesystem on it

root@kg-quiet# newfs -U /dev/ada0p4
/dev/ada0p4: 153600.0MB (314572800 sectors) block size 32768, fragment size 4096
    using 246 cylinder groups of 626.09MB, 20035 blks, 80256 inodes.
    with soft updates
super-block backups (for fsck_ffs -b #) at:
 192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832,
 15387072, 16669312, 17951552, 19233792, 20516032, 21798272, 23080512, 24362752, 25644992, 26927232, 28209472,
 29491712, 30773952, 32056192, 33338432, 34620672, 35902912, 37185152, 38467392, 39749632, 41031872, 42314112,
 43596352, 44878592, 46160832, 47443072, 48725312, 50007552, 51289792, 52572032, 53854272, 55136512, 56418752,
 57700992, 58983232, 60265472, 61547712, 62829952, 64112192, 65394432, 66676672, 67958912, 69241152, 70523392,
 71805632, 73087872, 74370112, 75652352, 76934592, 78216832, 79499072, 80781312, 82063552, 83345792, 84628032,
 85910272, 87192512, 88474752, 89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432, 98732672,
 100014912, 101297152, 102579392, 103861632, 105143872, 106426112, 107708352, 108990592, 110272832, 111555072,
 112837312, 114119552, 115401792, 116684032, 117966272, 119248512, 120530752, 121812992, 123095232, 124377472,
 125659712, 126941952, 128224192, 129506432, 130788672, 132070912, 133353152, 134635392, 135917632, 137199872,
 138482112, 139764352, 141046592, 142328832, 143611072, 144893312, 146175552, 147457792, 148740032, 150022272,
 151304512, 152586752, 153868992, 155151232, 156433472, 157715712, 158997952, 160280192, 161562432, 162844672,
 164126912, 165409152, 166691392, 167973632, 169255872, 170538112, 171820352, 173102592, 174384832, 175667072,
 176949312, 178231552, 179513792, 180796032, 182078272, 183360512, 184642752, 185924992, 187207232, 188489472,
 189771712, 191053952, 192336192, 193618432, 194900672, 196182912, 197465152, 198747392, 200029632, 201311872,
 202594112, 203876352, 205158592, 206440832, 207723072, 209005312, 210287552, 211569792, 212852032, 214134272,
 215416512, 216698752, 217980992, 219263232, 220545472, 221827712, 223109952, 224392192, 225674432, 226956672,
 228238912, 229521152, 230803392, 232085632, 233367872, 234650112, 235932352, 237214592, 238496832, 239779072,
 241061312, 242343552, 243625792, 244908032, 246190272, 247472512, 248754752, 250036992, 251319232, 252601472,
 253883712, 255165952, 256448192, 257730432, 259012672, 260294912, 261577152, 262859392, 264141632, 265423872,
 266706112, 267988352, 269270592, 270552832, 271835072, 273117312, 274399552, 275681792, 276964032, 278246272,
 279528512, 280810752, 282092992, 283375232, 284657472, 285939712, 287221952, 288504192, 289786432, 291068672,
 292350912, 293633152, 294915392, 296197632, 297479872, 298762112, 300044352, 301326592, 302608832, 303891072,
 305173312, 306455552, 307737792, 309020032, 310302272, 311584512, 312866752, 314148992

mount destination:

root@kg-quiet# mount /dev/ada0p4 /media

mount source(s):

root@kg-quiet# mount /dev/da0s3a /mnt
root@kg-quiet# cat /mnt/etc/fstab
# Device        Mountpoint    FStype    Options        Dump    Pass#
/dev/ad0s1b        none        swap    sw        0    0
/dev/ad0s3a        /        ufs    rw        1    1
/dev/ad0s3e        /tmp        ufs    rw        2    2
/dev/ad0s3f        /usr        ufs    rw        2    2
/dev/ad0s3d        /var        ufs    rw        2    2
/dev/acd0        /cdrom        cd9660    ro,noauto    0    0
proc                    /proc           procfs  rw              0       0
#linprocfs               /compat/linux/proc      linprocfs       rw      0       0
/dev/ad4p1        /d1        ufs    rw        2    2
/dev/ad6s1d        /d2        ufs    rw        2    2
#/dev/da4s1d        /d3        ufs    rw        2    2
##/dev/ad8s1d        /d4        ufs    rw        2    2
/dev/ad8p1        /d4        ufs    rw        2    2
root@kg-quiet# mount /dev/da0s3e /mnt/tmp
root@kg-quiet# mount /dev/da0s3d /mnt/var
root@kg-quiet# mount /dev/da0s3f /mnt/usr

Now, copy by using find and cpio:

root@kg-quiet# pwd
/root
root@kg-quiet# cd /mnt
root@kg-quiet# find . | cpio -pdumv /media
(output skipped - this takes a while)
/media/./mnt2
/media/./cdrom
42619710 blocks

Done. Does it look ok?

root@kg-quiet# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ada0p3    145G    2.9G    130G     2%    /
devfs          1.0k    1.0k      0B   100%    /dev
/dev/ada0p4    145G     21G    111G    16%    /media
/dev/da0s3a    989M    573M    336M    63%    /mnt
/dev/da0s3e    495M    400k    455M     0%    /mnt/tmp
/dev/da0s3d    3.9G    126M    3.4G     3%    /mnt/var
/dev/da0s3f     30G     20G      8G    72%    /mnt/usr

Probably. Now fix the fstab.

root@kg-quiet# mv fstab fstab.org
root@kg-quiet# cp -pv fstab.org fstab
fstab.org -> fstab

After editing, the new fstab looks like this:

root@kg-quiet# more fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ada0p1             none            swap    sw              0       0
/dev/ada0p4             /               ufs     rw              1       1
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
proc                    /proc           procfs  rw              0       0
#linprocfs               /compat/linux/proc      linprocfs       rw      0       0
#/dev/ad4p1             /d1             ufs     rw              2       2
#/dev/ad6s1d            /d2             ufs     rw              2       2
#/dev/ad8p1             /d4             ufs     rw              2       2

I'll fix the other drives after I boot this install.

2013 02-16: ada0p3 - interesting (or not) dmesg output:

ACPI Warning: FADT (revision 5) is longer than ACPI 2.0 version, truncating length 268 to 244 (20110527/tbfadt-320)
ACPI Warning: Optional field Pm2ControlBlock has zero address or length: 0x0000000000000000/0x1 (20110527/tbfadt-586)

ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20110527/psargs-392)
ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20110527/nsinit-380)

hdac0: <ATI (0x9902) HDA Controller> mem 0xfeb44000-0xfeb47fff irq 18 at device 1.1 on pci0
hdac0: hdac_get_capabilities: Invalid corb size (0)
device_attach: hdac0 attach returned 6

ppc0: cannot reserve I/O port range

acpi_throttle0: <ACPI CPU Throttling> on cpu0
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
acpi_throttle1: <ACPI CPU Throttling> on cpu1
acpi_throttle1: failed to attach P_CNT
device_attach: acpi_throttle1 attach returned 6
acpi_throttle2: <ACPI CPU Throttling> on cpu2
acpi_throttle2: failed to attach P_CNT
device_attach: acpi_throttle2 attach returned 6
acpi_throttle3: <ACPI CPU Throttling> on cpu3
acpi_throttle3: failed to attach P_CNT
device_attach: acpi_throttle3 attach returned 6

hard drives

ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <ST1000DM003-9YN162 CC4C> ATA-8 SATA 3.x device
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad4
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: <ST31000340AS SD1A> ATA-8 SATA 2.x device
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
ada1: Previously was known as ad6
ada2 at ahcich2 bus 0 scbus2 target 0 lun 0
ada2: <ST31000528AS CC49> ATA-8 SATA 2.x device
ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada2: Command Queueing enabled
ada2: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
ada2: Previously was known as ad8
ada3 at ahcich3 bus 0 scbus3 target 0 lun 0
ada3: <SAMSUNG HD204UI 1AQ10001> ATA-8 SATA 2.x device
ada3: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada3: Command Queueing enabled
ada3: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
ada3: Previously was known as ad10

That's all.

2013 02-16: ada0p3 - FreeBSD 9.1-release installed. dmesg output: normal, verbose.

root@kg-quiet# uname -a
FreeBSD kg-quiet.kg4.no 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

disk layout:

root@kg-quiet# swapinfo -h; df -h
Device          1K-blocks     Used    Avail Capacity
/dev/ada0p1      18874368       0B      18G     0%
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ada0p3    145G    2.9G    130G     2%    /
devfs          1.0k    1.0k      0B   100%    /dev

gpart show

root@kg-quiet# gpart show -p ada0
=>        34  1953525101    ada0  GPT  (931G)
          34           6          - free -  (3.0k)
          40    37748736  ada0p1  freebsd-swap  (18G)
    37748776         128  ada0p2  freebsd-boot  (64k)
    37748904   314572664  ada0p3  freebsd-ufs  (150G)
   352321568  1601203567          - free -  (763G)

That's it for now.

2013-02-16: First I'm using my workstation to write the FreeBSD 9.1-release memstick image to a usb stick:

tingo@kg-v2$ su
Password:
root@kg-v2# pwd
/usr/home/tingo/dl/bsd/fbsd/9.1
root@kg-v2# dd if=./FreeBSD-9.1-RELEASE-amd64-memstick.img of=/dev/da3 bs=64k
11732+1 records in
11732+1 records out
768925696 bytes transferred in 188.385923 secs (4081652 bytes/sec)

which is just over 3 minutes. Next, I boot the machine from the memstick. To get to the boot menu, you first have to enter UEFI (F2), then press F8. It would have been easier if I could just press F8 at once. I created a partition and installed FreeBSD 9.1-release on it.