kernels

kernels

Postby Maroman » 31 Jan 2014, 08:26

installing and upgrading Point (full 2.2 32bit version) I've noticed that new kernel replaced the old one. there is only one - the latest. I must say I've not payed attention to that previously but now I'm quite curious. is it normal or I missed something?

of course I do not want to compare but there are distros with all upgraded kernels. there is very nice procedure in fedora. it's possible to set parameter in yum.conf file to define the number of backup kernels.
it might be not serious problem and usually I use the last kernel but for a few days after upgrading it's secure to have backup and gentle procedure to go back to last good working (if sth wrong)

I have also checked /etc/kernel/postinst.d directory. there is usually apt-get-autoremove package. here missing. and my question is.
is there any way to keep one or two extra kernels for backup?

cheers,
ride my bike,
User avatar
Maroman
 
Posts: 369
Joined: 02 Jun 2013, 09:17
Location: Warsaw Metropolitan Area, Poland

Re: old kernels

Postby Pinkeye » 31 Jan 2014, 12:03

I believe it's normal. That's how Debian uses its metapackages (not the best thing to do, imho).

I'm no expert on apt but i don't know of any way to make it possible within apt infrastructure.

You could take the other kernel package, modules package etc, extract it, cp it into appropriate destinations and configure grub (aka. install everything without using the package manager). It should work.
User avatar
Pinkeye
 
Posts: 21
Joined: 14 Oct 2013, 21:56
Location: The Czech Republic

Re: old kernels

Postby Maroman » 31 Jan 2014, 12:28

ok, but I have found script
Code: Select all
#!/bin/sh
#
#    purge-old-kernels - remove old kernel packages
#    Copyright (C) 2012 Dustin Kirkland <kirkland@ubuntu.com>
#
#    Authors: Dustin Kirkland <kirkland@ubuntu.com>
#             Kees Cook <kees@ubuntu.com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, version 3 of the License.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Ensure we're running as root
if [ "$(id -u)" != 0 ]; then
   echo "ERROR: This script must run as root.  Hint..." 1>&2
   echo "  sudo $0 $@" 1>&2
   exit 1
fi

# NOTE: This script will ALWAYS keep the currently running kernel
# NOTE: Default is to keep 2 more, user overrides with --keep N
KEEP=2
# NOTE: Any unrecognized option will be passed straight through to apt-get
APT_OPTS=
while [ ! -z "$1" ]; do
   case "$1" in
      --keep)
         # User specified the number of kernels to keep
         KEEP="$2"
         shift 2
      ;;
      *)
         APT_OPTS="$APT_OPTS $1"
         shift 1
      ;;
   esac
done

# Build our list of kernel packages to purge
CANDIDATES=$(ls -tr /boot/vmlinuz-* | head -n -${KEEP} | grep -v "$(uname -r)$" | cut -d- -f2- | awk '{print "linux-image-" $0 " linux-headers-" $0}' )
for c in $CANDIDATES; do
   dpkg-query -s "$c" >/dev/null 2>&1 && PURGE="$PURGE $c"
done

if [ -z "$PURGE" ]; then
   echo "No kernels are eligible for removal"
   exit 0
fi

apt-get $APT_OPTS remove --purge $PURGE

for keeping current and last n (here n=2) older kernels. it should be placed in /etc/kernel/postins.d as a apt-auto-removal (there is such a file in different debian distros, but here isn't).

Probable I will install and upgrade Point once more to check. has anyone experience with this?

cheers,
ride my bike,
User avatar
Maroman
 
Posts: 369
Joined: 02 Jun 2013, 09:17
Location: Warsaw Metropolitan Area, Poland

Re: kernels

Postby Maroman » 25 Apr 2014, 09:06

upgrading today I got error message
Code: Select all
Setting up linux-image-3.13-0.bpo.1-amd64 (3.13.10-1~bpo70+1) ...
/etc/kernel/postinst.d/dkms:
Error! Bad return status for module build on kernel: 3.13-0.bpo.1-amd64 (x86_64)
Consult /var/lib/dkms/broadcom-sta/5.100.82.112/build/make.log for more information.

and here is the said above log file
Code: Select all
DKMS make.log for broadcom-sta-5.100.82.112 for kernel 3.13-0.bpo.1-amd64 (x86_64)
Fri Apr 25 10:42:08 CEST 2014
/bin/sh: 1: [: Illegal number:
/bin/sh: 1: [: Illegal number:
Wireless Extension is the only possible API for this kernel version
Using Wireless Extension API
KBUILD_NOPEDANTIC=1 make -C /lib/modules/3.13-0.bpo.1-amd64/build M=/var/lib/dkms/broadcom-sta/5.100.82.112/build
make[1]: Entering directory `/usr/src/linux-headers-3.13-0.bpo.1-amd64'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
Kernel architecture is X86_64
  LD      /var/lib/dkms/broadcom-sta/5.100.82.112/build/built-in.o
  CC [M]  /var/lib/dkms/broadcom-sta/5.100.82.112/build/src/shared/linux_osl.o
  CC [M]  /var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.o
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c: In function ‘wl_tkip_printstats’:
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:2975:7: warning: passing argument 1 of ‘wl->tkipmodops->print_stats’ from incompatible pointer type [enabled by default]
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:2975:7: note: expected ‘struct seq_file *’ but argument is of type ‘char *’
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:2978:4: warning: passing argument 1 of ‘wl->tkipmodops->print_stats’ from incompatible pointer type [enabled by default]
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:2978:4: note: expected ‘struct seq_file *’ but argument is of type ‘char *’
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c: In function ‘wl_reg_proc_entry’:
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:3185:2: error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration]
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:3185:22: warning: assignment makes pointer from integer without a cast [enabled by default]
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:3190:16: error: dereferencing pointer to incomplete type
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:3191:16: error: dereferencing pointer to incomplete type
/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:3192:16: error: dereferencing pointer to incomplete type
cc1: some warnings being treated as errors
make[4]: *** [/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.o] Error 1
make[3]: *** [_module_/var/lib/dkms/broadcom-sta/5.100.82.112/build] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13-0.bpo.1-amd64'
make: *** [all] Error 2

what is going on? post-installation script issue?? I'm not using any braodcom card. seems all works fine.

cheers
ride my bike,
User avatar
Maroman
 
Posts: 369
Joined: 02 Jun 2013, 09:17
Location: Warsaw Metropolitan Area, Poland


Return to Point Linux Full Edition Support

Who is online

Users browsing this forum: No registered users and 6 guests

cron