Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian9 freezes/no video during/after installation

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
k78txf
Posts: 1
Joined: 2017-09-06 12:57

Debian9 freezes/no video during/after installation

#1 Post by k78txf »

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.

Post Reply