[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: make-kpkg, was: Getting PCMCIA to work?



update-grub scans /boot and looks for kernels (files named "vmlinuz...")
and initrd files. It constructs a menu item for each kernel it finds, and
puts the kernels in order by kernel version and extraversion. So my custom
kernel (2.4.18.0724) is before the default woody kernel of 2.2.20. If I
compiled a 2.4.19 kernel today, it would be first in the list and the
others would move down.

In addition it looks at /dev/hda1 to see if Windows is there; if so it
makes a menu item to boot Windows. (Of course this choice is last in the
list, as God intended. <G>)

The reason the above works is that I've flouted Debian orthodoxy and
defined EXTRAVERSION myself. If I did things the Debian Way, I'd get
kernel packages with mile-long names and they wouldn't be sorted
automagically by update-grub.

By putting the two lines:

postinst_hook=/sbin/update-grub
postrm_hook=/sbin/update-grub

in /etc/kernel-img.conf you cause update-grub to be run each time a kernel
image deb is either installed or removed. So you may not even need to edit
the grub configuration (let alone re-install grub).

The first time you run update-grub you need to inspect /boot/grub/menu.lst
and READ THE COMMENTS CAREFULLY -- comments begin with ##. Options you
need to define begin with #.

If you have more than one *nix system on more than one partition you'll
still need to edit this file each time you install/remove a kernel deb,
but it's still less work than doing everything yourself.

Kevin

On Sun, 9 Feb 2003 21:23:00 +0100
mi <Michael.Wordehoff@gmx.de> wrote:

> Hi Kevin
> Sound good.
> I didn't know that piece about update-grub. It reads the package
> database then ?  I'll do rtfm, also about configuring kernel-kpkg, and
> try something your way :-)
> 
> micha.
> 
> ronin2@bellatlantic.net schrieb zu Re: make-kpkg, was: Getting PCMCIA to
> work?:
> > I use make-kpkg to build several versions of a kernel, and this for me
> > is much simpler: edit Makefile and define Extraversion as the date, so
> > today Extraversion=.0209.
> >
> > If I made more than one version today I could extend it with .020901
> > or something.
> >
> > This has several desirable consequences:
> >  1. I don't need to screw around with symlinks. Each kernel has a
> >  unique name, and the boot loader knows it by that name. In the boot
> >  menu kernels are shown in order from newest to oldest. 2. Each kernel
> >  has its own/lib/modules tree and I don't need to worry about
> >  overwriting an old one before I'm ready -- it's installed or removed
> >  along with its kernel. 3. I use grub, so I have configured
> >  kernel-package to run update-grub whenever I install or remove a
> >  kernel package.
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-laptop-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
> 



Reply to: