Issue #1 resolved
Aleksander Balicki
created an issue

This code in menu.lst in grub

{{{ title Gentoo Linux (Xen) root (hd0,4) kernel /boot/xen.gz module /boot/vmlinuz root=/dev/sda5 raid=noautodetect }}}

generates:

{{{ bialobrewy ~alistra # eclean-kernel -p -A -n4
Note: strangely named used kernel: /boot/xen-4.1.2.gz No outdated kernels found. }}}

Xen kernel is needed to run the xen hypervisor, it takes it's domain-0 kernel in the module line, so the program should recognize module kernel as needed and xen as xen, not 'strangely named' kernel.

Comments (6)

  1. Aleksander Balicki reporter
    bialobrewy ~ # eclean-kernel -l ;ls -l /boot /lib/modules/*
    3.0.0-gentoo:
    - vmlinuz: /boot/vmlinuz-3.0.0-gentoo
    - systemmap: /boot/System.map-3.0.0-gentoo
    - config: /boot/config-3.0.0-gentoo
    - modules: /lib/modules/3.0.0-gentoo
    - build: /usr/src/linux-3.0-gentoo
    # [...]
    /boot:
    total 48M
    lrwxrwxrwx 1 root root    1 Sep 29  2008 boot -> .
    lrwxrwxrwx 1 root root   22 Jul 17 03:09 config -> config-3.2.1-gentoo-r2
    -rw------- 1 root root  68K Apr 29  2011 config-2.6.37-gentoo-r4
    -rw------- 1 root root  70K Jun  4  2011 config-2.6.38-gentoo-r6
    -rw------- 1 root root  76K Aug  1  2011 config-3.0.0-gentoo
    -rw------- 1 root root  77K Feb 13 23:23 config-3.1.10-gentoo-r1
    -rw------- 1 root root  77K Feb 13 23:14 config-3.1.10-gentoo-r1.old
    -rw------- 1 root root  78K Jul 17 03:09 config-3.2.1-gentoo-r2
    -rw------- 1 root root  78K Mar 28 09:32 config-3.2.1-gentoo-r2.old
    lrwxrwxrwx 1 root root   26 Jul 17 03:09 config.old -> config-3.2.1-gentoo-r2.old
    drwxr-xr-x 2 root root 4.0K Apr 21 19:38 grub
    lrwxrwxrwx 1 root root   26 Jul 17 03:09 System.map -> System.map-3.2.1-gentoo-r2
    -rw------- 1 root root 1.6M Apr 29  2011 System.map-2.6.37-gentoo-r4
    -rw------- 1 root root 1.7M Jun  4  2011 System.map-2.6.38-gentoo-r6
    -rw------- 1 root root 2.0M Aug  1  2011 System.map-3.0.0-gentoo
    -rw------- 1 root root 2.1M Feb 13 23:23 System.map-3.1.10-gentoo-r1
    -rw------- 1 root root 2.1M Feb 13 23:14 System.map-3.1.10-gentoo-r1.old
    -rw------- 1 root root 2.1M Jul 17 03:09 System.map-3.2.1-gentoo-r2
    -rw------- 1 root root 2.1M Mar 28 09:32 System.map-3.2.1-gentoo-r2.old
    lrwxrwxrwx 1 root root   30 Jul 17 03:09 System.map.old -> System.map-3.2.1-gentoo-r2.old
    lrwxrwxrwx 1 root root   23 Jul 17 03:09 vmlinuz -> vmlinuz-3.2.1-gentoo-r2
    -rw------- 1 root root 3.2M Apr 29  2011 vmlinuz-2.6.37-gentoo-r4
    -rw------- 1 root root 4.3M Jun  4  2011 vmlinuz-2.6.38-gentoo-r6
    -rw------- 1 root root 4.6M Aug  1  2011 vmlinuz-3.0.0-gentoo
    -rw------- 1 root root 4.9M Feb 13 23:23 vmlinuz-3.1.10-gentoo-r1
    -rw------- 1 root root 4.8M Feb 13 23:14 vmlinuz-3.1.10-gentoo-r1.old
    -rw------- 1 root root 4.9M Jul 17 03:09 vmlinuz-3.2.1-gentoo-r2
    -rw------- 1 root root 4.9M Mar 28 09:32 vmlinuz-3.2.1-gentoo-r2.old
    lrwxrwxrwx 1 root root   27 Jul 17 03:09 vmlinuz.old -> vmlinuz-3.2.1-gentoo-r2.old
    -rw-r--r-- 1 root root 648K Nov 10  2011 xen-4.1.2.gz
    lrwxrwxrwx 1 root root   12 Nov 10  2011 xen-4.1.gz -> xen-4.1.2.gz
    lrwxrwxrwx 1 root root   12 Nov 10  2011 xen-4.gz -> xen-4.1.2.gz
    lrwxrwxrwx 1 root root   12 Nov 10  2011 xen.gz -> xen-4.1.2.gz
    -rw-r--r-- 1 root root 1.4M Nov 10  2011 xen-syms-4.1.2
    # [...]
    
  2. Michał Górny repo owner

    Ok, let me think for a while...

    What should eclean-kernel exactly do here? I guess it should at least read module lines from grub.conf. Are you maybe aware of how that is handled with grub2?

    Secondly, there is the xen kernel. I don't think eclean-kernel is supposed to do anything about that file. Maybe it shouldn't report it as 'strange' but do you maybe have an idea how to reliably detect xen kernel?

  3. Aleksander Balicki reporter

    I have no idea how grub2 handles it.

    I don't know what you mean by reliably, I can think of checking with equery b /boot/xen.gz, or something just using some portage library calls. I assume the package is destined to a Gentoo installation, so the xen package is the only package installing such kernel from what I know.

    alistra@bialobrewy ~ % equery b /boot/xen.gz 
     * Searching for /boot/xen.gz ... 
    app-emulation/xen-4.1.2 (/boot/xen.gz -> xen-4.1.2.gz)
    app-emulation/xen-4.1.2 (/boot/xen-4.1.2.gz)
    
  4. Michał Górny repo owner

    If you could test the changes in xen branch, I'd appreciate.

    If you prefer using ebuilds, you can do that with the live ebuild in mgorny overlay:

    layman -a mgorny
    flaggie eclean-kernel +**
    EGIT_BRANCH=xen emerge -1v eclean-kernel
    
  5. Log in to comment