1

One day I choose to install kernel 4.8.0-39 but it does not and return error, I didn't give it a value. But now I want to install updates and terminal show errors related with it, checking /var/lib/dkms/ndiswrapper/1.59/build/make.log file I found next:

/var/lib/dkms/ndiswrapper/1.59/build/wrapndis.c: In function ‘tx_worker’:
/var/lib/dkms/ndiswrapper/1.59/build/wrapndis.c:707:16: error: ‘struct net_device’ has no member named ‘trans_start’
    wnd->net_dev->trans_start = jiffies;
                ^
scripts/Makefile.build:289: recipe for target «/var/lib/dkms/ndiswrapper/1.59/build/wrapndis.o» failed
make[1]: *** [/var/lib/dkms/ndiswrapper/1.59/build/wrapndis.o] Error 1
Makefile:1491: recipe for target «_module_/var/lib/dkms/ndiswrapper/1.59/build» failed
make: *** [_module_/var/lib/dkms/ndiswrapper/1.59/build] Error 2
make: exit from directory «/usr/src/linux-headers-4.8.0-39-generic»

If I understand correctly kernel can not compile and return error because of what all upgrade crashes. What do I need to do to remove all mention about 4.8.0-39 kernel?

I've already tried to run:

  1. sudo apt-get install --reinstall linux-headers-4.8.0-39-generic

  2. sudo apt autoremove

  3. sudo dpkg --configure -a

  4. sudo apt-get install -f

  5. sudo apt remove linux-headers-4.8.0-39

and everytime I got this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'linux-headers-4.8.0-39' is not installed, so not removed
The following packages will be REMOVED:
  linux-image-extra-4.8.0-39-generic
0 upgraded, 0 newly installed, 1 to remove and 43 not upgraded.
2 not fully installed or removed.
After this operation, 162 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 383195 files and directories currently installed.)
Removing linux-image-extra-4.8.0-39-generic (4.8.0-39.42~16.04.1) ...
depmod: FATAL: could not load /boot/System.map-4.8.0-39-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic
Error! echo
Your kernel headers for kernel 4.8.0-39-generic cannot be found at
/lib/modules/4.8.0-39-generic/build or /lib/modules/4.8.0-39-generic/source.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic
update-initramfs: Generating /boot/initrd.img-4.8.0-39-generic
Warning: No support for locale: ru_RU.utf8
depmod: WARNING: could not open /var/tmp/mkinitramfs_jTYeTT/lib/modules/4.8.0-39-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_jTYeTT/lib/modules/4.8.0-39-generic/modules.builtin: No such file or directory

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.8.0-39-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.8.0-39-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-4.8.0-39-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

My system:

Linux PCNAME 4.4.0-63-generic #84-Ubuntu SMP Wed Feb 1 17:20:32 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: LinuxMint
Description:    Linux Mint 18.1 Serena
Release:    18.1
Codename:   serena

EDITED:

~$ ll -d /var/tmp
drwxrwxrwt 42 root root 4096 мар  2 02:12 /var/tmp/

df -h

Filesystem Size Used Avail Use% Mounted on
udev 7,7G 0 7,7G 0% /dev
tmpfs 1,6G 9,6M 1,6G 1% /run
/dev/sda2 48G 13G 34G 28% /
tmpfs 7,7G 207M 7,5G 3% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 7,7G 0 7,7G 0% /sys/fs/cgroup
/dev/sda3 268M 261M 0 100% /boot
/dev/sda4 149G 138G 8,1G 95% /home
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 1,6G 44K 1,6G 1% /run/user/1000

@Bruno9779 Yeah, seems like you absolutely right, my /boot haven't enough space, I forgot, that /boot on another partition, but I can't delete something because apt-get tries to delete 4.8.0-39 kernel first and crashes, I wanted to delete some kernels manually, but decided to don't touch anything while it works. For now I have 4.4.0-53 4.4.0-59 4.4.0-62 4.4.0-63 4.4.0-64 installed kernels and boot from 4.4.0-64

2
  • apart from the obvious answer, that your disk may be full, if not please post ll -d /var/tmp/ Mar 1, 2017 at 18:16
  • Please add the output of df -h to your question. Mar 1, 2017 at 18:30

2 Answers 2

1

The real problem is:

gzip: stdout: No space left on device

Confirm the issue with:

df -h

The error messages generated as a result of "out of disk space" are often misleading.

EDIT:

Apparently your boot partition is full.

/dev/sda3 268M 261M 0 100% /boot

You need to make some space there before you can install/reinstall any kernel.

Get a list of installed kernels:

dpkg --list | grep linux-image

Get the version number of the running kernel:

uname -r

Now remove some unused kernels with the package manager

1
  • I edited my answer. You should put the output of df -h in the question.
    – Bruno9779
    Mar 1, 2017 at 18:50
0

Thanks a lot to everybody who helps. I solve my problem. As Bruno9779 wrote I needed more free space on /boot partition I made backup of my installed kernel images 4.4.0-53, 59, 62 and delete 4.8.0-39 after that return backuped files and remove them too through synaptic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.