Linux-headers issues

Kernels & Hardware, configuring network, installing services

Linux-headers issues

Postby Lost_in_Debian » 2018-03-14 13:29

Hi everyone, i'm nearly new with Debian, and i come here because after 2 days of research i don't know what to do anymore. I suppose i'm in the good section of this forum. So here 's my problem :

I have on dual boot Windows 10 and Debian 9.4.

I try to install Virtualbox on Debian 9.4 because i need it to use Vagrant.

When i tried to use it, they said it needs linux-headers.

After i installed it everything works, but when i want to restart my computer screen freezes after a moment, and i can't go on debian anymore.

I tried to install different versions of Virtualbox, (like 5.2 or 5.1 with extensions pack) and another vm but it seems linux-headers is mandatory to use a vm.

Every time i have to purge linux-headers and install another kernel if i want to boot again. Reinstalling the kernel don't work.

Code: Select all
 sudo apt install --reinstall linux-image-4.9.0-6-amd64
(for example).

Here's a list of kernel i tried :

-linux-image-amd64 (to got the latest version)
-linux-image-4.9.0-4-amd64
-linux-image-4.9.0-5-amd64
-linux-image-4.9.0-6-amd64

And here's some examples of what i did (in recovery mode) :

Code: Select all
sudo aptitude update
sudo aptitude install --reinstall build-essential dkms
/sbin/shutdown -r now


then :

Code: Select all
sudo apt-get install --reinstall linux-headers-amd64
sudo update-initramfs -u
sudo update-grub
/sbin/shutdown -r now


It's only when i install linux-headers for my current version (of kernel) that debian can't boot. I can install VirtualBox (even if it doesn't work after), or Vagrant.


My sources.list

Code: Select all
# FR
deb http://ftp.fr.debian.org/debian/ stretch main contrib non-free
# deb-src http://ftp.fr.debian.org/debian/ stretch main contrib non-free

deb http://security.debian.org/debian-security stretch/updates main contrib non-free
# deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free

# stretch-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ stretch-updates main contrib non-free
# deb-src http://ftp.fr.debian.org/debian/ stretch-updates main contrib non-free

# Debian stretch depot principal

deb http://deb.debian.org/debian/ stretch main contrib non-free
# deb-src http://deb.debian.org/debian/ stretch main contrib non-free

#Autres sources

deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
deb http://https://ftp.igh.cnrs.fr/pub/CRAN//bin/linux/debian stretch-cran34/
deb http://qgis.org/debian-ltr stretch main
# deb-src http://qgis.org/debian-ltr stretch main

#VirtualBox
deb https://download.virtualbox.org/virtualbox/debian stretch contrib
deb http://download.virtualbox.org/virtualbox/debian stretch contrib
# deb-src http://download.virtualbox.org/virtualbox/debian stretch contrib


(And i'm sorry for my english, used to read but not write :) )
Lost_in_Debian
 
Posts: 1
Joined: 2018-03-14 11:23

Re: Linux-headers issues

Postby milomak » 2018-03-23 20:46

so yu say it freezes?

does that mean the screen stays showing the last view?

it goes blank and you have to wait?

if you move the mouse it stays in the same position?

and if you remove virtualbox and linux-headers your computer reboots without any of these problems?
iMac - MacOS and Windows 10 (Bootcamp)/ Debian Sid (External SSD)
Laptop (64-bit) - Debian Sid, Win10,
Kodi Box - Debian Sid
milomak
 
Posts: 1689
Joined: 2009-06-09 22:20

Re: Linux-headers issues

Postby Head_on_a_Stick » 2018-03-23 20:59

I won't support VirtualBox but the best way to get the correct headers is
Code: Select all
# apt install module-assistant
# m-a prepare

And you need the kernel metapackage, running an outdated kernel is not a good idea.
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 7413
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable