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

Re: why does linux image try to use grub ?



On Mon, 29 Mar 2010 22:54:55 -0400 (EDT), Brian wrote:
> why does linux image try to use grub ?
> I don't have grub installed, but I _do_ have lilo installed.
> Should this be a bug report ?
>
> you should know that I haven't done a full upgrade in a while, that may
> be part of the problem. used to be Debian unstable wasn't.  It is
> now :-(
> 
> Setting up linux-image-2.6.32-3-amd64 (2.6.32-9) ...
> Running depmod.
> Running update-initramfs.
> update-initramfs: Generating /boot/initrd.img-2.6.32-3-amd64
> initrd.img(/boot/initrd.img-2.6.32-3-amd64
> ) points to /boot/initrd.img-2.6.32-3-amd64
> (/boot/initrd.img-2.6.32-3-amd64) -- doing nothing
> at /var/lib/dpkg/info/linux-image-2.6.32-3-amd64.postinst line 400.
> vmlinuz(/boot/vmlinuz-2.6.32-3-amd64 ) points
> to /boot/vmlinuz-2.6.32-3-amd64 (/boot/vmlinuz-2.6.32-3-amd64) -- doing
> nothing at /var/lib/dpkg/info/linux-image-2.6.32-3-amd64.postinst line
> 400. Running update-grub. User postinst hook script [update-grub]
> failed to execute: No such file or directory

>From the error messages it appears that your /etc/kernel-img.conf file
is not set up properly.  I'm guessing that it contains lines like:

   postinst_hook = update-grub
   postrm_hook = update-grub

De-installing grub does not get rid of these lines in this file!
They have to be manually removed.

Here is what I recommend that this file look like for a lilo user
under Squeeze/Sid:

   do_symlinks = yes
   do_bootloader = yes
   do_initrd = yes
   link_in_boot = yes

This assumes that you want to maintain your symlinks in the /boot
directory, which it appears you are doing from the above messages.
Of course, /etc/lilo.conf must be set up to use those symbolic links
as well.  Something like this:

   lba32
   large-memory
   compact
   boot=/dev/hda
   delay=40
   vga=normal
   root=/dev/hda1
   read-only
   install=text
   default=Linux
   
   image=/boot/vmlinuz
   label=Linux
   initrd=/boot/initrd.img

   image=/boot/vmlinuz.old
   label=LinuxOld
   initrd=/boot/initrd.img.old
   optional

Note that the "image" and "initrd" lines start out with "/boot",
which indicates that the boot loader expects the symlinks to be
in the /boot directory as well.  I'm going from memory here, as
I don't have access to a lilo-configured machine at the moment.

Also, if I recall correctly, the "do_bootloader" option (i.e.
"run lilo") seems to only take effect now when an initial RAM
filesystem is *updated*, not when it is *created*.  I seem to
recall that when I installed the 2.6.32-3 kernel on my machine,
it created an initial RAM filesystem and updated the symbolic
links, but lilo did not get run.  To be sure that it does, you
will need to create a hook script.  I suggest that you look at
"Step 10: Customize the kernel installation process" on the following
web page: http://www.wowway.com/~zlinuxman/Kernel.htm.  This
section explains kernel hook scripts.  I recommend that you install
the four hook scripts listed there, except that S50symlink_hook and
K50symlink_hook should be changed to specify the boot loader as lilo
instead of zipl.  That way, you should be covered not only for stock
kernels, but also for kernels that you create yourself with make-kpkg.

HTH
 
-- 
  .''`.     Stephen Powell    <zlinuxman@wowway.com>
 : :'  :
 `. `'`
   `-


Reply to: