Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 61

Thread: Xenial, Wily, Vivid, Utopic, and Trusty - only want to keep latest kernel.

  1. #31
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Utopic, Vivid, Wily and Trusty - only want to keep latest kernel.

    I am not wanting sympathy or anything close but I have a fairly severe neurological condition and may not always catch everything at first glance or even second glance sometimes.

    But, playing with Ubuntu is part of what keeps me going. I don't know what I would be doing without it; probably going crazy lol.

    But if I end up being wrong about what I have posted and seen, you can bet that I'll be the first one to admit that I'm wrong.

    I can't wait for the next kernel to be installed and see how it goes. So I can either confirm or deny that I'm an idiot!.

  2. #32
    Join Date
    Aug 2013
    Beans
    4,941

    Re: Utopic, Vivid, Wily and Trusty - only want to keep latest kernel.

    Quote Originally Posted by Cavsfan View Post
    I don't believe using the aliases cause any problems and the command line updates are better. Ranch hand, a guy on that used to be on this forum taught me that.
    He called update manager update mangler although it has probably gotten better over time. The best way to get updates is still through CLI especially if you only want to keep two kernels.
    Because when you have more than two kernels installed, you will be notified that you need to do an apt-get autoremove to get rid of any more than 2 kernels. Update manager will not do this.

    It may be, my point is simply that my concerns is with inexeprienced users accumulating old kernels, inexperienced users do not us the command line to upgrade, usually.

  3. #33
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Utopic, Vivid, Wily and Trusty - only want to keep latest kernel.

    Quote Originally Posted by Cavsfan View Post
    I don't believe using the aliases cause any problems and the command line updates are better. Ranch hand, a guy on that used to be on this forum taught me that.
    He called update manager update mangler although it has probably gotten better over time. The best way to get updates is still through CLI especially if you only want to keep two kernels.
    Because when you have more than two kernels installed, you will be notified that you need to do an apt-get autoremove to get rid of any more than 2 kernels. Update manager will not do this.
    Quote Originally Posted by monkeybrain20122 View Post
    It may be, my point is simply that my concerns is with inexperienced users accumulating old kernels, inexperienced users do not us the command line to upgrade, usually.
    Oh, I didn't realize you were talking about inexperienced users. I totally see your point now. I'm not sure what to do in that situation. I have heard of people with kernels that go back a long ways and most are something in the area of 270MB each, which can add up quick.

    I've never used update manager. Does it even tell you if you need to autoremove kernels or not? (not trying to get off topic of course)

  4. #34
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Utopic, Vivid, Wily and Trusty - only want to keep latest kernel.

    So, I guess I'm the only person in the world that cares that Ubuntu as well as Linux Mint want to keep one kernel when it's supposed to maintain two... I'm beginning to lose interest.

    IMO /etc/kernel/postinst.d/apt-auto-removal should not be triggered when you delete a kernel no matter if it's the 3rd or 2nd to last kernel, but it does every time and requires a reboot.

    The bug I filed is marked high in importance but is not assigned to any one. If you want add your name to this bug:

    https://bugs.launchpad.net/ubuntu/+s...t/+bug/1440608

  5. #35
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Utopic, Vivid, Wily and Trusty - only want to keep latest kernel.

    Looks like this latest kernel may have fixed this problem at least for Wily 15.10

    Code:
    cavsfan@cavsfan-MS-7529:~$ uname -r
    4.2.0-7-generic
    It's still happening on Trusty and Mint 17 though. Never has Arch Linux asked me to even reboot for anything.
    I think one time it said after updating the nVidia driver if I wanted to make use of it I'd have to reboot, but when a kernel is installed - no reboot required.
    Only if you want to use the new kernel.

  6. #36
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Utopic, Vivid, Wily and Trusty - only want to keep latest kernel.

    Ok, let's see how this goes with the 4.2 kernels on Xubuntu 15.10.
    Here are the 2 kernels that are installed currently:
    Code:
    cavsfan@cavsfan-le-beast:~$ dpkg -l | grep -e "linux-generic" -e "linux-headers" -e "linux-image"
    ii  linux-generic                                 4.2.0.10.10                              amd64        Complete Generic Linux kernel and headers
    ii  linux-headers-4.2.0-10                        4.2.0-10.12                              all          Header files related to Linux kernel version 4.2.0
    ii  linux-headers-4.2.0-10-generic                4.2.0-10.12                              amd64        Linux kernel headers for version 4.2.0 on 64 bit x86 SMP
    ii  linux-headers-4.2.0-7                         4.2.0-7.7                                all          Header files related to Linux kernel version 4.2.0
    ii  linux-headers-4.2.0-7-generic                 4.2.0-7.7                                amd64        Linux kernel headers for version 4.2.0 on 64 bit x86 SMP
    ii  linux-headers-generic                         4.2.0.10.10                              amd64        Generic Linux kernel headers
    ii  linux-image-4.2.0-10-generic                  4.2.0-10.12                              amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
    ii  linux-image-4.2.0-7-generic                   4.2.0-7.7                                amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
    ii  linux-image-extra-4.2.0-10-generic            4.2.0-10.12                              amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
    ii  linux-image-extra-4.2.0-7-generic             4.2.0-7.7                                amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
    ii  linux-image-generic                           4.2.0.10.10                              amd64        Generic Linux kernel image
    Here is the contents of /etc/apt/apt.conf.d/01autoremove-kernels:
    Code:
    cavsfan@cavsfan-le-beast:~$ cat /etc/apt/apt.conf.d/01autoremove-kernels
    // DO NOT EDIT! File autogenerated by /etc/kernel/postinst.d/apt-auto-removal
    APT::NeverAutoRemove
    {
       "^linux-image-4\.2\.0-10-generic$";
       "^linux-image-4\.2\.0-7-generic$";
       "^linux-headers-4\.2\.0-10-generic$";
       "^linux-headers-4\.2\.0-7-generic$";
       "^linux-image-extra-4\.2\.0-10-generic$";
       "^linux-image-extra-4\.2\.0-7-generic$";
       "^linux-signed-image-4\.2\.0-10-generic$";
       "^linux-signed-image-4\.2\.0-7-generic$";
       "^kfreebsd-image-4\.2\.0-10-generic$";
       "^kfreebsd-image-4\.2\.0-7-generic$";
       "^kfreebsd-headers-4\.2\.0-10-generic$";
       "^kfreebsd-headers-4\.2\.0-7-generic$";
       "^gnumach-image-4\.2\.0-10-generic$";
       "^gnumach-image-4\.2\.0-7-generic$";
       "^.*-modules-4\.2\.0-10-generic$";
       "^.*-modules-4\.2\.0-7-generic$";
       "^.*-kernel-4\.2\.0-10-generic$";
       "^.*-kernel-4\.2\.0-7-generic$";
       "^linux-backports-modules-.*-4\.2\.0-10-generic$";
       "^linux-backports-modules-.*-4\.2\.0-7-generic$";
       "^linux-tools-4\.2\.0-10-generic$";
       "^linux-tools-4\.2\.0-7-generic$";
    };
    There's a kernel held back waiting for a dist-upgrade:
    Code:
    cavsfan@cavsfan-le-beast:~$ sudo apt-get upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    The following packages have been kept back:
      linux-generic linux-headers-generic linux-image-generic
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    Code:
    cavsfan@cavsfan-le-beast:~$ sudo apt-get dist-upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    The following NEW packages will be installed:
      linux-headers-4.2.0-11 linux-headers-4.2.0-11-generic linux-image-4.2.0-11-generic linux-image-extra-4.2.0-11-generic
    The following packages will be upgraded:
      linux-generic linux-headers-generic linux-image-generic
    3 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
    Need to get 66.0 MB of archives.
    After this operation, 285 MB of additional disk space will be used.
    Do you want to continue? [Y/n]
    During installation /etc/kernel/postinst.d/apt-auto-removal 4.2.0-11-generic /boot/vmlinuz-4.2.0-11-generic was triggered, then update-grub was also triggered which takes 5 minutes or so to complete.
    Then another /etc/kernel/postinst.d/apt-auto-removal 4.2.0-11-generic /boot/vmlinuz-4.2.0-11-generic and update-grub for the 2nd time also taking pretty much 5 minutes to complete.

    Afterwards /etc/apt/apt.conf.d/01autoremove-kernels contains this, which appears normal.
    Code:
    cavsfan@cavsfan-le-beast:~$ cat /etc/apt/apt.conf.d/01autoremove-kernels
    // DO NOT EDIT! File autogenerated by /etc/kernel/postinst.d/apt-auto-removal
    APT::NeverAutoRemove
    {
       "^linux-image-4\.2\.0-10-generic$";
       "^linux-image-4\.2\.0-11-generic$";
       "^linux-headers-4\.2\.0-10-generic$";
       "^linux-headers-4\.2\.0-11-generic$";
       "^linux-image-extra-4\.2\.0-10-generic$";
       "^linux-image-extra-4\.2\.0-11-generic$";
       "^linux-signed-image-4\.2\.0-10-generic$";
       "^linux-signed-image-4\.2\.0-11-generic$";
       "^kfreebsd-image-4\.2\.0-10-generic$";
       "^kfreebsd-image-4\.2\.0-11-generic$";
       "^kfreebsd-headers-4\.2\.0-10-generic$";
       "^kfreebsd-headers-4\.2\.0-11-generic$";
       "^gnumach-image-4\.2\.0-10-generic$";
       "^gnumach-image-4\.2\.0-11-generic$";
       "^.*-modules-4\.2\.0-10-generic$";
       "^.*-modules-4\.2\.0-11-generic$";
       "^.*-kernel-4\.2\.0-10-generic$";
       "^.*-kernel-4\.2\.0-11-generic$";
       "^linux-backports-modules-.*-4\.2\.0-10-generic$";
       "^linux-backports-modules-.*-4\.2\.0-11-generic$";
       "^linux-tools-4\.2\.0-10-generic$";
       "^linux-tools-4\.2\.0-11-generic$";
    };
    So, a reboot is still required. So, I'll report back after the reboot.

  7. #37
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Utopic, Vivid, Wily and Trusty - only want to keep latest kernel.

    So after a reboot the 4.2.0-7-generic wants to be autoremoved:
    Code:
    cavsfan@cavsfan-le-beast:~$ sudo apt-get upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... The following packages were automatically installed and are no longer required:
      linux-headers-4.2.0-7 linux-headers-4.2.0-7-generic linux-image-4.2.0-7-generic linux-image-extra-4.2.0-7-generic
    Use 'apt-get autoremove' to remove them.
    Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Everything normal so far. But let's see what happens if I just delete the kernel which is pretty much what the autoremove would do.
    Code:
    cavsfan@cavsfan-le-beast:~$ sudo apt-get autoremove
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      linux-headers-4.2.0-7 linux-headers-4.2.0-7-generic linux-image-4.2.0-7-generic linux-image-extra-4.2.0-7-generic
    0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
    After this operation, 285 MB disk space will be freed.
    Do you want to continue? [Y/n] n
    Abort.
    Code:
    cavsfan@cavsfan-le-beast:~$ sudo apt-get purge linux-headers-4.2.0-7 linux-headers-4.2.0-7-generic linux-image-4.2.0-7-generic linux-image-extra-4.2.0-7-generic
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      linux-headers-4.2.0-7* linux-headers-4.2.0-7-generic* linux-image-4.2.0-7-generic* linux-image-extra-4.2.0-7-generic*
    0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
    After this operation, 285 MB disk space will be freed.
    Do you want to continue? [Y/n]
    Even though no autoremove was done it still triggered /etc/kernel/postinst.d/apt-auto-removal 4.2.0-7-generic /boot/vmlinuz-4.2.0-7-generic and update-grub.
    The dkms modules were removed and another long update-grub for the 2nd time.

    Apparently the long delay is caused by os-prober but it did find Windows 10.

    It again wants to be rebooted and the /etc/apt/apt.conf.d/01autoremove-kernels has been modified in the process to contain the kernel that is now deleted.
    Code:
    cavsfan@cavsfan-le-beast:~$ cat /etc/apt/apt.conf.d/01autoremove-kernels
    // DO NOT EDIT! File autogenerated by /etc/kernel/postinst.d/apt-auto-removal
    APT::NeverAutoRemove
    {
       "^linux-image-4\.2\.0-11-generic$";
       "^linux-image-4\.2\.0-7-generic$";
       "^linux-headers-4\.2\.0-11-generic$";
       "^linux-headers-4\.2\.0-7-generic$";
       "^linux-image-extra-4\.2\.0-11-generic$";
       "^linux-image-extra-4\.2\.0-7-generic$";
       "^linux-signed-image-4\.2\.0-11-generic$";
       "^linux-signed-image-4\.2\.0-7-generic$";
       "^kfreebsd-image-4\.2\.0-11-generic$";
       "^kfreebsd-image-4\.2\.0-7-generic$";
       "^kfreebsd-headers-4\.2\.0-11-generic$";
       "^kfreebsd-headers-4\.2\.0-7-generic$";
       "^gnumach-image-4\.2\.0-11-generic$";
       "^gnumach-image-4\.2\.0-7-generic$";
       "^.*-modules-4\.2\.0-11-generic$";
       "^.*-modules-4\.2\.0-7-generic$";
       "^.*-kernel-4\.2\.0-11-generic$";
       "^.*-kernel-4\.2\.0-7-generic$";
       "^linux-backports-modules-.*-4\.2\.0-11-generic$";
       "^linux-backports-modules-.*-4\.2\.0-7-generic$";
       "^linux-tools-4\.2\.0-11-generic$";
       "^linux-tools-4\.2\.0-7-generic$";
    };
    So, if I do as it wants, I will be left with one kernel - 4.2.0-11-generic.

    My point is that autoremove should not have been triggered when the kernel was simply deleted.
    It never used to trigger a kernel autoremove.

    If this concerns you add your name to this bug:
    https://bugs.launchpad.net/ubuntu/+s...t/+bug/1440608

  8. #38
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Wily, Vivid, Utopic, and Trusty - only want to keep latest kernel.

    Entering this in terminal should never result in a reboot:
    Code:
    cavsfan@cavsfan-le-beast:~$ sudo apt-get purge linux-headers-4.2.0-10 linux-headers-4.2.0-10-generic linux-image-4.2.0-10-generic linux-image-extra-4.2.0-10-generic
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      linux-headers-4.2.0-10* linux-headers-4.2.0-10-generic* linux-image-4.2.0-10-generic* linux-image-extra-4.2.0-10-generic*
    0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
    After this operation, 285 MB disk space will be freed.
    Do you want to continue? [Y/n] Y
    (Reading database ... 270300 files and directories currently installed.)
    Removing linux-headers-4.2.0-10-generic (4.2.0-10.12) ...
    Removing linux-headers-4.2.0-10 (4.2.0-10.12) ...
    Removing linux-image-extra-4.2.0-10-generic (4.2.0-10.12) ...
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    run-parts: executing /etc/kernel/postinst.d/dkms 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    update-initramfs: Generating /boot/initrd.img-4.2.0-10-generic
    run-parts: executing /etc/kernel/postinst.d/pm-utils 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    run-parts: executing /etc/kernel/postinst.d/update-notifier 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-4.2.0-12-generic
    Found initrd image: /boot/initrd.img-4.2.0-12-generic
    Found linux image: /boot/vmlinuz-4.2.0-11-generic
    Found initrd image: /boot/initrd.img-4.2.0-11-generic
    Found linux image: /boot/vmlinuz-4.2.0-10-generic
    Found initrd image: /boot/initrd.img-4.2.0-10-generic
    Found Windows 10 (loader) on /dev/sda1
    Found Arch on /dev/sda3
    done
    Purging configuration files for linux-image-extra-4.2.0-10-generic (4.2.0-10.12) ...
    Removing linux-image-4.2.0-10-generic (4.2.0-10.12) ...
    Examining /etc/kernel/prerm.d.
    run-parts: executing /etc/kernel/prerm.d/dkms 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    dkms: removing: nvidia-304 304.128 (4.2.0-10-generic) (x86_64)
    
    -------- Uninstall Beginning --------
    Module:  nvidia-304
    Version: 304.128
    Kernel:  4.2.0-10-generic (x86_64)
    -------------------------------------
    
    Status: Before uninstall, this module version was ACTIVE on this kernel.
    
    nvidia_304.ko:
     - Uninstallation
       - Deleting from: /lib/modules/4.2.0-10-generic/updates/dkms/
     - Original module
       - No original module was found for this module on this kernel.
       - Use the dkms install command to reinstall any previous module version.
    
    depmod....
    
    DKMS: uninstall completed.
    Examining /etc/kernel/postrm.d .
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    update-initramfs: Deleting /boot/initrd.img-4.2.0-10-generic
    run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-4.2.0-12-generic
    Found initrd image: /boot/initrd.img-4.2.0-12-generic
    Found linux image: /boot/vmlinuz-4.2.0-11-generic
    Found initrd image: /boot/initrd.img-4.2.0-11-generic
    Found Windows 10 (loader) on /dev/sda1
    Found Arch on /dev/sda3
    done
    Purging configuration files for linux-image-4.2.0-10-generic (4.2.0-10.12) ...
    Examining /etc/kernel/postrm.d .
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.2.0-10-generic /boot/vmlinuz-4.2.0-10-generic
    And besides the fact that this should never have been initiated, /etc/kernel/postinst.d/apt-auto-removal should never do this to this file:
    Code:
    cavsfan@cavsfan-le-beast:~$ cat /etc/apt/apt.conf.d/01autoremove-kernels
    // DO NOT EDIT! File autogenerated by /etc/kernel/postinst.d/apt-auto-removal
    APT::NeverAutoRemove
    {
       "^linux-image-4\.2\.0-10-generic$";
       "^linux-image-4\.2\.0-12-generic$";
       "^linux-headers-4\.2\.0-10-generic$";
       "^linux-headers-4\.2\.0-12-generic$";
       "^linux-image-extra-4\.2\.0-10-generic$";
       "^linux-image-extra-4\.2\.0-12-generic$";
       "^linux-signed-image-4\.2\.0-10-generic$";
       "^linux-signed-image-4\.2\.0-12-generic$";
       "^kfreebsd-image-4\.2\.0-10-generic$";
       "^kfreebsd-image-4\.2\.0-12-generic$";
       "^kfreebsd-headers-4\.2\.0-10-generic$";
       "^kfreebsd-headers-4\.2\.0-12-generic$";
       "^gnumach-image-4\.2\.0-10-generic$";
       "^gnumach-image-4\.2\.0-12-generic$";
       "^.*-modules-4\.2\.0-10-generic$";
       "^.*-modules-4\.2\.0-12-generic$";
       "^.*-kernel-4\.2\.0-10-generic$";
       "^.*-kernel-4\.2\.0-12-generic$";
       "^linux-backports-modules-.*-4\.2\.0-10-generic$";
       "^linux-backports-modules-.*-4\.2\.0-12-generic$";
       "^linux-tools-4\.2\.0-10-generic$";
       "^linux-tools-4\.2\.0-12-generic$";
    };
    Because left as is the 4.2.0-11-generic kernel would be requested to be autoremoved after a reboot.

    Am I the only one that sees a problem here?

  9. #39
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Wily, Vivid, Utopic, and Trusty - only want to keep latest kernel.

    Found a work around.

    When a new kernel is installed and afterwards the system requests to be rebooted just manually delete the 3rd kernel back before rebooting and it won't keep autoremoving kernels until you have just one left.

    It will leave you with two. That has worked during the last 2 kernel installs.

    Code:
    cavsfan@cavsfan-le-beast:~$ uname -r
    4.2.0-15-generic
    But it will cause /etc/apt/apt.conf.d/01autoremove-kernels to contain the 2 installed kernels plus the one just deleted:

    Code:
    cavsfan@cavsfan-le-beast:~$ cat /etc/apt/apt.conf.d/01autoremove-kernels
    // DO NOT EDIT! File autogenerated by /etc/kernel/postinst.d/apt-auto-removal
    APT::NeverAutoRemove
    {
       "^linux-image-4\.2\.0-12-generic$";
       "^linux-image-4\.2\.0-14-generic$";
       "^linux-image-4\.2\.0-15-generic$";
       "^linux-headers-4\.2\.0-12-generic$";
       "^linux-headers-4\.2\.0-14-generic$";
       "^linux-headers-4\.2\.0-15-generic$";
       "^linux-image-extra-4\.2\.0-12-generic$";
       "^linux-image-extra-4\.2\.0-14-generic$";
       "^linux-image-extra-4\.2\.0-15-generic$";
       "^linux-signed-image-4\.2\.0-12-generic$";
       "^linux-signed-image-4\.2\.0-14-generic$";
       "^linux-signed-image-4\.2\.0-15-generic$";
       "^kfreebsd-image-4\.2\.0-12-generic$";
       "^kfreebsd-image-4\.2\.0-14-generic$";
       "^kfreebsd-image-4\.2\.0-15-generic$";
       "^kfreebsd-headers-4\.2\.0-12-generic$";
       "^kfreebsd-headers-4\.2\.0-14-generic$";
       "^kfreebsd-headers-4\.2\.0-15-generic$";
       "^gnumach-image-4\.2\.0-12-generic$";
       "^gnumach-image-4\.2\.0-14-generic$";
       "^gnumach-image-4\.2\.0-15-generic$";
       "^.*-modules-4\.2\.0-12-generic$";
       "^.*-modules-4\.2\.0-14-generic$";
       "^.*-modules-4\.2\.0-15-generic$";
       "^.*-kernel-4\.2\.0-12-generic$";
       "^.*-kernel-4\.2\.0-14-generic$";
       "^.*-kernel-4\.2\.0-15-generic$";
       "^linux-backports-modules-.*-4\.2\.0-12-generic$";
       "^linux-backports-modules-.*-4\.2\.0-14-generic$";
       "^linux-backports-modules-.*-4\.2\.0-15-generic$";
       "^linux-tools-4\.2\.0-12-generic$";
       "^linux-tools-4\.2\.0-14-generic$";
       "^linux-tools-4\.2\.0-15-generic$";
    };
    Just thought I'd mention it.

  10. #40
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Wily, Vivid, Utopic, and Trusty - only want to keep latest kernel.

    Well, this bug is still there through Xenial as well as back as far as Trusty. It was indeed a smart move to take out the autoclean as part of my update alias.

    alias ud='sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoclean'
    Because of the way /etc/apt/apt.conf.d/01autoremove-kernels gets jumbled around when a new kernel is installed if autoclean is immediately invoked after the installation of the kernel, part of the 2nd oldest kernel gets removed during that autoclean rendering that kernel useless.

    So, you keep going and have but one kernel left; the most recent one installed. Because the next reboot you will be asked to autoremove the 3rd kernel back and once you remove that and another reboot is performed, the 2nd oldest kernel is asked to be autoremoved, which is unbootable if parts of it are already gone.

    There has been some activity on the bug and someone posted a better /etc/kernel/postinst.d/apt-auto-removal script that you can replace yours with.

    Then there is a cron job that has been added also. So, if you are interested in getting this problem solved add your name to the bug and do the steps towards the bottom of the bug.

    https://bugs.launchpad.net/ubuntu/+s...t/+bug/1440608

    Edit: Someone said it would eventually remove every kernel even the last and only one.
    Last edited by Cavsfan; December 27th, 2015 at 08:56 PM.

Page 4 of 7 FirstFirst ... 23456 ... LastLast

Bookmarks

Posting Permissions

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