LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-17-2022, 08:10 PM   #16
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479

Quote:
Originally Posted by SlackIT View Post
I overlooked this reply, can anyone please tell me, that I then make the mkinitrd line like this as an example now?

mkinitrd -c -k -P 5.15.38 -f ext4 -r /dev/sda1 -m ext4 -u -o /boot/initrd.gz

THANKS
You need to keep the kernel version after the '-k' and add the .img file name after the '-P'.
Code:
mkinitrd -c -k 5.15.38 -P /boot/amd-ucode.img -f ext4 -r /dev/sda1 -m ext4 -u -o /boot/initrd.gz
That assumes your .img file is in /boot.
 
Old 08-17-2022, 10:05 PM   #17
SlackIT
Member
 
Registered: Mar 2022
Posts: 172

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Chuck56 View Post
You need to keep the kernel version after the '-k' and add the .img file name after the '-P'.
Code:
mkinitrd -c -k 5.15.38 -P /boot/amd-ucode.img -f ext4 -r /dev/sda1 -m ext4 -u -o /boot/initrd.gz
That assumes your .img file is in /boot.

So do I need mkinitrd -P as well as editing the mkinitrd.conf?

This is my mkinitrd.conf
Code:
SOURCE_TREE="/boot/initrd-tree"
OUTPUT_IMAGE="/boot/initrd.gz"
KERNEL_VERSION="$(uname -r)"
KEYMAP="us"
MODULE_LIST="ext4"
ROOTDEV="/dev/sda1"
ROOTFS="ext4"
UDEV="1"
MICROCODE_ARCH="/boot/amd-ucode.img"
WAIT="1"
THANKS
 
Old 08-17-2022, 10:34 PM   #18
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by SlackIT View Post
So do I need mkinitrd -P as well as editing the mkinitrd.conf?
You're mixing 2 different methods of the mkinitrd command.

Method1: command line (doesn't use the config file)
mkinitrd -c -k 5.15.38 -P /boot/amd-ucode.img -f ext4 -r /dev/sda1 -m ext4 -u -o /boot/initrd.gz

Method 2: config file (-F defaults to /etc/mkinitrd.conf)
mkinitrd -F -k 5.15.38

In the config file method, your config file uses the running kernel: KERNEL_VERSION="$(uname -r)". The '-k 5.15.38' option overrides that setting.

see:
man mkinitrd
man mkinitrd.conf

Hope that helps!
 
Old 08-18-2022, 01:24 AM   #19
SlackIT
Member
 
Registered: Mar 2022
Posts: 172

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Chuck56 View Post
You're mixing 2 different methods of the mkinitrd command.

Method1: command line (doesn't use the config file)
mkinitrd -c -k 5.15.38 -P /boot/amd-ucode.img -f ext4 -r /dev/sda1 -m ext4 -u -o /boot/initrd.gz

Method 2: config file (-F defaults to /etc/mkinitrd.conf)
mkinitrd -F -k 5.15.38

In the config file method, your config file uses the running kernel: KERNEL_VERSION="$(uname -r)". The '-k 5.15.38' option overrides that setting.

see:
man mkinitrd
man mkinitrd.conf

Hope that helps!
Ok, I want to use the config, so I'll use;
Code:
mkinitrd -c -F -k 5.19.2 -f ext4 -r /dev/sda1 -m ext4 -u -o /boot/initrd.gz
THANKS

Last edited by SlackIT; 08-18-2022 at 01:36 AM.
 
Old 08-18-2022, 02:35 AM   #20
SlackIT
Member
 
Registered: Mar 2022
Posts: 172

Original Poster
Rep: Reputation: 17
Looking at the logs I do not see the amd microcode loading early, more like late, around line 600, closer towards the bottom of the logs.

Here is shows it's loading in messages at line 579.

https://dpaste.com/ELQHZUBPT

When I used an i7 before, the microcode would always show loaded at the top of the logs, the first few lines, I assumed AMD would also show the microcode loading at the first few lines in the logs... hmm :/

I have everything correct in the kernel, for the options compiled in.
Code:
CONFIG_BLK_DEV_INITRD=Y
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=Y
CONFIG_MICROCODE_AMD=y
I'm running;
Code:
mkinitrd -c -F -k 5.15.38 -f ext4 -r /dev/sda1 -m ext4 -u -o /boot/initrd.gz
This is the contents of my /etc/mkinitrd.conf;
Code:
SOURCE_TREE="/boot/initrd-tree"
OUTPUT_IMAGE="/boot/initrd.gz"
KERNEL_VERSION="$(uname -r)"
KEYMAP="us"
MODULE_LIST="ext4"
ROOTDEV="/dev/sda1"
ROOTFS="ext4"
UDEV="1"
MICROCODE_ARCH="/boot/amd-ucode.img"
WAIT="1"
I use grub, so I also run;
Code:
grub-mkconfig -o /boot/grub/grub.cfg

Last edited by SlackIT; 08-18-2022 at 02:43 AM.
 
Old 08-19-2022, 05:31 PM   #21
SlackIT
Member
 
Registered: Mar 2022
Posts: 172

Original Poster
Rep: Reputation: 17
I don't understand why in the logs the microcode shows around the 600th line, but when I'm booting up slack seeing the console go by, the microcode load appears more like at the top, only 1/4 of the way down.

I need help here, to understand if this is properly loading early? I have no idea at this point in time, all I know is it doesn't load as early as the Intel Microcode, which would appear at the very top of the logs.


TIA
 
Old 08-19-2022, 07:01 PM   #22
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
The kernel controls when it reads the microcode. For both Intel & AMD early loading is done when the microcode is in the initrd.

https://www.kernel.org/doc/html/late...microcode.html

The Intel, AMD and the various family of CPUs do not load or log microcode the same. Using the log line numbers is not a reliable way to track early loading.

My AMD Ryzen 5 5600G doesn't show microcode in dmesg until after line 700. That's with either grub or elilo and the microcode in the initrd.
 
Old 08-19-2022, 07:36 PM   #23
SlackIT
Member
 
Registered: Mar 2022
Posts: 172

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Chuck56 View Post
The kernel controls when it reads the microcode. For both Intel & AMD early loading is done when the microcode is in the initrd.

https://www.kernel.org/doc/html/late...microcode.html

The Intel, AMD and the various family of CPUs do not load or log microcode the same. Using the log line numbers is not a reliable way to track early loading.

My AMD Ryzen 5 5600G doesn't show microcode in dmesg until after line 700. That's with either grub or elilo and the microcode in the initrd.

Ok...

Well as I mentioned earlier, I did;
Code:
mkinitrd -c -F -k 5.19.2 -f ext4 -r /dev/sda1 -m ext4 -u -o /boot/initrd.gz
And my /etc/mkinitrd.conf
Code:
SOURCE_TREE="/boot/initrd-tree"
OUTPUT_IMAGE="/boot/initrd.gz"
KERNEL_VERSION="$(uname -r)"
KEYMAP="us"
MODULE_LIST="ext4"
ROOTDEV="/dev/sda1"
ROOTFS="ext4"
UDEV="1"
MICROCODE_ARCH="/boot/amd-ucode.img"
WAIT="1"
I guess as far as I can tell, I'm good to go then?

But, Grub has GRUB_EARLY_INITRD_LINUX_CUSTOM, but I'm not sure it's really necessary.

https://www.gnu.org/software/grub/ma...iguration.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AMD microcode/ucode update for Slackware 14.2? obobskivich Slackware 8 07-15-2020 07:09 PM
Apply new Intel microcode- no microcode.dat file Naks110 Linux - Kernel 2 06-12-2018 05:20 PM
[SOLVED] Linux-4.8-rc2 fails reading AMD microcode, /boot/amd-ucode.cpio aaazen Linux - Kernel 1 08-22-2016 08:33 AM
cpio -idcmv command hanged while extracting .cpio command ravindra.atre Linux - General 2 08-22-2011 04:10 AM
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 01:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration