?TableOfContents
Introduction
The custom installer is needed so that the network will work during the install. This allows a full Debian system to be [:DebianEeePC/HowTo/Install:installed] over the network, not just a base system, as would otherwise be possible with the [:DebianEeePC/HowTo/Install:standard installer].
Overview
The exact process for mastering the image linked from ["DebianEeePC/HowTo/Install"] basically followed ["DebianInstaller/Modify/CustomKernel"] to build a Lenny installer. A few extra steps were required to include the atl2 module. The following instructions assume a sid build system. You may wish to prepare a sid chroot to do this using cdebootstrap or debootstrap so that your build system will not be 'tainted' by the installation of the kernel for the custom installer.
Automated build
The process documented below under 'Manual build' is automated with the build-eeepc.sh script available at git://git.debian.org/git/debian-eeepc/installer.git [http://git.debian.org/?p=debian-eeepc/installer.git;a=log web], though to make it work in a sid chroot, a few things are missing:
- create /etc/kernel-img.conf in the chroot, containing:
do_symlinks = Yes do_initrd = Yes
- at this point, you probably want to save a tarball of the chroot in case you want to redo the build
- to prepare for building, ensure the script is copied into the chroot, enter the chroot and mount proc and sys (the warnings about missing fstab are fine):
cp build-eeepc.sh sid/ chroot sid/ mount -t proc proc /proc mount -t sysfs sys /sys
Temporary note
At the moment we have to do some inbuild hacking on netcfg, so we need a source line in our chroots source.list. Also, at this stage, (untill modules become available) you need to build madwifi-eeepc-source for the 486 kernel as its needed during kernel-wedge build.
* and build:
./build-eeepc.sh
If all goes well, after a while test/debian-eeepc.img should be created.
Manual build
Note: The installer is still in a state of flux, the manual build instructions are currently incorrect, but will be updated soon
These instructions will assume a directory structure of: {{{| (base directory) \
- | kernel-wedge | debian-installer | tmp (for initrd repacking and goodies) | iso (to mount the .iso) | img (to mount the .img)
}}}
Required packages:
apt-get install kernel-wedge build-essential subversion fakeroot syslinux wget
download and dpkg -i: [http://packages.debian.org/lenny/linux-image-2.6.22-3-486]
download and dpkg -i: [http://packages.debian.org/lenny/atl2-modules-2.6.22-3-486]
svn co svn://svn.debian.org/svn/d-i/trunk debian-installer
download, cd kernel-wedge, tar xf http://packages.debian.org/unstable/source/linux-kernel-di-i386-2.6
Dealing with kernel-wedge:
cd linux-kernel-di-i386-2.6
echo atl2 >> ./modules/i386/nic-modules
kernel-wedge build-all
cp -r ../*.udeb ../../debian-installer/installer/build/localudebs/
Dealing with debian-installer:
cd ../../debian-installer/installer/build
sed -ie 's/#monolithic/monolithic/g' ./config/i386.cfg
sed -ie 's/DEBIAN_RELEASE = .*/DEBIAN_RELEASE = lenny/g' ./config/common
fakeroot make build_monolithic
Now, in the dest/ directory contains your new monolithic .iso. Two problems are: * It doesn't contain the atl2 installer script * It isn't a usb image, only a LiveCD It is quite easy to convert a LiveCD to a USB image, but the atl2 installer script is not as easy to inject. If you have a better way than the way portrayed below, feel free to add it to this page.
Dealing with the atl2 script:
cp dest/monolithic/initrd.gz ../../../tmp
cd ../../../tmp
gunzip initrd.gz
cpio -i < initrd
rm initrd
cd ./usr/lib/post-base-installer.d/
wget http://bbqsrc.net/eeepc/debian/05atl2-install
chmod +rx 05atl2-install
cd ../../..
find ./ | cpio -H newc -o > ./initrd
gzip initrd
Turning the .iso into an .img
dd if=/dev/zero of=./debian-eeepc.img bs=1k count=16000
Become root now: su
mkfs.vfat ./debian-eeepc.img
mount -o loop ./debian-eeepc.img ../img
mount -o loop ../debian-installer/installer/build/dest/monolithic/mini.iso ../iso
cp -r ../iso/* ../img/*
umount ../iso
rm ../img/initrd.gz ../img/isolinux.bin
mv ../img/isolinux.cfg ../img/syslinux.cfg
cp ./initrd.gz ../img/
umount ../img
syslinux ./debian-eeepc.img
Leave root shell: exit
Conclusion
It is a good idea to test the initial boot stages with qemu just to see if it works correctly without any very noticible glitches, then testing it by dd'ing to a usb or sd card.