カーネルのインストール

The aptosid kernels are in the aptosid repo as a .deb and automatically included in a dist-upgrade.


aptosidのカーネルには次のような種類があります:

Steps to do it manually without dist-upgrading are:

1. コンソールでまずrootになります:

apt-get update

2. 常に最新カーネルをインストールするには:

apt-get install linux-image-aptosid-686 linux-headers-aptosid-686

Reboot to use the new kernel

新しいカーネルで何か問題があったら、再起動の際に以前のカーネルを選ぶことができます。

モジュール

どのモジュールをインストールするかを決めるには次のコマンドを実行するとインストールできるモジュールがすべて表示されます。モジュールのパッケージ名をコマンドラインにペーストして使います:

apt-cache search 2.6.*.slh.*-aptosid| awk '/modules/{print $1}'

各モジュールの説明が見たい場合は次のコマンドをコンソールにペーストして実行します:

apt-cache search 2.6.*.slh.*-aptosid

必要なモジュールをインストールするには(例としてここではvirutualbox-oseとqc-usbのモジュールをインストールします):

apt-get install virtualbox-ose-modules-2.6.24-2.6.24.2.slh.7-aptosid-686 (EXAMPLE)
apt-get install qc-usb-modules-2.6.24-2.6.24.2.slh.7-aptosid-686 (EXAMPLE)

モジュールがカーネルにロードされているのを確認するには:

ls /sys/module/
または
cat /proc/modules

Installing modules with Dynamic Module-Assistant Kernel Module Support (dmakms)

dmakms is useful to install kernel modules that are not premade for the aptosid kernel and is designed to automate the installation of kernel modules with module-assistant (m-a) when upgrading or installing new Linux kernels.

apt-get install dmakms module-assistant

Before activating Dynamic Module-Assistant Kernel Module Support, first use module-assistant to install the desired kernel module(s) for the currently running Linux kernel. For more information on module-assistant please read its manual page:

man m-a

The name of the module-assistant compatible package then needs to be added to /etc/default/dmakms, so that the process of preparing and installing the same module(s) for each new Linux kernel can be automated.

Example: Installing speakup module with module-assistant

Ensure that your sources list has contrib non-free added in your sources line in: /etc/apt/sources.list.d/debian.list

apt-cache search speakup-s
speakup-source - Source of the speakup kernel modules

Then prepare the module:

m-a prepare
m-a a-i speakup-source

Then activate Dynamic Module-Assistant Kernel Module Support for speakup, so that the next time the Linux kernel is updated a speakup module is prepared for it too, without manual intervention. To do that, add speakup-source to the /etc/default/dmakms configuration file.

mcedit /etc/default/dmakms
speakup-source

Repeat the same process for any other module-assistant compatible kernel module package.

A linux-headers package must be installed for every linux-image package for module-assistant to compile kernel modules.

Module load failure

Should the module fail to load, for whatever reason [new xorg component, a fs problem or if X doesnt start after reboot] :

modprobe <module>

Then reboot the computer.

Should the module still fail to load:

 m-a a-i -f module-source

This rebuilds the module then reboot.

How It Works

Dynamic Module-Assistant Kernel Module Support consists of a single initscript (/etc/init.d/dmakms) that is executed at boot time or by a script that is triggered after installation of new linux-image Debian packages.

On each boot, /etc/init.d/dmakms is run to discover if each module source package listed in /etc/default/dmakms has provided a module package for the running Linux kernel, calling module-assistant to build and install a module package as required.

When a new linux-image Debian package is installed, /etc/init.d/dmakms is executed via a postinst hook script with two arguments, 'start' and the 'version string' of the Linux kernel to prepare new module package(s) for. At this time, the module packages listed in the /etc/default/dmakms configuration file are processed with module-assitant, and derived module packages are scheduled for installation at shutdown time. The reason for installation to occur at shutdown time is because it is necessary to delay the installation until such a time that apt/dpkg are not locked by another process.

$ /usr/share/doc/dmakms

古いカーネルの削除

新しいカーネルのインストールに成功したら、古いカーネルは削除してもかまいませんが、新しいカーネルに問題があった場合にはGrubの起動メニューから古いカーネルでも起動できるように、少なくとも数日間は古いカーネルを維持することをお勧めします。

古いカーネルを削除するには kernel-remover というパッケージをインストールして使用します:

apt-get update
apt-get install kernel-remover
Content last revised 15/09/2010 1025 UTCC