i386をamd64へ

FreeBSD実験機体CoolMasterでテスト

http://nanasess.net/mt/freebsd/

FreeBSD-Users-JPで教えていただいたURL

http://uyota.asablo.jp/blog/2007/06/03/1552367

FreeBSD-Users ML へも質問してみる

CPU: AMD Athlon(tm) 64 X2 Dual Core な機体なのに、FreeBSD 6.2-RELEASE/i386 
をインストールして使用していました。
現在、FreeBSD 6.2-RELEASE-p7 になっております。
# sysctl kern.smp.cpusしますと 
kern.smp.cpus: 1 となりますので、
/usr/src/sys/amd64/conf/GENERIC に
options SMP を書き加えて、
# config GENERIC して
Kernel build directory is ../compile/GENERIC
Don't forget to do ``make cleandepend; make depend''

# cd ../compile/GENERIC
# make cleandepend; make depend  で、

../../../i386/i386/genassym.c:216: error: storage size of `BC32SELw1' isn't known
../../../i386/i386/genassym.c:216: error: storage size of `BC32SELw2' isn't known
../../../i386/i386/genassym.c:216: error: storage size of `BC32SELw3' isn't known
*** Error code 1

とラーします。

FreeBSD ISO-IMAGES/amd64 をCDに焼いて、/usr/sbin/sysinstall からConfigure ->
Distribution -> kernels としましたが、バージョン不整合?で上手く行きませんでした。

データ領域などを温存しつつ、i386 から amd64のカーネルに移行するには、どのような方法が良いでしょうか?

i386でSMPしてみる

# cp /usr/src/sys/i386/conf/GENERIC /usr/src/sys/i386/conf/COOLMASTER
# vi /usr/src/sys/i386/conf/COOLMASTER
options SMP  # Symmetric MultiProcessor Kernel
の1行を加える。
# cd /usr/src/sys/i386/conf
# config COOLMASTER
Kernel build directory is ../compile/COOLMASTER
Don't forget to do ``make cleandepend; make depend''
# cd ../compile/COOLMASTER
# make cleandepend; make depend
# make install
===> i2c/controllers/amdpm (install)
install -o root -g wheel -m 555   amdpm.ko /boot/kernel
===> i2c/controllers/amdsmb (install)
install -o root -g wheel -m 555   amdsmb.ko /boot/kernel
install: amdsmb.ko: No such file or directory
*** Error code 71

Stop in /usr/src/sys/modules/i2c/controllers/amdsmb.
*** Error code 1

Stop in /usr/src/sys/modules/i2c/controllers.
*** Error code 1

Stop in /usr/src/sys/modules/i2c.
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1

Stop in /usr/src/sys/i386/compile/COOLMASTER.

http://www.freebsd.org/doc/ja/books/handbook/kernelconfig-building.html

で、今度は、
# cd /usr/src
# make buildkernel KERNCONF=COOLMASTER
# make installkernel KERNCONF=COOLMASTER

/var/run/dmesg.boot

FreeBSD 6.2-RELEASE-p7 #0: Sun Sep 23 12:14:30 JST 2007
   root@CoolMaster.smb.net:/usr/obj/usr/src/sys/COOLMASTER
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ (2211.34-MHz 686-class CPU)
 Origin = "AuthenticAMD"  Id = 0x20f32  Stepping = 2
 AMD Features=0xe2500800<SYSCALL,NX,MMX+,FFXSR,LM,3DNow+,3DNow>
 AMD Features2=0x3<LAHF,CMP>
 Cores per package: 2
real memory  = 2147418112 (2047 MB)
avail memory = 2092077056 (1995 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1

ということでとりあえずは、CPU2基認識。

# top

last pid: 36102;  load averages:  0.99,  0.86,  0.53                                   up 0+00:21:59  12:46:05
62 processes:  2 running, 60 sleeping
CPU states: 50.0% user,  0.0% nice,  1.3% system,  0.2% interrupt, 48.5% idle
Mem: 180M Active, 399M Inact, 136M Wired, 10M Cache, 112M Buf, 1273M Free
Swap: 4071M Total, 4071M Free

  PID USERNAME     THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
  839 vscan          1   4    0 42016K 40516K accept 0   0:54  0.00% clamd
  862 mrtg           1   8    0 10328K  9980K nanslp 1   0:04  0.00% perl
 1045 root           1  96    0  6252K  3304K select 1   0:01  0.00% sshd
  823 root           1  96    0 34168K 32608K select 0   0:01  0.00% perl5.8.8
  830 vscan          1  96    0 55396K 51248K select 0   0:01  0.00% perl5.8.8
  812 www            1  20    0 16188K 12188K lockf  1   0:00  0.00% httpd
23850 root           1   8    0  9296K  9188K wait   0   0:00  0.00% make
  815 www            1  20    0 16140K 12144K lockf  1   0:00  0.00% httpd
  813 www            1  20    0 16268K 12232K lockf  1   0:00  0.00% httpd
  811 www            1  20    0 16868K 12848K lockf  0   0:00  0.00% httpd
  742 root           1   8    0 14080K  9348K nanslp 0   0:00  0.00% httpd
 1055 www            1  20    0 16140K 12132K lockf  1   0:00  0.00% httpd
  814 www            1   4    0 16184K 12184K kqread 1   0:00  0.00% httpd
31317 root           1  96    0  2496K  1748K CPU0   0   0:00  0.00% top
 1056 www            1  20    0 16164K 12136K lockf  1   0:00  0.00% httpd
  817 root           1  96    0  6620K  5104K select 0   0:00  0.00% snmpd
27151 root           1   8    0  1732K  1348K wait   1   0:00  0.00% sh
30829 root           1  96    0  6252K  3304K select 0   0:00  0.00% sshd
 1040 root           1  96    0  6316K  3340K select 1   0:00  0.00% sshd
 1048 root           1  20    0  5052K  2928K pause  0   0:00  0.00% csh
 1054 www            1  20    0 14252K  9904K lockf  1   0:00  0.00% httpd
  801 wnn            1  97    0  5020K  4512K select 0   0:00  0.00% jserver
30832 root           1  20    0  5044K  2936K pause  1   0:00  0.00% csh
 8377 root           1   8    0   796K   676K wait   0   0:00  0.00% make
36092 root           1   8    0   752K   644K wait   0   0:00  0.00% make
  806 root           1  96    0  5748K  3820K select 0   0:00  0.00% snmptrapd

トップ   編集 凍結解除 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2007-09-25 (火) 04:56:56