現在の自宅用のサーバをリプレースするために NEC VALUESTAR G タイプ TZ を購入し、AMD64版の Debian GNU/Linux をインストールしてみました。
そのページには
http://debian-amd64.alioth.debian.org/debian-installer/
からインストーラを入手するようにという記述がありますが、
現在は国内にもちゃんとミラーされているようで、
http://ftp.jp.debian.org/pub/Linux/Debian/debian-amd64/debian-installer/
http://hanzubon.jp/debian-amd64/debian-installer/
などが利用できるようです。
またインストーラで選択できるミラーサイトにもこの2つが出てきます。
ネットワークブートは選択できるのですが、 何故かDHCPでIPアドレスをうまく取得してくれないので (DHCPサーバ機のログでは、dhcpd は IPアドレスを割り振っているが、クライアント側がそれを掴まえられてないようで、何度も取得にくる)、 今回は monolithic インストーラの mini.iso を入手し、CD-R (実際は CD-RW) に焼いてこれでブートしました。
今回は BTO で 160GB HDD を選択したので、次のようにします。
# fdisk -l /dev/hda Disk /dev/hda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes /dev/hda1 * 1 1824 14651248+ 7 HPFS/NTFS /dev/hda2 1825 3040 9767520 83 Linux /dev/hda3 3041 3162 979965 82 Linux swap / Solaris /dev/hda4 3163 19457 130889587+ 5 Extended /dev/hda5 3163 3770 4883728+ 83 Linux /dev/hda6 3771 19457 126005796 83 Linux # df Filesystem 1K-ブロック 使用 使用可 使用% マウント位置 /dev/hda2 9614148 592284 8533488 7% / tmpfs 384576 0 384576 0% /dev/shm /dev/hda6 124027384 1200372 116526724 2% /home /dev/hda5 4807056 339404 4223468 8% /var
必要なものは後で apt で入れていけばいいので、 最小限のパッケージだけ選択してインストールを続けます。 インストール完了直後は testing の状態なので、 /etc/apt/source.list を編集して unstable にし apt-get update ; apt-get dist-upgrade を行います。
unstable にアップグレードが完了した後、400GB HDD を 1台追加しました。 今回は Seagate Barracuda 7200.8 ST3400832A を選択しました (対抗は HGST Deskstar 7K400 HDS724040KLAT80 で、 秋葉原価格では HGST の方がちょっと安いのですが、 Seagate の方が静からしいです。実際かなり静かです)。 パーティションを 1つ切って ext3 でフォーマットしてマウントします。
# fdisk -l /dev/hdb Disk /dev/hdb: 400.0 GB, 400088457216 bytes 255 heads, 63 sectors/track, 48641 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdb1 1 48641 390708801 83 Linux # df /u Filesystem 1K-ブロック 使用 使用可 使用% マウント位置 /dev/hdb1 384578164 131228 364911496 1% /u
インストール作業を行った時点で AMD64 用のカーネルパッケージは 2.6.8-11 と 2.6.11-9 が選択できしたが、 2.6.8 はちょっと古い、2.6.11 は何故か Broadcom NetXtreme のドライバ tg3 が入ってないので、 2.6.12.3 のソースを取ってきて自分でコンパイルしました。 (久々に一から .config を作成したので ext3 や IDE のドライバをモジュールにしてハマりましたが)
後は既存のサーバの環境に合わせてパッケージをインストールし設定していきます。
# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 12 model name : AMD Athlon(tm) 64 Processor 3200+ stepping : 0 cpu MHz : 2195.212 cache size : 512 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow bogomips : 4341.76 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.40.2) powernow-k8: 0 : fid 0xe (2200 MHz), vid 0x2 (1500 mV) powernow-k8: 1 : fid 0x2 (1000 MHz), vid 0x12 (1100 mV) cpu_init done, current fid 0xe, vid 0x2この状態で powernowd を実行するエラーが出ます。 メッセージ中に「cpufreq-userspace が必要」というものがあったので modprobe cpufreq_userspace してみた所、うまく実行できました。 というわけで /etc/modules に powernow-k8 と cpufreq_userspace を追加しておきましょう。
# /etc/init.d/powernowd start Starting powernowd: powernowd. # ps auxw | grep powernowd root 22187 0.0 0.0 2632 520 ? SNs 07:48 0:00 /usr/sbin/powernowd -q標準では powernowd に -q オプションが渡されていて、 メッセージが全然出ずちゃんと動作しているかよく分かりませんので、 試しに /etc/default/powernowd というファイルを作成し OPTIONS="-v" と書いてメッセージをたくさん出させて動作を確認してみます。
powernowd: PowerNow Daemon v0.96, (c) 2003-2005 John Clemens powernowd: Settings: powernowd: verbosity: 1 powernowd: mode: 1 (AGGRESSIVE) powernowd: step: 100 MHz (100000 kHz) powernowd: lowwater: 20 % powernowd: highwater: 80 % powernowd: poll interval: 1000 ms powernowd: Found 1 cpu: -- 1 thread (or core) per physical cpu powernowd: cpu0: 1000Mhz - 2200Mhz (2 steps) powernowd: step1 : 2200Mhz powernowd: step2 : 1000Mhz(2005/08/30追記) 現在の動作周波数を確認するために apt-cache search cpu | grep -i freq とかやってみた所、cpufrequtils というパッケージで確認できそうなことが分かりましたので、インストールしてみました。 平時はこんな感じです。(太字部分がCPUの周波数)
% cpufreq-info
cpufrequtils 0.3: cpufreq-info (C) Dominik Brodowski 2004
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
driver: powernow-k8
CPUs which need to switch frequency at the same time: 0
hardware limits: 1000 MHz - 2.20 GHz
available frequency steps: 2.20 GHz, 1000 MHz
available cpufreq governors: userspace, performance
current policy: frequency should be within 1000 MHz and 2.20 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.
負荷をかけた状態でもう一度確認してみると、このように変化します。
% cpufreq-info (中略) current CPU frequency is 2.20 GHz.というわけで、Cool'n Quiet はちゃんと動作しているようです。
Jul 16 20:56:54 localhost kernel: APIC error on CPU0: 40(40)というエラーがたくさん出ます。 カーネルオプションで noapic nolapic を渡すか、BIOS で APIC を無効にすれば出なくなります。 そのようにした場合のデメリットは不明です。 (おまけ: BIOS で APIC を無効にすると WindowsXP が起動しなくなりました)
0000:01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 661FX/M661FX/M661MX/741/M741/760/M760 PCI/AGP
0000:00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] Sound Controller (rev a0)
0000:00:0c.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5705_2 Gigabit Ethernet (rev 03)
mtu
Enables jumbo frames up to the specified MTU size. The valid range for
this parameter is 1500 to 9000. Default is 1500 which is standard
ethernet (non-jumbo) MTU size. Note that the MTU size excludes the
ethernet header size of 14 bytes. Actual frame size is MTU size + 14 bytes.
Jumbo MTU sizes are not supported on BCM5705 chips.
The MTU size can also be changed using ifconfig after the driver is loaded.
See the ifconfig man page for details.
0000:00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) 0000:00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) 0000:00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) 0000:00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller
そしてそれ経由で lm92, ds1621, eeprom の 3つのデバイスが見付かり、 lm92経由で
lm92: Found Maxim MAX6635 chipこんな感じで MAX6635 チップも見付かるのですが、いざ sensors コマンドを実行しても
(略) ds1621-i2c-0-4f Adapter: Parallel port adapter temp: +0.00°C (low = +0.0°C, high = +0.0°C) (略) lm92-i2c-0-4b Adapter: Parallel port adapter CPU Temp: +0.0000°C (high = +0.0000°C, low = +0.0000°C, crit = +0.0000°C, hyst = +0.0000°C) (略)こんな感じで全然温度情報がとれません。(試行錯誤中)
(2006/12/19追記) kernel 2.6.19 あたりから k8temp というドライバが追加され、 sensorsコマンドで以下のようにCPUの温度が取得できるようになっています。
% sensors k8temp-pci-00c3
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:
+31°C
この項目を追記した時期(12月)の暖房なし室内で、でアイドル状態で30℃前後です。
勝手に想像してたよりかなり低温です。