Users who wish to (or must) build a custom kernel are encouraged to download
the package kernel-package_VVV_all.deb
(it is stored in section
misc
at the Debian FTP archives). This package contains
the script to build the kernel package, and provides the capability to
create a Debian kernel-image package just by running the command
make-kpkg kernel_image
in the top-level kernel source directory.
Help is available by executing the command make-kpkg --help
,
and through the manual page for make-kpkg(8).
Users must separately download the source code for the most recent kernel (or the kernel of their choice) from their favorite Linux archive site.
To build a custom kernel, users must have these packages installed:
gcc
,
libc5-dev
,
bin86
,
binutils
,
gawk
,
make
,
gzip
,
and grep
.
Executing the command dpkg --install kernel-package_VVV_all.deb
sets up the directory /usr/src/linux-VVV/
, and
sets up the link /usr/src/linux
to point to the
directory /usr/src/linux-VVV/
containing the kernel sources.
Detailed instructions for using the package are given in the file
/usr/doc/kernel-package/README
. Briefly, one should:
cd
to the newly created
directory.make config
(for a tty one-line-at-a-time-interface).make menuconfig
(for an ncurses-based menu driven interface).
Note that to use this option, the ncurses3.0-dev
package
must be installed.make xconfig
(for an X11 interface).
Using this option requires that relevant X packages be installed..config
in the top-level
kernel source directory.make-kpkg -r Custom.N kernel_image
, where
N is a revision number assigned by the user.
The new Debian archive thus formed would have revision Custom.1, e.g.,
kernel-image-2.0.27-Custom.1.deb
for the Linux kernel 2.0.27.
Run dpkg --install /usr/src/kernel-image_VVV-Custom.N.deb
to install the kernel itself. The installation script will:
loadlin
), copy
this image to other locations (e.g., an MS-DOS
partition).
This task is greatly aided by the Debian package
boot-floppies_VVV-RRR.deb
, normally found in the
binary/devel section of the Debian FTP archive. Shell scripts in this package
produce boot floppies in the SYSLINUX
format. These are
MS-DOS
formatted floppies whose master boot records have been
altered so that they boot Linux directly (or whatever other operating system
has been defined in the syslinux.cfg file on the floppy).
Other shell scripts in this package produce emergency root disks and
can even reproduce the base disks.
When the boot-floppies package is installed, it produces files which reside
in /usr/src/boot-floppies/
, including the three
scripts, called bootdisk.sh
, rootdisk.sh
, and
basedisk.sh
. Users of these scripts are encouraged to read
them and customize as appropriate. In particular, one should
include the kernel of your choice when invoking the bootdisk.sh
script. Be aware that this kernel cannot be used to load the root disk
into a RAMDISK unless it was compiled with CONFIG_RAMDISK=y
, and
CONFIG_INITRD=y
.
To write the kernel-image-2.0.27 package to the 1.44 MByte disk in drive A: run this command:
./bootdisk.sh /usr/src/kernel-image-2.0.27_1.00.deb /dev/fd0 1440
Be sure to include the editor and whatever other tools you prefer
when building your custom root disk with ./rootdisk.sh
.
Some people found that the boot and root disks make good emergency floppies.
Debian's modconf
package provides a shell script
(/usr/sbin/modconf
) which can be used to customize the
configuration of modules. This script presents a menu-based interface,
prompting the user for particulars on the loadable device drivers
in his system. The responses are used to customize the file
/etc/conf.modules
(which lists aliases, and other arguments that
must be used in conjunction with various modules),
and /etc/modules
(which lists the modules that must be loaded
at boot time).
Like the (new) Configure.help files that are now available to support
the construction of custom kernels, the modconf package comes with a
series of help files (in /usr/lib/modules_help/
)
which provide detailed information on appropriate arguments for each of
the modules.
Yes. The kernel-image-NNN.prerm
script checks to see whether the
kernel you are currently running is the same as the kernel you are trying
to de-install. Therefore you can remove unwanted kernel image packages using
this command:
dpkg --purge --force-remove-essential kernel-image-NNN