Linux Kernel 2.6 移行
1.module-init

module-init-tools-0.9.15-pre4

./configure --prefix=/

make moveold

make

make install

./generate-modprobe.conf /etc/modprobe.conf

depmod 2.6


2.kernel

linux-2.6.1.tar.bz2

bzcat linux-2.6.1.tar.bz2 | tar xvf -

make bzImage;make modules;make modules_install

/etc/fstabに以下を追加

none /sys sysfs defaults 0 0

以下のディレクトリを追加

/sys

/etc/rc.sysinitに以下の部分を追加

# Mount /proc (done here so volume labels can work with fsck)
action $"Mounting proc filesystem: " mount -n -t proc /proc /proc

上の部分の下に以下を追加(と書いたが、エラーが出るのでいらんかもしれん)

action $"Mounting sys filesystem: " mount -n -t sysfs /sys /sys

/etc/init.d/haltの以下の部分は書き換え(awk '$2 ~ /^\/$|^\/proc|^\/dev/{next}の
部分が違う)

halt_get_remaining() {
awk '$2 ~ /^\/$|^\/proc|^\/dev/{next}
$3 == "tmpfs" || $3 == "proc" {print $2 ; next}
/(^#|loopfs|autofs|devfs|^none|^\/dev\/root)/ {next}
{print $2}' /proc/mounts
}

本当はUSB部分もいじるが、使わないのでやらない。


3.sound

事前に、kernelの設定で以下の設定を有効にする必要がある。

Device Drivers --->
Sound --->
<M> Sound card support

alsa-driver-1.0.2c.tar.bz2
alsa-lib-1.0.2.tar.bz2
alsa-utils-1.0.2.tar.bz2

他にもあるが必要な人はどうぞ。

alsa-driver-1.0.2c.tar.bz2

configure --with-cards=maestro3(ここは自分のカードで)

make ; make install

./snddevices

alsa-lib-1.0.2.tar.bz2

configure ; make ; make install

alsa-utils-1.0.2.tar.bz2

configure ; make ; make install

alsaconf

でモジュールを選ぶ

alsamixer

で音量を調節する。初期はミュート状態なので。

でモジュールの設定をするが、多分なんかしないとモジュールが覚えないので
/etc/rc.d/rc3.d/S99localの中に必要なモジュールは読み込むようにした。

これは本来の方法ではないと思う。

echo "local settings:"

modprobe 3c59x

/usr/local/sbin/dhcpcd

echo "local modules:"

/sbin/modprobe snd_maestro3
/sbin/modprobe snd_pcm_oss

なんでsnd_pcm_ossがいるかというと後のVMwareの音を出すのに必要だからである。


4.vmware

vmware-config.pl中の

/proc/ksymsを/proc/kallsymsに変更する。

vmware-config.plを実行。以下を読めばわかるだろう。

[root@localhost root]# vmware-config.pl
Making sure VMware Workstation's services are stopped.

Stopping VMware services:
Virtual machine monitor [ OK ]
Bridged networking on /dev/vmnet0 [ OK ]
DHCP server on /dev/vmnet8 [ OK ]
NAT service on /dev/vmnet8 [ OK ]
Host-only networking on /dev/vmnet8 [ OK ]
Virtual ethernet [ OK ]

Trying to find a suitable vmmon module for your running kernel.

None of VMware Workstation's pre-built vmmon modules is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes] yes

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

As of September 2003, the Linux kernel development team does not support gcc
version 3 and later. See Documentation/Changes in your kernel source directory
for information on installing the correct compiler. Do you want to use the
version "3.3.2" of compiler "/usr/bin/gcc"? [no] yes

What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: 入ります ディレクトリ `/tmp/vmware-config21/vmmon-only'
make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: 入ります ディレクトリ `/usr/src/linux-2.6.2'
*** Warning: Overriding SUBDIRS on the command line can cause
*** inconsistencies
make[2]: `arch/i386/kernel/asm-offsets.s' は更新済です
CC [M] /tmp/vmware-config21/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-config21/vmmon-only/linux/hostif.o
CC [M] /tmp/vmware-config21/vmmon-only/common/vmx86.o
CC [M] /tmp/vmware-config21/vmmon-only/common/memtrack.o
CC [M] /tmp/vmware-config21/vmmon-only/common/phystrack.o
CC [M] /tmp/vmware-config21/vmmon-only/common/cpuid.o
CC [M] /tmp/vmware-config21/vmmon-only/common/task.o
LD [M] /tmp/vmware-config21/vmmon-only/vmmon.o
Building modules, stage 2.
MODPOST
CC /tmp/vmware-config21/vmmon-only/vmmon.mod.o
LD [M] /tmp/vmware-config21/vmmon-only/vmmon.ko
make[1]: 出ます ディレクトリ `/usr/src/linux-2.6.2'
cp -f vmmon.ko ./../vmmon.o
make: 出ます ディレクトリ `/tmp/vmware-config21/vmmon-only'
The module loads perfectly in the running kernel.

Extracting the sources of the vmnet module.

Building the vmnet module.

Using 2.6.x kernel build system.
make: 入ります ディレクトリ `/tmp/vmware-config21/vmnet-only'
make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: 入ります ディレクトリ `/usr/src/linux-2.6.2'
*** Warning: Overriding SUBDIRS on the command line can cause
*** inconsistencies
make[2]: `arch/i386/kernel/asm-offsets.s' は更新済です
CC [M] /tmp/vmware-config21/vmnet-only/driver.o
CC [M] /tmp/vmware-config21/vmnet-only/hub.o
CC [M] /tmp/vmware-config21/vmnet-only/userif.o
CC [M] /tmp/vmware-config21/vmnet-only/netif.o
CC [M] /tmp/vmware-config21/vmnet-only/bridge.o
CC [M] /tmp/vmware-config21/vmnet-only/procfs.o
LD [M] /tmp/vmware-config21/vmnet-only/vmnet.o
Building modules, stage 2.
/usr/src/linux-2.6.2/scripts/Makefile.modpost:17: *** Uh-oh, you have stale module e
ntries. You messed with SUBDIRS,
/usr/src/linux-2.6.2/scripts/Makefile.modpost:18: do not complain if something goes
wrong.
MODPOST
CC /tmp/vmware-config21/vmnet-only/vmnet.mod.o
LD [M] /tmp/vmware-config21/vmnet-only/vmnet.ko
make[1]: 出ます ディレクトリ `/usr/src/linux-2.6.2'
cp -f vmnet.ko ./../vmnet.o
make: 出ます ディレクトリ `/tmp/vmware-config21/vmnet-only'
The module loads perfectly in the running kernel.

You have already setup networking.

Would you like to skip networking setup and keep your old settings as they are?
(yes/no) [no]

Do you want networking for your virtual machines? (yes/no/help) [yes]

Would you prefer to modify your existing networking configuration using the
wizard or the editor? (wizard/editor/help) [editor]

The following virtual networks have been defined:

. vmnet0 is bridged to eth0
. vmnet8 is a NAT network on private subnet 192.168.230.0.

Do you wish to make any changes to the current virtual networks settings?
(yes/no) [no]

Do you want this program to automatically configure your system to allow your
virtual machines to access the host's filesystem? (yes/no/help) [no]

Starting VMware services:
Virtual machine monitor [ OK ]
Virtual ethernet [ OK ]
Bridged networking on /dev/vmnet0 [ OK ]
Host-only networking on /dev/vmnet8 (background) [ OK ]
NAT service on /dev/vmnet8 [ OK ]

The configuration of VMware Workstation 4.5.0 build-7174 for Linux for this
running kernel completed successfully.

You can now run VMware Workstation by invoking the following command:
"/usr/bin/vmware".

Enjoy,

--the VMware team

[root@localhost root]#


5.pcmcia

pcmciaを入れる前にkernelの設定でpcmciaが使えるようにする。

pcmciaのドライバの有効化

Device Drivers --->
Networking support --->
PCMCIA network device support --->
[*] PCMCIA network device support
<M> 3Com 3c589 PCMCIA support
<M> 3Com 3c574 PCMCIA support
<M> Fujitsu FMV-J18x PCMCIA support
<M> NE2000 compatible PCMCIA support
<M> New Media PCMCIA support
<M> SMC 91Cxx PCMCIA support
<M> Xircom 16-bit PCMCIA support
<M> Asix AX88190 PCMCIA support

cardドライバの有効化

Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
PCMCIA/CardBus support --->
<M> PCMCIA/CardBus support
<M> CardBus yenta-compatible bridge support

でkernelをビルドして入れ替える

pcmcia-csを落としてくる。

pcmcia-cs-3.2.7.tar.gz

make config

make all

インストール時に/etc/rc.d/rc.pcmciaがコピーされて来るので/etc/rc.d/rc3.dでもコピーしておけばよい。