Differences between revisions 8 and 9
Revision 8 as of 2004-06-25 05:17:47
Size: 3311
Editor: anonymous
Comment:
Revision 9 as of 2004-06-25 05:19:40
Size: 3418
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
Get the source of the kernel. You can also fetch it with
# apt-get install kernel-source-x.y.z
Get the source of the kernel. You can also fetch it with{{{
 apt-get install kernel-source-x.y.z
}}}
Line 16: Line 18:
# apt-get install kernel-source-2.4.18 {{{
apt-get install kernel-source-2.4.18
}}}
Line 20: Line 24:
Line 22: Line 27:
# mount -t vfat -o loop rescue.bin /mnt {{{
mount -t vfat -o loop rescue.bin /mnt
}}}
Line 24: Line 32:

config.gz
debian.txt
f10.txt
f1.txt
f2.txt
f3.txt
f4.txt
f5.txt
f6.txt
f7.txt
f8.txt
f9.txt
install.sh
ldlinux.sys
linux.bin
rdev.sh
readme.txt
syslinux.cfg
sys_map.gz
type.txt
{{{
 
config.gz
 debian.txt
 f10.txt
 f1.txt
 f2.txt
 f3.txt
 f4.txt
 f5.txt
 f6.txt
 f7.txt
 f8.txt
 f9.txt
 install.sh
 ldlinux.sys
 linux.bin
 rdev.sh
 readme.txt
 syslinux.cfg
 sys_map.gz
 type.txt
}}}
Line 48: Line 57:
# cp /mnt/config.gz /usr/src/linux/.
# gzip -d config.gz
# cp config.gz .config
{{{
cp /mnt/config.gz /usr/src/linux/.
 gzip -d config.gz
 cp config.gz .config
}}}
Line 57: Line 68:
# make menuconfig
or
# make xconfig
if you like the graphical version better.
Since the discspace of your boot-disk is limited, remove unneeded elements from your kernel and select the ones which are neccessary four your hardware.
{{{
 make menuconfig
}}}
or{{{
 make xconfig
}}}
if you like the graphical version better ([["XFree86"]]).
Line 63: Line 76:
After finishing your configuration leafe menuconfig/xconfig with exit (don't forget to save this configuraion) and start the compilation with
#
make bzImage
It's a good idea to recalculate the dependencies with
#
make dep
Since the diskspace of your boot-disk is limited, remove unneeded elements from your kernel and select the ones which are neccessary four your hardware.

After finishing your configuration leafe menuconfig/xconfig with exit (don't forget to save this configuraion) and start the compilation with{{{
make bzImage
}}}

It's a good idea to recalculate the dependencies with{{{
make dep
}}}
Line 70: Line 88:
Line 72: Line 91:
# cp arch/i386/bzImage /mnt/linux.bin {{{
cp arch/i386/bzImage /mnt/linux.bin
}}}
Line 75: Line 96:
Copy the kernel configuration and the system map in compressed format to the mountpoint.{{{ Copy the kernel configuration and the system map in compressed format to the mountpoint.
{{{
Line 83: Line 105:
Line 87: Line 110:

Create your own boot disk for installation

See also :

:The kernel you are working with must be able to mount loop-back devices and must also have the option to mount vfat filesystems. If you decide to compile this into the kernel or as modules doesn't matter. *The kernel source: Get the source of the kernel. You can also fetch it with

 apt-get install kernel-source-x.y.z

where x.y.z is the desired kernel version. In this example it is 2.4.18 so you have to type

 apt-get install kernel-source-2.4.18
  • Get the boot floppy images:

Download the boot floppy images (disksize=1.["44MB"], kernel=2.4.x) from a debian mirror, e.g. get all the files with the extension .bin from ftp://ftp.de.debian.org/debian/dists/testing/main/disks-i386/current/images-1.44/bf2.4

  • Mount the rescue image:

Now it's time to mount the rescue image. This is done with the command

 mount -t vfat -o loop rescue.bin /mnt

Take a look into /mnt with ls -l /mnt

 config.gz
 debian.txt
 f10.txt
 f1.txt
 f2.txt
 f3.txt
 f4.txt
 f5.txt
 f6.txt
 f7.txt
 f8.txt
 f9.txt
 install.sh
 ldlinux.sys
 linux.bin
 rdev.sh
 readme.txt
 syslinux.cfg
 sys_map.gz
 type.txt
  • Get the kernel configuration:

Copy the file /mnt/config.gz to the kernel-source tree (normaly /usr/src/linux) and unzip it.

 cp /mnt/config.gz /usr/src/linux/.
 gzip -d config.gz
 cp config.gz .config
  • Change the kernel version:

Since the kernel-source has the name "2.4.18" and the name of the modules from the installation disks is "2.4.18-bf" you have th modify the version of the kernel source. Open the file /usr/src/linux/include/linux/version.h with your favorite editor and modify the line which starts with #define UTS_RELEASE

  • Make the kernel:

Change to the directory where your kernel sourcecode is located (/usr/src/linux int most cases) and change the configuration with

 make menuconfig

or

 make xconfig

if you like the graphical version better (?"XFree86").

Since the diskspace of your boot-disk is limited, remove unneeded elements from your kernel and select the ones which are neccessary four your hardware.

After finishing your configuration leafe menuconfig/xconfig with exit (don't forget to save this configuraion) and start the compilation with

 make bzImage

It's a good idea to recalculate the dependencies with

 make dep

before creating the new kernel.

Since you only change the kernel and don't replace all modules you shouldn't change too much.

*Copy the new files: Now copy the new kernel into the mountpount as linux.bin.

 cp arch/i386/bzImage /mnt/linux.bin

If this fails due to insufficient diskspace you have to recompile your kernel with less options so it gets smaller. Copy the kernel configuration and the system map in compressed format to the mountpoint.

 gzip .config
 cp .config.gz /mnt/config.gz
 gzip System.map
 cp System.map.gz /mnt/sys_map.gz
  • Unmount the filesystem:

Unmount hte filesystem with

 umount /mnt

and you have successfully created your own boot disk for your own needs.