Find the answer to your Linux question:
Results 1 to 6 of 6
This is what I get when from apt-get -f install Code: Setting up linux-image-2.6.18-2-k7 (2.6.18-5) ... Running depmod. Finding valid ramdisk creators. Using mkinitramfs-kpkg to build the ramdisk. Could not ...
  1. #1
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Dover, DE
    Posts
    112

    linux-image-2.6.18-2-k7 wont install

    This is what I get when from apt-get -f install
    Code:
    Setting up linux-image-2.6.18-2-k7 (2.6.18-5) ...
    Running depmod.
    Finding valid ramdisk creators.
    Using mkinitramfs-kpkg to build the ramdisk.
    Could not find postinst hook script [usr/sbin/update-grub].
    Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin'
    dpkg: error processing linux-image-2.6.18-2-k7 (--configure):
     subprocess post-installation script returned error exit status 2
    I am running 2.6.18-1-k7 now. What's wrong?

  2. #2
    Linux User
    Join Date
    Aug 2005
    Posts
    408
    This is just a guess from that error output, but it looks like it can't add the new kernel to grub's menu.lst. Do you have an "update-grub" script in any of the places listed:
    'usr/sbin/update-grub', '/bin', '/sbin', '/usr/bin', '/usr/sbin'

  3. #3
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Dover, DE
    Posts
    112
    I do have update-grub:
    Code:
    jonandtice@socrates:~$ whereis update-grub
    update-grub: /sbin/update-grub /usr/sbin/update-grub /usr/share/man/man8/update-grub.8.gz

  4. #4
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,212
    And where does /etc/kernel-img.conf point ? Which location is used by default for GRUB ?
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  5. #5
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Dover, DE
    Posts
    112

    solved

    problem solved.
    I changed the last two lines of /etc/kernel-img.conf from
    Code:
    postinst_hook = usr/sbin/update-grub
    postrm_hook   = usr/sbin/update-grub
    to
    Code:
    postinst_hook = /sbin/update-grub
    postrm_hook   = /sbin/update-grub
    Will this mess anything up in the future?

  6. #6
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,212
    Quote Originally Posted by jonantice
    Will this mess anything up in the future?
    /sbin/update-grub is only a wrapper that will be removed once Etch gets stable,

    Quote Originally Posted by /usr/share/doc/grub/NEWS.Debian.gz
    grub (0.97-16) unstable; urgency=low

    grub-install and update-grub has changed location.

    There's a wrapper available in /sbin to keep backward compatibility but
    it'll be removed once Etch is release as stable. You _must_ edit your
    /etc/kernel-img.conf and change the paths to /usr/sbin/update-grub.
    For example:

    ,----[ /etc/kernel-img.conf ]
    | ...
    | postinst_hook = /sbin/update-grub
    | postrm_hook = /sbin/update-grub
    `----

    Should be change to:

    ,----[ /etc/kernel-img.conf ]
    | ...
    | postinst_hook = /usr/sbin/update-grub
    | postrm_hook = /usr/sbin/update-grub
    `----
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •