/[d-i]/trunk/installer/doc/custom-kernel.txt
ViewVC logotype

Contents of /trunk/installer/doc/custom-kernel.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13606 - (show annotations) (download)
Thu Apr 15 01:01:07 2004 UTC (9 years, 1 month ago) by joeyh
File MIME type: text/plain
File size: 4113 byte(s)
go back to documenting current status
1 Building Debian Installer images with a custom kernel.
2
3 So you want to build a custom version of the Debian Installer? This
4 document assumes basic familiarity with building Debian packages and the
5 linux kernel from source. The techniques described here are aimed mostly at
6 replacing the kernel, which is the most common piece to need to replace,
7 but similar techniques can be used to replace any other udeb used by this
8 modular installer with a custom version.
9
10 If you have questions about this document, mail the Debian Installer team
11 at: <debian-boot@lists.debian.org>.
12
13 Step 1. Kernel deb
14
15 You need to find or produce a kernel deb for the kernel you want to use
16 with d-i. This can be built in the standard Debian way with make-kpkg. The
17 kernel should be built with the following things built in:
18
19 devfs (does not need to automount on boot)
20 initrd support
21 tmpfs
22 ext2
23
24 Most everything else can be modular, and it's a good idea to enable pretty
25 much everything. A good starting place is the kernel config from an
26 existing official Debian kernel.
27
28 Once you have the kernel-image.deb, install it for the next step. On i386,
29 you should also install the kernel-pcmcia-modules file. You do not need to
30 boot into the new kernel.
31
32 Step 2. Kernel udebs
33
34 Unpack the source package linux-kernel-di-i386 (other arches, replace
35 i386 with your arch). In its source tree, edit the kernel-versions file.
36 Each line in this file is a kernel version, you can comment out all but
37 one, and modify that one to match the version of your custom kernel.
38
39 If your custom kernel includes new kernel modules that are not in the
40 standard kernel, you'll need to add them to a list in modules/i386/. See
41 the kernel-wedge documentation for details.
42
43 Make sure the build dependencies of linux-kernel-di-i386 are satisfied
44 (you will need to install the kernel-wedge package), and build the package.
45 This will produce several udebs.
46
47 Step 3. Initrds and images
48
49 Unpack the debian-installer source package. Make sure the many build
50 dependencies are satisfied. Check that build/config/i386.cfg has a
51 KERNELVERSION field that matches the version of your custom kernel (other
52 arches, replace i386 with your arch). Note that this version includes the
53 kernel flavour. For example, if your kernel-image*.udeb produced in the
54 previous step is named kernel-image-2.6.4-1-386-di_0.57_i386.udeb, then
55 set KERNELVERSION to 2.6.4-1-386
56
57 Copy the udebs that were produced in step 2 into the build/localudebs
58 directory. Go to the build directory and type "make list" to see a list
59 of possible targets. For example, if you want to build floppy images, use
60 this command:
61
62 fakeroot make build_floppy_boot build_floppy_root
63
64 If you're looking to build a complete Debian CD, the target to use is
65 "build_cdrom_isolinux" (and see step 4).
66
67 It turns out to be much easier to build a mini CD containing just d-i,
68 which you can do with the "build_monolithic" target. You will need a
69 network connection to install using this image.
70
71 Look in the build/dest directory for the images. The MANIFEST file will
72 list every file you built and its purpose. Note that the
73 build_cdrom_isolinux target does not produce an entire ISO image, but just
74 the initrd to go on one. However, the build_monolithic target does produce
75 a bootable ISO image, and the floppy targets do produce floppy images.
76
77 Step 4. Building a full Debian CD image
78
79 If you have an initrd for a CD, and some kernel udebs, and a kernel deb,
80 you probably want to stick them all on a Debian CD. There are two ways to
81 do this. You can install the debian-cd package and read its documentation.
82 Be warned that using debian-cd is difficult, and requires a local Debian
83 mirror. Or you could try to remaster an existing Debian ISO using the
84 technique described here:
85 http://wiki.debian.net/index.cgi?DebianInstallerModify
86
87 Neither of these routes will be as relatively polished or easy as steps
88 1-3. We recommend that you don't try to build a full Debian CD unless you
89 really absolutely need one, and have plenty of time to set up debian-cd. An
90 alternative is to build a monolithic mini iso (as described in step 3).

  ViewVC Help
Powered by ViewVC 1.1.5