On Fri, 17 Aug 2001 [EMAIL PROTECTED] wrote: > Yesterday I had an interesting conversation with someone on the #debian > IRC channel re: compiling a custom kernel. He urged me to add the > following lines to my /etc/lilo.conf file: > > image=/boot/vmlinuz-2.2.17 > label=prev2217 > > ... and make sure I could boot the system from this choice. It worked > fine.
One way this could go pear-shaped is if /boot/vmlinuz-2.2.17 is actually a symbolic link to a *real* image /vmlinuz or /boot/vmlinuz, which the kernel install procedure may cheerfully over-ride with the new image. In such a case your fallback points to the new image, as does the new lilo entry. So if the new image doesn't work you're in trouble. Usually /vmlinuz and /vmlinuz.old, or /boot/vmlinuz and /boot/vmlinuz.old (depending on whether you like to have vmlinuz in / or /boot) are links to actual image files /boot/vmlinuz-<version>-<flavour>, but it is possible for a Debian system to be configured the other way around (there is an option reverse-symlinks or something in make-kpkg). If your fallback entry isn't such a reverse symlink, and you run lilo successfully, then you shouldn't have any problem booting with your fallback choice. In any case, if your Debian system is fairly standard, when you install an image package made with make-kpkg your running kernel is installed automatically as choice LinuxOLD, with a link /vmlinuz.old (or /boot/vmlinuz.old) to /boot/vmlinuz-<runningversion>. Your preference for links in the root filesystem ir in /boot is set in /etc/kernel-img.conf. If your fallback choice uses an initial ramdisk (initrd), you should make sure that's OK too. If not (you can't see any initrd files in /boot or initrd = file entries in /etc/lilo.conf) then don't bother. Another tip: make sure you use flavours, this automates the installation of modules into a different directory /lib/modules/<version>-<flavour> every time you re-compile (provided you specify a different flavour, of course). Unless you do this, when you re-compile a kernel of the same version, the modules usually installed in /lib/modules/<version> (no flavour) will be cheerfully overwritten and will (generally) no longer work with your previous image of the same version. You will be re-compiling the same version of kernel, trust me; it's routine. The rewards are worth perusing the documentation, believe me. Debian offers three-line (and that's including the clean command) hassle-free recompilation and installation of the kernel, with a scheme for an automatically installed fallback. man make-kpkg man kernel-image.conf man kernel-pkg.conf /usr/doc/kernel-package/<files> example: prompt# make-kpkg clean prompt# make-kpkg --revision=3:2.2.19-custom.2001.08.15 --flavour=custom.2001.08.15 kernel_image prompt# dpkg -i <package-file> Happy compiling and upgrading, George Karaolides 8, Costakis Pantelides St., tel: +35 79 68 08 86 Strovolos, email: [EMAIL PROTECTED] Nicosia CY 2057, web: www.karaolides.com Republic of Cyprus