ページ更新: 2006-06-10 (土) (6075日前)
関連: Linux, Linux/Debian (2000年頃に作成) Toshiba Dynabook Satellite 2140 K45/2L8 についてのメモ。 2011-09 に QNAP TS-112 TurboNAS に移行作業中。(PC/QNAP TurboNAS) 当時、リース落ち中古品を自宅用Linuxサーバとして購入、¥68,000- くらいだったと思う。 それなりに省電力 (定常9W、apt-get update時13〜28W) だし、モニタ付き(DSTN 800x600)だし、無停電電原もどき(内蔵バッテリだ)付きだし、 内蔵NICがあるし (PCカードは面倒)、内蔵CD-ROMドライブもあるし (外付けは面倒)、ついでに内蔵FDDもあるし、 てなことで。 Debian GNU/Linux を使用。 デーモンは Apache、DNSリレー (dnrd)、DHCPサーバ、ダイヤルアップルータ (pppd) 、データベースサーバ (PostgreSQL) 、apmd (内蔵パッテリを無停電電源にする)を使用。 できるだけHDDを止めるために、異常時以外はできるだけログを吐かないようにしてある。 (cron と syslogd を調整) (Linux/ハードディスクをなるべく停止する) フレッツADSLのルータとしても使用中。(Linux/PPPoE)
そのうちFAX送受信もこれでやろうかと思っている。FAX受信可能なclass2 PCMCIAモデムの安いやつないかなあ。
目次 [編集]情報源 #Toshiba Dynabook Satellite 2140 K45/2L8 仕様 #
メモ #[編集]crontabの確認 (2006-06-11) #cron # cat /etc/crontab SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 17 * * * * root run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily 47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly 52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly # ls /etc/cron* /etc/crontab /etc/cron.d: /etc/cron.daily: bsdmainutils* find* man-db* netkit-inetd* sysklogd* exim4-base* logrotate* modutils* standard* /etc/cron.hourly: /etc/cron.monthly: standard* /etc/cron.weekly: lpr* man-db* sysklogd* # which run-parts /bin/run-parts # file /bin/run-parts /bin/run-parts: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped # dpkg --search /bin/run-parts debianutils: /bin/run-parts # man run-parts[編集] sysklogd MARK出力抑制, atime更新抑制, hdparm, hddtemp (2006-06-10) #sysklogd (MARK行の出力を抑制。抑制前は60分に1回) # grep MARK /var/log/syslog Jun 10 07:02:20 hostname -- MARK -- Jun 10 08:02:20 hostname -- MARK -- Jun 10 09:02:20 hostname -- MARK -- Jun 10 10:02:20 hostname -- MARK -- Jun 10 11:02:20 hostname -- MARK -- Jun 10 12:02:20 hostname -- MARK -- Jun 10 13:02:20 hostname -- MARK -- Jun 10 14:02:20 hostname -- MARK -- Jun 10 15:02:20 hostname -- MARK -- Jun 10 16:02:20 hostname -- MARK -- Jun 10 17:02:20 hostname -- MARK -- Jun 10 18:02:20 hostname -- MARK -- Jun 10 19:02:20 hostname -- MARK -- Jun 10 20:02:21 hostname -- MARK -- Jun 10 21:02:21 hostname -- MARK -- Jun 10 22:02:21 hostname -- MARK -- Jun 10 23:02:21 hostname -- MARK -- # diff /etc/init.d/sysklogd.org /etc/init.d/sysklogd 14c14 < SYSLOGD="" --- > SYSLOGD="-m 0" # /etc/init.d/sysklogd force-reload fstab (atimeの記録を停止) # diff /etc/fstab.org /etc/fstab 5,6c5,6 < /dev/hda3 / ext3 defaults,errors=remount-ro 0 1 < /dev/hda1 /boot ext3 defaults 0 2 --- > /dev/hda3 / ext3 defaults,noatime,errors=remount-ro 0 1 > /dev/hda1 /boot ext3 defaults,noatime 0 2 # mount / -o remount # mount /boot -o remount # mount /dev/hda3 on / type ext3 (rw,noatime,errors=remount-ro) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/hda1 on /boot type ext3 (rw,noatime) usbfs on /proc/bus/usb type usbfs (rw) hdparm # apt-get install hdparm # dpkg -s hdparm Package: hdparm Status: install ok installed Priority: optional Section: admin Installed-Size: 192 Maintainer: Stephen Gran <sgran@debian.org> Architecture: i386 Version: 6.1-2 Replaces: apmd (<= 3.0.2-1.15) Depends: libc6 (>= 2.3.2.ds1-21) Suggests: apmd Conffiles: /etc/default/hdparm b0293bcc5268cbf350c128d18006f9f4 /etc/init.d/hdparm 80cda0b2a9b854243401fcb59b55db62 /etc/apm/event.d/20hdparm 69c0a826b29c8f40b7ca5e56e53d7f83 /etc/hdparm.conf 96c94083d620351afcd59a03d7196075 Description: tune hard disk parameters for high performance Get/set hard disk parameters for Linux IDE drives. Primary use is for enabling irq-unmasking and IDE multiplemode. # /sbin/hdparm -V hdparm v6.1 # /sbin/hdparm -i /dev/hda /dev/hda: Model=HTS541080G9AT00, FwRev=MB4OA60A, SerialNo=MPB4RAX6KR9TZG Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs } RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4 BuffType=DualPortCache, BuffSize=7539kB, MaxMultSect=16, MultSect=off CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4 DMA modes: mdma0 mdma1 mdma2 UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a: * signifies the current active mode # /sbin/hdparm -I /dev/hda /dev/hda: ATA device, with non-removable media Model Number: HTS541080G9AT00 Serial Number: MPB4RAX6KR9TZG Firmware Revision: MB4OA60A Standards: Used: ATA/ATAPI-6 T13 1410D revision 3a Supported: 6 5 4 3 Configuration: Logical max current cylinders 16383 65535 heads 16 1 sectors/track 63 63 -- CHS current addressable sectors: 4128705 LBA user addressable sectors: 156301488 LBA48 user addressable sectors: 156301488 device size with M = 1024*1024: 76319 MBytes device size with M = 1000*1000: 80026 MBytes (80 GB) Capabilities: LBA, IORDY(can be disabled) bytes avail on r/w long: 4 Queue depth: 1 Standby timer values: spec'd by Vendor, no device specific minimum R/W multiple sector transfer: Max = 16 Current = 0 Advanced power management level: 128 (0x80) Recommended acoustic management value: 128, current value: 254 DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5 Cycle time: min=120ns recommended=120ns PIO: pio0 pio1 pio2 pio3 pio4 Cycle time: no flow control=240ns IORDY flow control=120ns Commands/features: Enabled Supported: * NOP cmd * READ BUFFER cmd * WRITE BUFFER cmd * Host Protected Area feature set * Look-ahead * Write cache * Power Management feature set Security Mode feature set SMART feature set * FLUSH CACHE EXT command * Mandatory FLUSH CACHE command * Device Configuration Overlay feature set * 48-bit Address feature set Automatic Acoustic Management feature set SET MAX security extension Address Offset Reserved Area Boot * SET FEATURES subcommand required to spinup after power up Power-Up In Standby feature set * Advanced Power Management feature set * DOWNLOAD MICROCODE cmd * General Purpose Logging feature set * SMART self-test * SMART error logging Security: Master password revision code = 65534 supported not enabled not locked frozen not expired: security count not supported: enhanced erase 52min for SECURITY ERASE UNIT. HW reset results: CBLID- above Vih Device num = 0 determined by the jumper Checksum: correct hddtemp # apt-get install hddtemp : Suggested packages: ksensors gkrellm-hddtemp : # hddtemp /dev/hda WARNING: Drive /dev/hda doesn't appear in the database of supported drives WARNING: But using a common value, it reports something. WARNING: Note that the temperature shown could be wrong. WARNING: See --help, --debug and --drivebase options. WARNING: And don't forget you can add your drive to hddtemp.db /dev/hda: HTS541080G9AT00: 32 C or F # hddtemp --debug /dev/hda ================= hddtemp 0.3-beta13 ================== Model: HTS541080G9AT00 field(1) = 0 field(2) = 0 field(3) = 2 field(4) = 4 field(5) = 0 field(7) = 0 field(8) = 0 field(9) = 147 field(10) = 0 field(12) = 3 field(191) = 0 field(192) = 1 field(193) = 2 field(194) = 32 ★これじゃないかな? field(196) = 0 field(197) = 0 field(198) = 0 field(199) = 0 If one of the field value seems to match the temperature, be sure to read the hddtemp man page before sending me a report (section REPORT). Thanks. ★/etc/hddtemp.dbに以下の行を追加。裏は取ってない。 "HTS541080G9AT00" 194 C "Hitachi Travelstar 5K100 80GB" # hddtemp /dev/hda /dev/hda: HTS541080G9AT00: 32 C[編集] ハードディスクが故障、交換 (2006-06-04) #IBM IC25N040ATCS04 (40GB, ATA, 4200rpm, 9.5mm) が故障した。使用期間は3年5ヶ月。Linuxからfdisk -lで見つからなくなった。BIOSからも同様。 Hitachi HTS541080G9AT00 (80GB, ATA, 4200rpm, 9.5mm, Travelstar 5K100) を購入し、交換した。 今回バックアップを取ってなかったので、1からDebian GNU/Linux 3.1 (Sarge) を入れ、bind9, dhcp3-server をインストールして設定した。 他には ssh, ng, pdumpfsも。 pdumpfsで/etcをバックアップ。 # apt-get install pdumpfs # dpkg -s pdumpfs Package: pdumpfs Status: install ok installed Priority: optional Section: admin Installed-Size: 160 Maintainer: Takuo KITAME <kitame@debian.org> Architecture: all Version: 1.0-1 Depends: ruby (>= 1.6) Description: a daily backup system similar to Plan9's dumpfs pdumpfs is a simple daily backup system similar to Plan9's dumpfs which preserves every daily snapshot. pdumpfs is written in Ruby. You can access the past snapshots at any time for retrieving a certain day's file. Let's backup your home directory with pdumpfs! # mkdir /var/backups/etc # pdumpfs /etc /var/backups/etc[編集] ハードディスクを交換 (2002-11-17) #ハードディスクを交換。6.4GB → 40GB (IBM IC25N040ATCS04)。交換は楽だけど、中身のLinuxを移すのにちと手間取った。 ルータに使っているノートPC Dynabook Satellite 2140 (Debian GNU/Linux kernel 2.4.18-k6)のハードディスクを交換した。 CUBXに2.5inchアダプタで新旧2台のハードディスクを繋いで、旧からLinuxを立ち上げ、cfdiskして、mkfs -t ext3 して、mkswapして、これでフォーマット完了。 ファイルのコピーは新HDDを/mntにマウントして、cp -a コピーするファイルとディレクトリ /mnt/ で、完了。 すかさず、chroot /mnt して、/etc/lilo.conf を書き換えて、liloを実行。ジオメトリ云々の警告が出る。 次に /etc/fstab を書き換え。 mkboot で再起動FDを作って起動したが、失敗。(2002-11-19追記:debian-users-ml:35339と同様のエラーがでる。mkbootは initrdには対応していないのだろうな、たぶん。syslinkxやliloでinitrd=/boot/initrd.img-2.4.18-k6 で起動できるかも) woodyのresqueディスクで起動して、boot: プロンプトに linux root=/dev/hda3 として起動。module関係の警告が沢山出るが無視して、再度 lilo を実行したところ、起動できるようになった。 これにて完了。 次に、Satelliteから外したHDDをノートPC Biblo NC13D に入れた。こちらは Debian GNU/Linux 3.0 (woody)を再インストールした。 [編集]ブックマーク ext3-fs (2002-03-26) #Linux 共通テーマ アドバンスト・ファイルシステム・インプリメンター・ガイド 第8回 - ラップトップ...要注意?
ブックマーク ドライバ (2001-12-22) #
ハードディスクの換装手順 (2001-10-03) #
によると30GBは使えるようだ。32GB超は使えるのかなあ? [編集]Audio設定 (2001-09-09) #MP3を鳴らすために設定してみる。 /proc/pci によると、 Bus 0, device 12, function 0: Multimedia audio controller: Unknown vendor Unknown device (rev 16). Vendor id=125d. Device id=1978. Medium devsel. Fast back-to-back capable. IRQ 11. Master Capable. Latency=64. Min Gnt=2.Max Lat=24. I/O at 0xfc00 [0xfc01]. 稼動確認リスト:(株)東芝製 PC 対応機種一覧 によると、 サウンドチップは 'Maestro Wave/WaveTable Synthesis Devices' とのこと。 modconf にて 'maestro' モジュールを入れ、mpg321 と setmixer パッケージをインストール。 (2002-11-23:さらに、/etc/groupsのaudioに自分のユーザー名を追加) /proc/interrupts CPU0 0: 15797 XT-PIC timer 1: 2 XT-PIC keyboard 2: 0 XT-PIC cascade 8: 1 XT-PIC rtc 9: 41 XT-PIC eth1 11: 251 XT-PIC ESS Maestro 2E, eth0 13: 1 XT-PIC fpu 14: 40180 XT-PIC ide0 15: 15 XT-PIC ide1 NMI: 0 setmixer vol 50; setmixer pcm 100; setmixer mix 100 などとしてミキサーを設定し、mpg321 [MP3ファイル名] で演奏できた。 途中で、alsa-baseなどのALSA系のパッケージを入れたが、削除。 OSS-Lite / ALSA のどちらで鳴っているのだろうか……。 [編集]16bit/3.3VのPCカードが故障する不具合 (2001-07-17) #東芝、同社製PCで16bit/3.3VのPCカードが故障する不具合 この機種は該当しないようだ。 |