Kernel panic installing Centos 8 on AMD laptop

Issues related to applications and software problems and general support
Post Reply
enwe
Posts: 1
Joined: 2019/12/11 14:28:17

Kernel panic installing Centos 8 on AMD laptop

Post by enwe » 2019/12/11 14:37:14

Hi!

Trying to install Centos 8 on Lenovo AMD Ryzen laptop (T495), getting a kernel panic before any real installation starts. Had same result on previous machine with (HP envy x360 with Ryzen) and Centos 7.

Tried all possible BIOS options that I could think of. Ubuntu, both 16.04 and 18.04 installing and working fine on botch machines.

We are using Centos (7) on many servers and desktops, all AMD based without issues at all. Only the laptops are problematic. Easy solution is Ubuntu but standardizing on single OS/distro preferred.

Thanks for help,
EW

User avatar
TrevorH
Forum Moderator
Posts: 29112
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Kernel panic installing Centos 8 on AMD laptop

Post by TrevorH » 2019/12/12 00:58:23

CentOS 8.1 will be along soonish though it could still be weeks before the installable iso images are available. If you register for the free Red Hat Developer account that includes a free development license for RHEL and you could use that to test if things are better.

Also, more information about what panic might also help since it could be many things. Hit e or tab to edit the Install option and remove quiet from the command line and boot in verbose mode.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
WhatsHisName
Posts: 1547
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: Kernel panic installing Centos 8 on AMD laptop

Post by WhatsHisName » 2019/12/12 02:45:05

Looking at how fast the hit counter is going up on this thread, there must be lots of people having a similar experience.

As compiled, the centos 8.0 kernel does not have high resolution support for the Vega graphics in the radeon or amdgpu drivers, which your system may be trying to use and may be the source of your issues. My suggestion is to try booting the installation image using the kernel option "nomodeset" to get a usable, but low resolution, gui for installation.

My centos 8 experience has been with an HP EliteBook 745 G6 running an AMD Ryzen 7 3700U cpu with Radeon Vega 10 graphics. Getting el8 installed was not pretty. I don't recall a kernel panic, but got lots of black screens after boot.

Currently running the latest elrepo kernel-ml in which amdgpu Southern Islands (SI) and Sea Islands (CIK) support have been enabled https://elrepo.org/bugs/view.php?id=971. Unfortunately, those features are not automatically available at boot without disabling their radeon support and enabling their amdgpu support using the kernel options:

Code: Select all

radeon.si_support=0 amdgpu.si_support=1 radeon.cik_support=0 amdgpu.cik_support=1
See comment 0006710 in the above bug report for more details about those options.

Please note that the el8 grub2 configuration deviates from past experience (understatement). In my case, I am booting EFI and those option go in /boot/efi/EFI/centos/grubenv. I suspect something similar exists for a ms-bios boot.

Even with the above changes, booting to a high resolution gui is inconsistent. Looking at dmesg from black screen boots, the problem starts with

Code: Select all

amdgpu 0000:04:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
It will eventually boot to a high resolution gui about one out of three tries. Not a great way to live life. :-)

I anticipate that this will improve as the el8 matures. Maybe el8.1 will do the trick.

Hope that helps.

User avatar
WhatsHisName
Posts: 1547
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: Kernel panic installing Centos 8 on AMD laptop

Post by WhatsHisName » 2019/12/15 02:16:32

Update:

Because I decided to luks encrypt the drive, I needed to start with a clean drive and revisit the entire installation process. Left out in my first description was the need to update the linux-firmware in addition to installing kernel-ml, both from elrepo, to get the Vega graphics to work. Critical omission. Still, it only boots to high resoluton gui about one out of three times, but 1 out of 3 is always better than 0 out of 10. :-)

Here is what you can do:

0) Make sure during the installation process that you enable the network to be available at startup.

1) Boot to cli by adding "nomodeset 3" to the kernel boot options:

- At the starting grub menu, stop the grub countdown by typing "e" (edit)

- Edit the end of the kernel command: Remove "rhgb quiet" and Add "nomodeset 3" (boot to CLI)

- Enter [Ctrl]x to boot (see instructions at the bottom of the Grub boot screen)

2) After the boot finishes, you should have CLI with a login prompt:

- Log in and determine the IP (ifconfig or nmcli).

- You should be able to ssh into the system using the IP

3) From CLI or via ssh:

# dnf install elrepo-release

4) Update kernel firmware from elrepo (kernel-ml needs the latest linux-firmware for amdgpu support):

# dnf --disablerepo=\* --enablerepo=elrepo-extras update linux-firmware iwl\*

5) To automatically boot kernel-ml:

# vi /etc/sysconfig/kernel

and change DEFAULTKERNEL= from "kernel-core" to 'kernel-ml-core"

6) Install kernel-ml:

# dnf --disablerepo=\* --enablerepo=elrepo-kernel install kernel-ml

7) Modify the dnf installonlypkgs list:

Due to how el8 dnf interprets the installonlypkgs (i.e., kernel), kernel-ml will be updated, not installed, when you update it in the future. That means old versions of kernel-ml will be removed. Bad. This will be fixed soon, but for now, edit /etc/dnf/dnf.conf and add the line:

installonlypkgs=kernel-ml,kernel-ml-core

That will cause dnf to process kernel-ml the same way it processes the normal kernel when updating.


Comments:

A. If for any reason kernel-ml was installed before the linux-firmware update, then you will need to remake the kernel-ml initramfs to incorperate the new firmware into the initramfs image. Interpretive statement: Yes, I did it backwards the first time. :-)

( See dracut manpage. In general, it goes something like: dracut -v -f /boot/initramfs-<ver>.img <ver> or # dracut -v -f if you are running the target kernel).

Even simpler, you can always just remove kernel-ml and install it a second time to "fix" the initramfs image.


B. Remember to add "radeon.si_support=0 amdgpu.si_support=1 radeon.cik_support=0 amdgpu.cik_support=1" to the kernel boot options as described in the previous comment.


C. Using a luks-encrypted drive really made this hard to do. When booting kernel-ml, the graphics failure occurs before the luks passphrase is requested. At least with the standard centos kernel, you could get to the 'enter passphrase" step. So if you forgot to update the linux-firmware and add it to the initramfs image, then boot an old kernel (with nomodeset 3) and fix the problem.


D. Even then, my high resolution gui success rate is still only for one out of three boots. One early indication that you will get a high resolution desktop is that the frame buffer changes (i.e., you see a much finer font going by). When you see that, then you know you have a success on your hands!

Hope that is helpful.

Post Reply

Return to “CentOS 8 - General Support”