LinuxQuestions.org
Visit Jeremy's Blog.
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 01-10-2018, 11:45 AM   #46
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512

Quote:
Originally Posted by mralk3 View Post
The simplest way to append the microcode to an initrd is to use the /etc/mkinitrd.conf. My previous post, (post #4 of this thread) simplifies the process by far. I think that this method should be the recommended way to apply the microcode to a initrd because its the simplest and most fool proof method for newbies and advanced users alike. However, I do realize everyone has their own way of doing things but something is getting lost in translation. Remember, K.I.S.S. principle.

Using the 'cat' command isn't necessary to do any of this. Pat and team simplified the process for us with the mkinitrd.conf. A wrapper script for mkinitrd_command_generator.sh isn't necessary either if you use the mkinitrd.conf.
Very good points mralk3.

I set all this up before phenexia submitted the mkinitrd -P arg patch https://www.linuxquestions.org/quest...6/#post5727883 and before it was released for Slackware 14.2.

And then I wasn't aware of the /etc/mkinitrd.conf file.

It's time for me to retire the old scripts I wrote and get with the program ( or at least keep them to myself ).

Thanks !

-- kjh
 
1 members found this post helpful.
Old 01-10-2018, 12:04 PM   #47
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Originally Posted by kjhambrick View Post
Very good points mralk3.

..snip..

It's time for me to retire the old scripts I wrote and get with the program ( or at least keep them to myself ).
Yeah I wasn't trying to rain on anyone's parade.

I would also like to point out that SBo has pushed an update out for this week early which includes the latest intel microcode:

https://git.slackbuilds.org/slackbui...74064919242c48
 
1 members found this post helpful.
Old 01-10-2018, 12:31 PM   #48
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

Rep: Reputation: Disabled
Quote:
Originally Posted by kjhambrick View Post
Very good points mralk3.

I set all this up before phenexia submitted the mkinitrd -P arg patch https://www.linuxquestions.org/quest...6/#post5727883 and before it was released for Slackware 14.2.

And then I wasn't aware of the /etc/mkinitrd.conf file.

It's time for me to retire the old scripts I wrote and get with the program ( or at least keep them to myself ).

Thanks !

-- kjh
Thanks, but neither method works for me. I've installed the 2 necessary packages. The file DoNOT end up in the /boot/ directory.
Code:
[root@darkstar:~] # ls -la /boot/intel-ucode.cpio
ls: cannot access '/boot/intel-ucode.cpio': No such file or directory
 
Old 01-10-2018, 12:47 PM   #49
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by PROBLEMCHYLD View Post
Thanks, but neither method works for me. I've installed the 2 necessary packages. The file DoNOT end up in the /boot/ directory.
Code:
[root@darkstar:~] # ls -la /boot/intel-ucode.cpio
ls: cannot access '/boot/intel-ucode.cpio': No such file or directory
Odd ...

What do you see if you type the following command ?

Code:
# ls -lartd /var/log/packages/{iucode_tool,intel-microcode}*
-- kjh

Here's mine:

Code:
# ls -lartd /var/log/packages/{iucode_tool,intel-microcode}*

-rw-r--r-- 1 root root 1229 Sep 11 07:03 /var/log/packages/iucode_tool-2.2-x86_64-1_SBo
-rw-r--r-- 1 root root 4209 Jan 10 06:25 /var/log/packages/intel-microcode-20180108-noarch-1_SBo
 
Old 01-10-2018, 12:49 PM   #50
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Originally Posted by PROBLEMCHYLD View Post
Thanks, but neither method works for me. I've installed the 2 necessary packages. The file DoNOT end up in the /boot/ directory.
Code:
[root@darkstar:~] # ls -la /boot/intel-ucode.cpio
ls: cannot access '/boot/intel-ucode.cpio': No such file or directory
If you install intel-microcode before you install iucode_tool, then /boot/intel-ucode.cpio will not exist. Install first iucode_tool, and following that, install intel-microcode.

The relevant part in the intel-microcode SlackBuild is:

Code:
mkdir -p $PKG/lib/firmware
cp -a microcode.dat $PKG/lib/firmware

if [ -x /usr/sbin/iucode_tool ]; then
  mkdir -p $PKG/lib/firmware/intel-ucode
  /usr/sbin/iucode_tool -v --list-all -K$PKG/lib/firmware/intel-ucode microcode.dat
  mkdir -p $PKG/boot
  /usr/sbin/iucode_tool -v --write-earlyfw=$PKG/boot/intel-ucode.cpio microcode.dat
fi
If you do it in the wrong order, the file in /boot will not be present.
 
1 members found this post helpful.
Old 01-10-2018, 12:53 PM   #51
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
One advantage of making the cpio image file from processor microcode file is that you end up with ramfs file having size ~24k, so much less compared to the file with 1.5M size that iucode_tool produces using the microcode.dat file
 
1 members found this post helpful.
Old 01-10-2018, 01:15 PM   #52
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Quote:
Originally Posted by keefaz View Post
One advantage of making the cpio image file from processor microcode file is that you end up with ramfs file having size ~24k, so much less compared to the file with 1.5M size that iucode_tool produces using the microcode.dat file
The initrd's allocated memory is usually discarded after switching the root. So, does not matter even the iucode_tool produce a 15MB sized thing.

Anyway, both sizes are laughable considering your capitalist sizes of memories, I heard that around 64GB is a minimum and the greedy ones go 256GB.
 
Old 01-10-2018, 01:32 PM   #53
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by Darth Vader View Post
The initrd's allocated memory is usually discarded after switching the root. So, does not matter even the iucode_tool produce a 15MB sized thing.

Anyway, both sizes are laughable considering your capitalist sizes of memories, I heard that around 64GB is a minimum and the greedy ones go 256GB.
Yes true, but it 's nice thing to be able to tailor it with just what your processor needs and not with useless code for other processors.
I admit I like to tailor kernel too...
 
Old 01-10-2018, 01:49 PM   #54
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Quote:
Originally Posted by keefaz View Post
One advantage of making the cpio image file from processor microcode file is that you end up with ramfs file having size ~24k, so much less compared to the file with 1.5M size that iucode_tool produces using the microcode.dat file
iucode_tool -S option will do that for you. No need to manually figure out which file you need to use:
/usr/sbin/iucode_tool -S --write-earlyfw=intel-ucode-local.cpio /lib/firmware/intel-ucode/


I remove the obsolete microcode.dat file from the package when I build it.
 
3 members found this post helpful.
Old 01-10-2018, 01:49 PM   #55
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Quote:
Originally Posted by keefaz View Post
Yes true, but it 's nice thing to be able to tailor it with just what your processor needs and not with useless code for other processors.
I admit I like to tailor kernel too...
Well, if we talk about the noble art of tailoring, is entirely another story.
 
Old 01-10-2018, 01:57 PM   #56
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

Rep: Reputation: Disabled
Followed the instructions, got it installed but no update displayed.

[root@darkstar:~] # dmesg | grep microcode
[ 1.217312] microcode: sig=0x6fd, pf=0x80, revision=0xa3
[ 1.220744] microcode: Microcode Update Driver: v2.2.
[root@darkstar:~] # ls -la /boot/intel-ucode.cpio
-rw-r--r-- 1 root root 1614848 Jan 10 13:44 /boot/intel-ucode.cpio
[root@darkstar:~] #

[root@darkstar:~] # dmesg | grep microcode
[ 1.214176] microcode: sig=0x6fd, pf=0x80, revision=0xa3
[ 1.222656] microcode: Microcode Update Driver: v2.2.
[root@darkstar:~] # echo 1 > /sys/devices/system/cpu/microcode/reload
[root@darkstar:~] # dmesg | grep microcode
[ 1.214176] microcode: sig=0x6fd, pf=0x80, revision=0xa3
[ 1.222656] microcode: Microcode Update Driver: v2.2.
[ 87.288700] microcode: updated to revision 0xa4, date = 2010-10-02
[root@darkstar:~] #

Last edited by PROBLEMCHYLD; 01-10-2018 at 02:06 PM.
 
Old 01-10-2018, 02:06 PM   #57
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,008

Rep: Reputation: Disabled
Quote:
Originally Posted by PROBLEMCHYLD View Post
Thanks, but neither method works for me. I've installed the 2 necessary packages. The file DoNOT end up in the /boot/ directory.
Code:
[root@darkstar:~] # ls -la /boot/intel-ucode.cpio
ls: cannot access '/boot/intel-ucode.cpio': No such file or directory
I assume that you have downloaded
http://downloadmirror.intel.com/2743...e-20180108.tgz
once unpacked
cd to /boot
and run
sudo iucode_tool -S --write-earlyfw=intel-ucode.cpio path-to/microcode-20180108/intel-ucode/*

this will generate /boot/intel-ucode.cpio (or whatever you name it)

now you can prepend this to initrd (if you are using initrd - I don't) as described here
https://www.linuxquestions.org/quest...6/#post5727883

if you do not use initrd, then as long as your kernel config file has initrd support enabled, just add initrd info to lilo.conf or grub
 
Old 01-10-2018, 02:24 PM   #58
bamunds
Member
 
Registered: Sep 2013
Location: Mounds View MN
Distribution: Slackware64-14.2-Multilib XDM/FVWM3
Posts: 780

Original Poster
Rep: Reputation: 260Reputation: 260Reputation: 260
First I personally want to thank all the LQ Senior guru's who've contributed to this thread. THANK YOU!
Second I want to answer earlier questions asked about my install.

The following are the stanza's from my lilo.conf:
Code:
# Linux bootable partition config begins
image = /boot/vmlinuz-custom-4.4.110
 initrd = /boot/initrd-custom-4.4.110_ucode.gz
 root = /dev/cryptvg/root
 label = Slak44110+
 read-only
image = /boot/vmlinuz-custom-4.4.110
 initrd = /boot/initrd-custom-4.4.110.gz
 root = /dev/cryptvg/root
 label = Slack44110
 read-only
image = /boot/vmlinuz-generic-4.4.88
 initrd = /boot/initrd-4.4.88.gz
 root = /dev/cryptvg/root
 label = Slackware
 read-only
# Linux bootable partition config ends
You can see that I've got two initrd's for the 4.4.110 kernel, one with the microcode. This is on a LVM/LUKS Slackware64 14.2 multilib install.

To run in forward sequence the steps taken
1. sboinstall iucode_tool from SBo
2. pulled the SBo of intel-microcode. Modified with emacs to point to 20180108 Intel file and then build and upgradepkg, since previously had sboinstall intel-microcode which used 20171117.
3. verified date/time of /boot/intel-ucode.cpio was same as build date/time of the intel-microcode run in previous step.
4. cat /boot/intel-ucode.cpio /boot/initrd-custom-4.4.110.gz > /boot/initrd-custom-4.4.110_ucode.gz
5. using emacs modified lilo.conf to add proper stanza pointing to /boot/initrd-custom-4.4.110_ucode.gz
6. execute lilo and confirmed output of Slak44110+ is added and no error codes generated.
7. rebooted

Here are the ls commands for showing the tools installed.
Code:
root@Hicrest1:~# ls -la /var/log/packages | grep ucode
-rw-r--r--  1 root root    1224 Jan  5 17:10 iucode_tool-2.2-x86_64-1_SBo
root@Hicrest1:~# ls -la /var/log/packages | grep intel
-rw-r--r--  1 root root    4953 Dec 19 14:55 intel-gpu-tools-1.9-x86_64-2
-rw-r--r--  1 root root    4206 Jan  9 19:52 intel-microcode-20180108-noarch-1_SBo
-rw-r--r--  1 root root    1038 Dec 19 14:55 libva-intel-driver-1.6.2-x86_64-1
-rw-r--r--  1 root root    1125 Dec 23 21:09 libva-intel-driver-compat32-1.6.2-x86_64-1compat32
-rw-r--r--  1 root root    1594 Dec 19 14:56 xf86-video-intel-git_20160601_b617f80-x86_64-1
However this is the output of dmesg
Code:
root@Hicrest1:~# dmesg | grep micro 
[    0.643628] microcode: CPU0 sig=0xf47, pf=0x10, revision=0x3
[    0.643763] microcode: CPU1 sig=0xf47, pf=0x10, revision=0x3
[    0.643945] microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
root@Hicrest1:~# lscpu | grep "Model name"
Model name:            Intel(R) Pentium(R) D CPU 2.80GHz
root@Hicrest1:~# dmesg -t |grep -m1 microcode
microcode: CPU0 sig=0xf47, pf=0x10, revision=0x3
root@Hicrest1:~#  ls -la /lib/firmware/intel-ucode/0f-04-07
-rw-r--r-- 1 root root 3072 Jan  9 19:50 /lib/firmware/intel-ucode/0f-04-07
This is reflecting the original ucode level that was present before the intel-microcode SBo install.

So I'm thinking that nothing was loaded. But maybe this simply indicates that no revisions are available to that CPU processor which would be consistent with Intel's statement that only CPU's from past five years will be available this week and all other processors hopefully by end of January.

Any other ideas?
 
Old 01-10-2018, 02:35 PM   #59
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Yep, looks like nothing is loaded.

BUT, you are pretty sure you have an microcode update for your particular processor, in that fresh Intel release?
 
Old 01-10-2018, 02:58 PM   #60
bamunds
Member
 
Registered: Sep 2013
Location: Mounds View MN
Distribution: Slackware64-14.2-Multilib XDM/FVWM3
Posts: 780

Original Poster
Rep: Reputation: 260Reputation: 260Reputation: 260
Quote:
Originally Posted by mralk3 View Post
The simplest way to append the microcode to an initrd is to use the /etc/mkinitrd.conf. My previous post, (post #4 of this thread) simplifies the process by far. I think that this method should be the recommended way to apply the microcode to a initrd because its the simplest and most fool proof method for newbies and advanced users alike. However, I do realize everyone has their own way of doing things but something is getting lost in translation. Remember, K.I.S.S. principle.

Using the 'cat' command isn't necessary to do any of this. Pat and team simplified the process for us with the mkinitrd.conf. A wrapper script for mkinitrd_command_generator.sh isn't necessary either if you use the mkinitrd.conf.
I agree with you, using the mkinitrd.conf file seems like the right way to do this. Just look at the steps I went through, but the mkinitrd still only works if you've used the intel-microcode slackbuild and have the /boot/intel-ucode.cpio. Also I've always used AlienBob's initrd generator script so I can add the LVM/LUKS, hibernation swap flag and have multiple initrd's in order to fall back if the new one fails. So I have to try the suggestion and see if it produces a different result.
 
  


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
[SOLVED] Is it possible to update intel microcode using kernel-huge and grub2, without initrd? lagavulin16 Slackware 5 01-03-2018 09:27 AM
intel-microcode-20170707 kjhambrick Slackware 1 07-15-2017 08:04 AM
Lenovo Thinkpad x220 - Proprietary Driver for Microcode for Intel processor? wh33t Linux - Hardware 2 06-15-2016 11:41 AM
intel-microcode error Soapm Linux - Newbie 3 06-25-2015 01:37 AM
Intel IA32 CPU microcode...What is it Jester888 Linux - General 1 02-08-2007 11:30 PM

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

All times are GMT -5. The time now is 04:54 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