戻る

前へ| 次へ

置き換え その7

置き換え用 FLORA 350

カーネル再構築の 準備

簡単に済ませましょう

sv:/var/log# mount /dev/hda10 /mnt/
sv:/var/log# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda7             20315812   3211188  16055984  17% /
/dev/hda8             20641788   1090668  18502480   6% /var/data
/dev/hda10            20641788   2576652  17016496  14% /mnt

.config の コピーです。

sv:/var/log# cd /mnt/usr/src/linux-2.4.31/
# ls -al | grep config
-rw-r--r--    1 root     root        27202 May 31  2008 .config
-rw-r--r--    1 root     root        27026 May 31  2008 .config.old
-rw-r--r--    1 root     root        34434 Aug 13  2005 config.SMP
-rw-r--r--    1 root     root        34449 Aug 15  2005 myconfig
-rw-r--r--    1 root     root        27026 May 29  2008 try.config
# mv .config 20080531_flora-370.config
sv:/mnt/usr/src/linux-2.4.31# cp /usr/src/linux-2.4.31/.config .config
sv:/mnt/usr/src/linux-2.4.31# cd

chroot で カーネル再構築

sv:~# chroot /mnt/ bash
sv:/# cd /usr/src/linux-2.4.31/
# ls
20080531_flora-370.config  README          crypto/   kernel/   try.config
COPYING                    REPORTING-BUGS  drivers/  lib/      vmlinux*
CREDITS                    Rules.make      fs/       mm/
Documentation/             System.map      include/  myconfig
MAINTAINERS                arch/           init/     net/
Makefile                   config.SMP      ipc/      scripts/
# make menuconfig
sv:/usr/src/linux-2.4.31# rdev
/dev/hda10 /
sv:/usr/src/linux-2.4.31# make dep && make clean && make bzImage
...
tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
Root device is (3, 10)
Boot sector 512 bytes.
Setup is 4766 bytes.
System is 930 kB
make[1]: Leaving directory `/usr/src/linux-2.4.31/arch/i386/boot'
sv:/usr/src/linux-2.4.31# cd /lib/modules/
sv:/lib/modules# mv 2.4.31-plamo/ 20080531_flora-370_2.4.31-plamo/
sv:/lib/modules# cd -
/usr/src/linux-2.4.31
sv:/usr/src/linux-2.4.31# make modules && make modules_install
...
make[1]: Entering directory `/usr/src/linux-2.4.31/arch/i386/lib'
make[1]: Nothing to be done for `modules_install'.
make[1]: Leaving directory `/usr/src/linux-2.4.31/arch/i386/lib'
cd /lib/modules/2.4.31-plamo; \
mkdir -p pcmcia; \
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

参考までに

Root device is (3, 10) ;;; IDE hda10

# less /usr/src/linux-2.4.31/Documentation/devices.txt 
...
  3 char    
...
    block       First MFM, RLL and IDE hard disk/CD-ROM interface
                  0 = /dev/hda          Master: whole disk (or CD-ROM)
                 64 = /dev/hdb          Slave: whole disk (or CD-ROM)

                For partitions, add to the whole disk device number:
                  0 = /dev/hd?          Whole disk
                  1 = /dev/hd?1         First partition
                  2 = /dev/hd?2         Second partition
...

vmlinuz 等の 入れ換え

sv:/usr/src/linux-2.4.31# cd /
sv:/# mv vmlinuz-2.4.31 20080531_flora-370-vmlinuz-2.4.31 
sv:/# cp /usr/src/linux-2.4.31/arch/i386/boot/bzImage vmlinuz-2.4.31
sv:/# cd /boot/
sv:/boot# mv System.map-2.4.31 20080531_flora370-System.map-2.4.31
sv:/boot# cp /usr/src/linux-2.4.31/System.map System.map-2.4.31
sv:/boot# ls /lib/modules/
2.4.31-plamo/           20080525_2.4.31-plamo/            org_2.4.31-plamo/
20070824_2.4.31-plamo/  20080531_flora-370_2.4.31-plamo/
sv:/boot# exit
exit

まあ もうあと少しで という所です。

にゃんたろう 拝!

2010年 5月24日 (月) 21:07:20 JST 作成


前へ| 次へ

戻る

Copyright © 2006.-2010. nyantarou All Rights Reserved.