FreeBSD に関する幾つかのメモ(旧)


このマシンは、2001年2月16日(金)午後、お亡くなりになりました。
今までの働きに感謝し、ここに謹んでご冥福をお祈りします。

と思ったのですが、復活を遂げました。[2001.04.02]
復活の経緯と以後の活躍はこちらへ。

ハードウェア:
IBM Aptiva775(中古) をベースにしています。でも、あまり原型をとどめていません ^^;
ケース , 電源 , マザーボード , ライサーカード は元のままです。
CPUK6-2 400MHz ( IO DATA PK-K6H400/DV )
2nd Cache256KB
Memory128MB ( 32MB EDO SIMM * 4 )
VideoATI Xpert@XL ( PCI, 4MB )
NIC3Com 3C509Combo
NICGateway Communications G/Ethernet 16 Combo
FDDNEC? 2mode FDD
HDDSeagate Barracuda ST320430A ( 20GB, 7200rpm, UltraATA66 )
HDDIBM Deskstar 75GXP DTLA-307030 ( 30GB, 7200rpm, UltraATA100 )
HDDMaxtor DiamondMax 86480D8 ( 6.4GB, 5200rpm, ATA33 )
CD-ROMMitsumi FX120T ( x12 )
SCSI ControllerCreativeLab sb16scsi ( SoundBlaster 16 Combo )
SoundCreativeLab sb16scsi ( SoundBlaster 16 Combo )
UPSOMRON BX50XF
DisplayIiyama 5517AJ 17inch
※印は中古品でした。

PCI busのバージョン
Promise の Ultra66 カードを使おうとしたが、本体のPCIバスが古く(v2.0らしい)、 うまく使えなかった。残念。その結果、UltraATA 33/66/100 の3つのHDDが 通常のDMA Modeでしか使えないのです ... もったいない、かな?[2000.12.15]

ASUSのPCI-Ultra66C も試してみましたが、こちらはスロットに差すだけで bootすらできなくなりました。もう諦めましょう...[2001.2.10]

APM
AptivaのAPMが使えることに気がつきました。
随分前に、Aptivaのは特殊だから使えない、という話をどこかで読んで以来、 諦めてたのですが、kernel configurationで
device apm0 at isa? flags 0x31
で、無事に shutdown -p now で電源が切れました。
でも、CPUを乗せ換えているせいで、起動時には一旦とまってしまうため、 停電後の自動復帰などはできないのです...[2000.12.15]

ついでにUPSの電源を切るのも面倒ですね..[2000.12.26]

IDE
AptivaのオンボードIDEコントローラの OPTi ViperM は、FreeBSD 4.0 系では (今のところ[2000.12.16])使えません。インストール途中で、HDDのエラーでpanicを起こして とまってしまいます。どうも、パーティションを壊してくれている、とかいう話もあります。
Intel の PIIX3 なんかも駄目だという話もありますが、 少なくとも 1999年春頃の 4.x-current では発症していたようです (ref:Problem Report i386/11298)。
何とかして欲しいと願っております... 私にはどうしようもない。[2000.12.15]

上のProblem Report i386/11298に ある通り、2000/11/14に「4.2-RELEASEを試すように」とのことなので、試してみましたが、 インストールはうまくいったのですが、結局は安定しませんでした。
1回目は、再起動後にcvsupでソースコードを更新をはじめたところ、すぐに panic してだめ。 2回目は、cvsupはうまくいったのですが、make world ができない。再度行おうと make clean したところ、その途中で panic ...
やっぱりまだ安定していないのでしょうか?
4.2-STABLE で確認したいのですが、その前に落ちちゃった。[2000.12.26]

どうも、ata が原因ではないようです。起動時のメッセージでは、
ad0: 19569MB  [39761/16/63] at ata0-master BIOSPIO
ad1: 29314MB  [59560/16/63] at ata0-slave BIOSPIO
ad2: 6179MB  [13392/15/63] at ata1-master BIOSPIO
acd0: CDROM  at ata1-slave using BIOSPIO
ってな感じで、きちんと BIOSPIO で認識されています。インストールも(見た目は)たしかに うまくいっていますし、3.5-STABLE から 4.2Rをインストールした slice を mount すると、 問題なくファイルが展開さているようです。ってことで次節。[2001.02.13]

4.2R が使えない!?
上のとおり、インストールはうまくいったようなのですが、 でも、使えないです... カーネルを再構築しようとすると、cpp が core を吐いて落ちます。 何度か繰り返していると、
dev =  #ad/0x2000e, block = 0, fs= / usr
panic: ffs_blkfree: freeing free block

syncing disks... 7 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
giving up on 1 buffres
Uptime: 11m14s
Automatic reboot in 15 seconds - press a key on the console to abort
と、panic でした。 また、cvsup で最新のコードをマージしようとすると、その途中で panic しました。
Fetal trap 12: page fault in kernel mode
fault virtual address   = 0xbfc20370
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc0302b87
stack pointer           = 0x10:0xc8b27ed4
frame pointer           = 0x10:0xc8b27ee4
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 5634 (cpp)
interrupt mask          = net tty bio cam
trap number             = 12
panic: page fault

syncing disks... 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 
35 35
giving up on 35 buffers
Uptime: 30m45s
Automatic reboot in 15 seconds - press a key on the console to abort
ってな感じです。pmap_remove_pages で落ちてるようです。
一体、何が悪いのでしょう?3.5-STABLE では調子いいのに... [2001.02.13]

といっていたのですが、壊れてしまいました...
OBのK先生より、実験データの入った CD-R を受け取り、読んでみようと、 CD-ROM ドライブに入れて amd 経由でアクセスすると... 読めない? su して、無理矢理 mount すると、以下のようなメッセージが...
Feb 16 17:20:40 polymer3 /kernel: acd0: read_toc failed
Feb 16 17:20:40 polymer3 /kernel: acd0: read_toc failed
Feb 16 17:20:40 polymer3 amd[200]: /rmv/cdrom: mount (amfs_auto_cont): Operation not permitted
一応、何とか mount できた模様。umount し、ディスクを入替え、再度... amd では mount できず。 root で直接 mount すると...次のエラーが...
Feb 16 17:22:35 polymer3 amd[200]: found compatiblity option "nfsv2": set options vers=2, proto=udp for host xxxx
Feb 16 17:22:35 polymer3 amd[200]: found compatiblity option "nfsv2": set options vers=2, proto=udp for host xxxx
Feb 16 17:23:32 polymer3 su: turutani to root on /dev/ttyp2
Feb 16 17:25:22 polymer3 /kernel: wd1s1e: wdintr: read intr arrived early reading fsbn 72 of 64-79 (wd1s1 bn 786504; cn 780 tn 4 sn 12) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1e: wdintr: read intr arrived early reading fsbn 73 of 64-79 (wd1s1 bn 786505; cn 780 tn 4 sn 13) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1e: wdintr: read intr arrived early reading fsbn 74 of 64-79 (wd1s1 bn 786506; cn 780 tn 4 sn 14) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1e: wdintr: read intr arrived early reading fsbn 76 of 64-79 (wd1s1 bn 786508; cn 780 tn 4 sn 16) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1e: wdintr: read intr arrived early reading fsbn 77 of 64-79 (wd1s1 bn 786509; cn 780 tn 4 sn 17) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1e: wdintr: read intr arrived early reading fsbn 78 of 64-79 (wd1s1 bn 786510; cn 780 tn 4 sn 18) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1e: wdintr: read intr arrived early reading fsbn 79 of 64-79 (wd1s1 bn 786511; cn 780 tn 4 sn 19) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 64 of 64-79 (wd1s1 bn 1048640; cn 1040 tn 5 sn 5) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 65 of 64-79 (wd1s1 bn 1048641; cn 1040 tn 5 sn 6) (status 0 error 0)
Feb 16 17:25:22 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 66 of 64-79 (wd1s1 bn 1048642; cn 1040 tn 5 sn 7) (status 0 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 67 of 64-79 (wd1s1 bn 1048643; cn 1040 tn 5 sn 8) (status 0 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 68 of 64-79 (wd1s1 bn 1048644; cn 1040 tn 5 sn 9) (status 0 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 69 of 64-79 (wd1s1 bn 1048645; cn 1040 tn 5 sn 10) (status 18 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 71 of 64-79 (wd1s1 bn 1048647; cn 1040 tn 5 sn 12) (status 0 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 72 of 64-79 (wd1s1 bn 1048648; cn 1040 tn 5 sn 13) (status 0 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 73 of 64-79 (wd1s1 bn 1048649; cn 1040 tn 5 sn 14) (status 8 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 76 of 64-79 (wd1s1 bn 1048652; cn 1040 tn 5 sn 17) (status 0 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 77 of 64-79 (wd1s1 bn 1048653; cn 1040 tn 5 sn 18) (status 0 error 0)
Feb 16 17:25:23 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 78 of 64-79 (wd1s1 bn 1048654; cn 1040 tn 5 sn 19) (status 0 error 0)
Feb 16 17:28:15 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 2064 of 2064-2065 (wd1s1 bn 1050640; cn 1042 tn 4 sn 52) (status 0 error0)
Feb 16 17:28:15 polymer3 /kernel: wd1s1f: wdintr: read intr arrived early reading fsbn 2065 of 2064-2065 (wd1s1 bn 1050641; cn 1042 tn 4 sn 53) (status 0 error0)
Feb 16 17:29:38 polymer3 /kernel: wd1: wdintr: read intr arrived early reading fsbn 0 (status 0 error 0)
Feb 16 17:29:38 polymer3 /kernel: wd1: wdintr: read error detected late reading fsbn 0 (status 0 error 0)
Feb 16 17:29:38 polymer3 /kernel: wd1c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:29:48 polymer3 /kernel: wd1: cannot find label (no disk label)
Feb 16 17:29:48 polymer3 /kernel: wd1s1: cannot find label (no disk label)
Feb 16 17:29:48 polymer3 /kernel: wd1s2c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:29:48 polymer3 /kernel: wd1s2: cannot find label (no disk label)
Feb 16 17:29:48 polymer3 /kernel: wd1s3c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:29:48 polymer3 /kernel: wd1s3: cannot find label (no disk label)
Feb 16 17:29:48 polymer3 /kernel: wd1s4c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:29:48 polymer3 /kernel: wd1s4c: wdintr: read error detected late reading fsbn 1 (status 0 error 0)
Feb 16 17:29:48 polymer3 /kernel: wd1s4c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:29:48 polymer3 /kernel: wd1s4: cannot find label (no disk label)
Feb 16 17:30:05 polymer3 /kernel: wd1: wdintr: read intr arrived early reading fsbn 0 (status 0 error 0)
Feb 16 17:31:28 polymer3 /kernel: wd1: wdintr: read intr arrived early reading fsbn 0 (status 0 error 0)
Feb 16 17:31:28 polymer3 /kernel: wd1c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:31:28 polymer3 /kernel: wd1c: wdintr: read error detected late reading fsbn 1 (status 0 error 0)
Feb 16 17:31:52 polymer3 /kernel: wd1: wdintr: read intr arrived early reading fsbn 0 (status 0 error 0)
Feb 16 17:31:52 polymer3 /kernel: wd1: wdintr: read error detected late reading fsbn 0 (status 10 error 0)
Feb 16 17:31:52 polymer3 /kernel: wd1: wdintr: read intr arrived early reading fsbn 0 (status 0 error 0)
Feb 16 17:31:52 polymer3 /kernel: wd1c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:32:19 polymer3 /kernel: wd1: wdintr: read intr arrived early reading fsbn 0 (status 50 error 0)
Feb 16 17:32:19 polymer3 /kernel: wd1: wdintr: read error detected late reading fsbn 0 (status 0 error 0)
Feb 16 17:32:19 polymer3 /kernel: wd1: wdintr: read intr arrived early reading fsbn 0 (status 0 error 0)
Feb 16 17:32:29 polymer3 /kernel: wd1c: wdintr: read intr arrived early reading fsbn 1 (status 50 error 0)
Feb 16 17:32:29 polymer3 /kernel: wd1c: wdintr: read error detected late reading fsbn 1 (status 0 error 0)
Feb 16 17:32:29 polymer3 /kernel: wd1c: wdintr: read intr arrived early reading fsbn 1 (status 8 error 0)
Feb 16 17:32:40 polymer3 /kernel: wd1c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:32:40 polymer3 /kernel: wd1c: wdintr: read error detected late reading fsbn 1 (status 0 error 0)
Feb 16 17:32:40 polymer3 /kernel: wd1c: wdintr: read intr arrived early reading fsbn 1 (status 0 error 0)
Feb 16 17:35:45 polymer3 /kernel: acd0: read_toc failed
Feb 16 17:35:45 polymer3 /kernel: acd0: read_toc failed
Feb 16 17:35:45 polymer3 amd[200]: /rmv/cdrom: mount (amfs_auto_cont): Operation not permitted
wd1って、HDDのはず。あれっっっ???
仕方ない、再起動... なんか遅いから、もう一度 reboot ... んっ!? bootableなメディアがない!?

ってなわけで、お亡くなりになりました。

その後、しばらく抵抗を試みました。
もともと wd1 にあった FreeBSD 4.2R を起動しようとしても、boot0 でこけます。
そのうち、BIOSが返すディスク容量が少なくなりました。8GBまでは認識できたはずなのに。
BIOSを更新してもだめ。かと思ったら、突然元通りになったり...
BIOSからメモリチェックをすると、あるSIMMだけエラーになります。
で、それをはずして再度...でもやっぱりだめ。
wd1 と acd0 を誤認識したことなどから、オンボードのIDEコントローラが壊れたのでしょう。
SIMMの故障がその原因か結果か関係ないかは、全くわかりません。

メーカ製のPCなので、独自のM/Bとケースで、しかもいまや Socket7 & ISA のM/Bも売っていないので、 ほぼ全面買い替えとなりました。K6-2 400MHzで当分使えると思ってたのに...

さて、買い換える決心はついたものの、問題は、もとの環境を如何に取り戻すかです。
実は、壊れたPCでつかっていた HDD は、wd0, wd1 とも、そのままでは有効なパーティションとは 認識されなくなりました。スライスすら認識されません。 ほとんどバックアップを取っていなかったため、各種サーバの設定、自分自身のデータファイルなど、 なんとも絶望的です。
FreeBSD-users MLで質問したところ、下川さんのrecover-disklabel や、portsにもなっている gpart を教えていただきましたが、新しい環境下で試したところ、 どうもうまく認識されませんでした。
結局、ほぼ同じ型のPCが研究室にあるので、それに HDD を繋ぎ換え、最初にインストールした 3.3R の インストールFD で起動して、記憶していた大きさでスライスとパーティションを作成しました。 すると、最初のスライスのパーティションだけは、すべて無事に復活しました。
2-3番目のスライスは、一時的な作業ディレクトリや、Windows用のシェアウェアなどのファイル置き場に していたのですが、このあたりは、何度かパーティションを切りなおしたりした事があったためか、 復活できませんでした。作業ディレクトリは、なくてもあまり影響がなく、また、ファイル置き場に していた分は、4箇月ほど前に別のディスクからコピーして使い始めたので、その時点での 状態で別のディスクに残っていました。4番目のスライスも復活できませんでしたが、 実験データだったので、既にバックアップを取ってありました。
ということで、何とか復活を遂げました。とくに、FreeBSD-users MLの皆さん、 ありがとうございました。
なお、壊れた状態で gpart を使って MBR をみたところ、1バイトごとに 0xff に 書き換わっていました。詳しいことは理解していないので、自力での復旧はできないのでした。
なお、こういうときのためには、普段からバックアップを取ることと、 disk の構成を変えたときにはその構成を正しく理解して記録しておくことが必要だと痛感しました。[2001.03.03]

Gateway Communications G/Ethernet 16 Combo
Gateway Communications の G/Ethernet 16 Combo カードは、fe で認識できますが、 誰も使っていないようです。何年か前に、/usr/src/sys/i386/isa/if_fe.c に カード名だけがあって実際には使えなかったのを、使えるように修正してもらいました。
その時点では誰も使っておらず、また、Windows95にもドライバが供給されていなかったはずです。
実際には、Windows95で使えなかったのでFreeBSDに持ってきたのですが...[2001.01.09]


GO PREV.つるたにの自己紹介へ戻る
GO PREV.つるたにのホームページへ戻る
turutani@scphys.kyoto-u.ac.jp