kernel の 再構築を 行います 今回の 目的は ”shutdown -h now ”で 電源 切断 するように して eth1 の ”eepro100”をkernel に 取り込む、scsi の kernel に 取り込む が 主な点です。できたら usb 関連も 削除しておきましょ う ということです、主な点は 3点です。
ほたら 開始です 一連の 操作は 以下の 様に 行って います、これは正解で は 有りません 特に バージョンの 管理を 行っていないので にゃんたろう 方 式 とします。
# cd /usr/src/linux-2.4.31/ /* 移動します */ # make menuconfig /* 色々設定します 設定完了後 */ # make dep && make clean && make bzImage /* bzImage を 作成します */ # cd /lib/modules/ /* 現在の modules を 退避します 削除しても良いが */ # mv 2.4.31-plamo/ first_2.4.31-plamo/ # cd - /* 戻ります */ /usr/src/linux-2.4.31 # make modules && make modules_install /* modules を install します */ # cd / /* 新しいものを 置き換えます 立ち上がる自信が 無ければ 残しておきます */ # mv vmlinuz-2.4.31 first_vmlinuz-2.4.31 # cp /usr/src/linux-2.4.31/arch/i386/boot/bzImage vmlinuz-2.4.31 # cd /boot/ /* System.map も 置き換えます */ # cp /usr/src/linux-2.4.31/System.map . # mv System.map-2.4.31 first_System.map-2.4.31 # mv System.map System.map-2.4.31
これで 一連の作業は 終了ですが、いかんせん にゃんたろうは mbr に loder を 用意していないので boot disk を 用意する 必要が有ります。
install した時に 作成した ものの データーを コピーします ;floppy に 残しておいても 良いですが どうせ 失う事は 今までの 経験から わかってる ので データーとして 残しておきます、オリジナルの bootdisk を 挿入して
# cd # mount /dev/fd0 /mnt/ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sdb5 4959600 1824684 2878920 39% / /dev/fd0 1423 1334 90 94% /mnt # ls -l /mnt/ total 1334 -rwxr-xr-x 1 root root 174 Feb 4 11:52 grub.cfg* -rwxr-xr-x 1 root root 512 Feb 4 11:52 stage1* -rwxr-xr-x 1 root root 111584 Feb 4 11:52 stage2* -rwxr-xr-x 1 root root 1252608 Feb 4 11:52 vmlinuz* # umount /mnt/ # dd if=/dev/fd0 of=org_btdisk bs=1k 1440+0 records in 1440+0 records out
これで データーを 収録しました 次に 今までに 使用していた bootdisk の ”menu.lst”を 変更します。
# mount /dev/fd0 /mnt/ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sdb5 4959600 1826128 2877476 39% / /dev/fd0 1423 118 1306 9% /mnt # cp /mnt/boot/grub/menu.lst . # vi menu.lst # cd /mnt/boot/grub/ # mv menu.lst 002_menu.lst_20060204 # mv /root/menu.lst . # cd # umount /mnt/
これで 新しい kernel で 立ち上げる boot disk を 完了した事に なります 後は、この ”boot disk”を 挿入した後
# shutdown -r now
で 再起動出来れば 完了です。
eepro 100 に ついては 2箇所 該当する所が有ります
# make menuconfig Network device support Ethernet (10 or 100Mbit) < > EtherExpressPro/100 support (eepro100, original Becker driver < > EtherExpressPro/100 support (e100, Alternate Intel driver)
lspci で 見る限 判断がつきません
# lspci 00:0d.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 08)
色々と 検索してみると どうも こちらを 選んだ方が 良いようである、汎用 か インテル専用か 詳しくは 検索してみて下さい にゃんたろう は こちらを採 用します。
< > EtherExpressPro/100 support (e100, Alternate Intel driver)
これも 悩ましいものです にゃんたろうの SCSI は I/O DATA SC-UPCI のも のです。
これに たいして まず lspci の 内容は
# lspci 00:0e.0 SCSI storage controller: LSI Logic / Symbios Logic 53c875 (rev 04)
と なっており make menuconfig では
SCSI support SCSI low-level drivers <*> NCR53c7,8xx SCSI support [*] always negotiate synchronous transfers [*] allow FAST-SCSI [10MHz] [*] allow DISCONNECT <*> SYM53C8XX Version 2 SCSI support (1) DMA addressing mode (16) default tagged command queue depth (64) maximum number of queued commands
この場合はどうすると 良いのであろうか まず 両方選択したもので 作成すると 何か まずいようである。 SCSI: I/O DATA SC-UPCI (ncr53c875) に 関して
http://oss.sgi.com/projects/xfs/mail_archive/200203/msg00137.html
...
The SYM driver is the successor of the NCR driver. Unless your SCSI host is
"old" (which I don't assume because you have a 53C875) you should use the latter
of the above two.
>SYM53C8XXX Version 2 Scsi support
This driver is brand-new and supposed to be the successor to the SYM53C8xx
driver, so I guess this is the best choice of all the above drivers.
SYM53C8XX Version 2 SCSI support こちらだけを 採用してみよう
SCSI low-level drivers < > NCR53c7,8xx SCSI support <*> SYM53C8XX Version 2 SCSI support
Mac さんと お友達に なる予定ですので
Networking options Networking optionsAppletalk protocol support 
を 追加しておこう
shutdown -h で 電源斷は
General setup <*> Advanced Power Management BIOS support [*] Ignore USER SUSPEND [*] Enable PM at boot time [*] Make CPU Idle calls when idle [*] Enable console blanking using APM [ ] RTC stores time in GMT [*] Allow interrupts during APM BIOS calls [*] Use real mode APM BIOS call to power off ACPI Support [ ] ACPI Support
これで 試行 一連の 選定後 この後 中間の 処理は 上記の 様に 綺麗に 最 初から いった理由では 有りません 今まであまり 認識してなかったので 今回 調査を 兼ねて 行ったものです したがって 立ち上がらなかったり エラーが 出 たり しました。まず 見てゆきましょう
# make dep && make clean && make bzImage
Root device is (8, 21)
Boot sector 512 bytes.
Setup is 4767 bytes.
System is 953 kB   /*   bzImage の 作成は成功してるようです  */
make[1]: Leaving directory `/usr/src/linux-2.4.31/arch/i386/boot'
# cd /lib/modules/
# rm -r bk_2.4.31-plamo/
# mv 2.4.31-plamo/ bk_2.4.31-plamo/
# cd -
/usr/src/linux-2.4.31
# make modules && make modules_install
find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.4.31-plamo; fi
# ls -l /lib/modules/
total 12
drwxr-xr-x    4 root     root         4096 Feb  5 16:24 2.4.31-plamo/
drwxr-xr-x    4 root     root         4096 Feb  5 15:35 bk_2.4.31-plamo/
drwxr-xr-x    5 root     root         4096 Feb  4 18:54 first_2.4.31-plamo/
# cd /  /*   modules の 作成は成功してるようです  */
# cp /usr/src/linux-2.4.31/arch/i386/boot/bzImage vmlinuz-2.4.31 
# ls -l vmlinuz-2.4.31 /* 最初のもの 退避してあるので 其ままコピー  */
-rw-r--r--    1 root     root       982112 Feb  5 16:27 vmlinuz-2.4.31
# cd /boot/
# cp /usr/src/linux-2.4.31/System.map System.map-2.4.31
# ls -l System.map-2.4.31 /* 最初のもの 退避してあるので 其ままコピー  */
-rw-r--r--    1 root     root       503580 Feb  5 16:28 System.map-2.4.31
# shutdown -r now
要するに 最初の vmlinuz-2.4.31 と System.map-2.4.31 は 退避してあるの で 置き換えは 省略して 何回か 試行錯誤したということです。整理しておきま しょう
# cd /usr/src/linux-2.4.31/ # cp .config first.config 0001plamo.html # cd / # cp vmlinuz-2.4.31 first_vmlinuz-2.4.31 # cd /boot/ # cp System.map-2.4.31 first_System.map-2.4.31 # cd /lib/modules/ # rm -r bk_2.4.31-plamo/ # rm -r first_2.4.31-plamo/ # ls -al total 12 drwxr-xr-x 3 root root 4096 Feb 5 17:07 ./ drwxr-xr-x 4 root root 4096 Feb 4 20:47 ../ drwxr-xr-x 4 root root 4096 Feb 5 16:24 2.4.31-plamo/ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sdb5 4959600 1785636 2917968 38% / # pwd /usr/src/linux-2.4.31 # cp /boot/config-2.4.31 . # diff -s myconfig config-2.4.31 Files myconfig and config-2.4.31 are identical # diff -s config-2.4.31 myconfig.old_org Files config-2.4.31 and myconfig.old_org are identical # rm config-2.4.31 # rm myconfig.old_org # diff -s .config myconfig | wc -l 1147 # diff -s .config first.config Files .config and first.config are identical # mv first.config 0001_first.config # diff -s .config 0001_first.config Files .config and 0001_first.config are identical # cd / # mv first_vmlinuz-2.4.31 0001_first_vmlinuz-2.4.31 # cd /boot/ # mv first_System.map-2.4.31 0001_first_System.map-2.4.31
一連の 見苦しい 操作の 内訳です
module 関連は そのまま backup は しないものとする。
kernel 再構築で 主な留意点を 再度 示す。
上記の 様に 差分を とると 項目が おおよそ 1100 個 あまりも あるので
基本的に usb hot plug 関連は 削除 した、いうことで 済ます
shutdown -h now で 電源を 切れるように した
scsi は 1種類 とし kernel に 組み込んだ
eepro 100 に対しては 1種類 とし kernel に 組み込んだ
が 主な内容である  apple talk に 関しては module に した つもり
では あるが 詳細は  netatalk 導入時 再確認 必要 後 bsd 領域の
mount が できるか どうか 見ておきたい それは netatalk 導入時に
kernel 再構築が 必要ならば 同時に 行いたい
今回 plamo 3.3 から plamo 4.03 に 入れ換えるだけで 簡単に 移行できると
思っていたが 予期せぬ 手間取って しまったので 再確認も かねて
残しておきたい ということです。
# cd /usr/src/linux-2.4.31/
# cp .config 0001.config
# make menuconfig
Main Menu
Code maturity level options
[ ] Prompt for development and/or incomplete code/drivers
Processor type and feature
(Pentium-III/Celeron(Coppermine)) Processor family  
/* shutdown -h now で 電源切断(斷)       */
General setup
[*] Power Management support                                   
          <*>   Advanced Power Management BIOS support                   
          [*]     Ignore USER SUSPEND                                    
          [*]     Enable PM at boot time                                 
          [*]     Make CPU Idle calls when idle                          
          [*]     Enable console blanking using APM                      
          [ ]     RTC stores time in GMT                                 
          [*]     Allow interrupts during APM BIOS calls    
ACPI Support
[ ] ACPI Support 
/* shutdown -h now で 電源切断(斷)       */
Memory Technology Devices (MTD)
< > Memory Technology Device (MTD) support
Plug and Play configuration
< > Plug and Play support
Multi-device support (RAID and LVM)
[ ] Multiple devices driver support (RAID and LVM)
/* netatalk 導入時 再検討  */
Networking options
 Appletalk protocol support
Appletalk devices
[ ] Appletalk interfaces support
/* netatalk 導入時 再検討  */
Telephony Support
< > Linux telephony support
IDE, ATA and ATAPI Block devices
<*>     Intel PIIXn chipsets support
/*   NCR53c7,8xx SCSI support  のみの 場合 立ち上がらない  */
SCSI low-level drivers
< > NCR53c7,8xx SCSI support                                               
  <*> SYM53C8XX Version 2 SCSI support                                       
  (1)   DMA addressing mode                                                  
  (16)   default tagged command queue depth                                  
  (64)   maximum number of queued commands                                   
  [*]   use normal IO  
/*   NCR53c7,8xx SCSI support  のみの 場合 立ち上がらない  */
Fusion MPT device support
< > Fusion MPT (base + ScsiHost) drivers
I2O device support
< > I2O support 
/* eepro 100 の場合 こちらだけて 対応した     */
Ethernet (10 or 100Mbit)
< >     EtherExpressPro/100 support (eepro100, original Becker driver) 
<*>     EtherExpressPro/100 support (e100, Alternate Intel driver)
... 
     RealTek RTL-8139 PCI Fast Ethernet Adapter support
/* eepro 100 の場合 こちらだけて 対応した     */  
以上で 最低限 shutdown -h now にて 電源切断可能
scsi は 1種類 再確認
eepro 100 の 場合も 1種類
各々 kernel に 組み込んで しまった
今回 手間取ったのは あくまで 調整 kernel の 再構築 ということで
kernel 再構築 しない場合は 通常の 方法で インストール できると
いう事です
カーネルの 再構築 完了です。
にゃんたろう 拝!
2006年 2月10日 (金) 21:24:01 JST 作成