Debian9 freezes/no video during/after installation

Share your own howto's etc. Not for support questions!

Debian9 freezes/no video during/after installation

Postby k78txf » 2017-09-06 13:07

After an update to Linux kernel 4.9, I have experienced a freeze / black screen or no video, during / after installation on less recent hardware.

This is due to manufacturers actively 'supporting' the Linux kernel mode drivers in such a way that they decide what to support. You will find some grub parameters you might use, are ignored and loading the drivers results in a freeze or no video, forcing you to buy new up-to-date hardware, unless..

You have a way to blacklist certain drivers (pc-speaker used here as example), or to give a directive to temporarily or permanently disable all kernel mode drivers except for the drivers that Linux cannot do without (I have seen it go down from 112 to 37 modules).

Boot into rescue mode, this can be done with any rescue CD/DVD/USB or with grub boot option:
systemd.unit=rescue.target

In rescue mode, mount your root filesystem, and:

vi /etc/modprobe.d/blacklist.conf
blacklist pcspkr
install * /bin/false

The wildcard 'install * /bin/false' can be a quick test to see if there are drivers blocking normal operation.
That should fix the boot problem and help to overcome non-functioning grub directives to switch off functions in proprietary drivers from hardware manufacturers (why are they loaded anyway, in case of a server installation).
Reboot and check with 'lsmod' and 'lsmod | wc -l' to see which and how many drivers are loaded.

Except now you will find you also miss drivers you need, such as I/O controller drivers.
If you suspect that, for example, the problem is a GPU DRM Video driver, you can simply blacklist them all and if you want, try to load them by hand after boot (be sure to remove the previous 'install * /bin/false' line, after adding them):

for a in `ls -1 /lib/modules/*/kernel/drivers/gpu/drm/ | sed -e 's/\.ko//'` ; do echo "blacklist $a" >> /etc/modprobe.d/blacklist.conf; done

If you find that a hardware manufacturer still doesn't listen to this 'blacklist' directive, then you can apply the same method, except this time setting 'install' to '/bin/false':

for a in `ls -1 /lib/modules/*/kernel/drivers/gpu/drm/ | sed -e 's/\.ko//'` ; do echo "install $a /bin/false" >> /etc/modprobe.d/blacklist.conf; done


Further grub settings you can try:

vi /etc/default/grub
GRUB_TERMINAL=console
GRUB_CMDLINE_LINUX="text"
GRUB_CMDLINE_LINUX_DEFAULT=nomodeset i915.modeset=0 nouveau.modeset=0"

Extra grub cmdline directives in case you have a very old onboard graphics adapter:

gfxpayload=text
nofb
skipddc

Extra grub cmdline directive in case Debian halts while trying to boot from an old non-bootable raidset:

raid=noautodetect

Extra grub cmdline directives to switch off modern hardware calls:

hpet=force
edd=off
acpi=noirq
acpi=off
numa=off
nousb
noapic
nofirewire
nodma
noide
nompath
noparport
nopcmcia
noprobe
noscsi
nousb

Alternatively you can force the kernel init to not change the video mode and redirect output to a serial tty connection:

vi /etc/init/tty1.conf
respawn
exec /sbin/getty -8 38400 --noclear tty1

vi /etc/default/grub
GRUB_CMDLINE_LINUX="text console=tty1"


Finally, generate the grub config:

update-grub

Choose 'Do not change the boot/kernel font':

dpkg-reconfigure console-setup

Enjoy a fast, but above all, working Linux server on any hardware of your choice.
Please leave a message to tell me if this fixed your problem and which driver was blocking your system, or if you have further suggestions.
k78txf
 
Posts: 1
Joined: 2017-09-06 12:57

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable
cron