You are not logged in.
Pages: 1
I run a bootloaderless setup (EFISTUB) with systemd services updating mount points as described here > https://wiki.archlinux.org/index.php/EF … ng_systemd
When i installed the intel-ucode package the .img file was copied to boot.
So the question is how do i handle the ucode updates??
Do i just add something like ExecStart=/usr/bin/cp -f /boot/intel-ucode.img $esp/EFI/arch/intel-ucode.img in the service so it will be copied after each kernel update.
Or i have to handle it another way in case ucode updates are not done in parallel with the kernel?
Offline
I'm not sure I understand. A new version of this package should also be copied to boot. Why do you want to update it after a kernel update?
Offline
Because with my bootloader you have to read intel-ucode.img from /EFI/arch. It didn't work when trying to load it from /boot.
If ucode is updated with each kernel i can copy it along the other files. If it is updated on different times i have to do it another way. (with a systemd service maybe???).
Offline
Boy, you are out in the scary corners of the flight envelope.
I don't use EFI, so this is a complete WAG (1):
# efibootmgr -d /dev/sdX -p Y -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/sdaY rw initrd=\"/intel-ucode.img /initramfs-linux.img\""
YYMV.
(1) Wild Ass Guess
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Boy, you are out in the scary corners of the flight envelope.
I don't use EFI, so this is a complete WAG (1):
# efibootmgr -d /dev/sdX -p Y -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/sdaY rw initrd=\"/intel-ucode.img /initramfs-linux.img\""YYMV.
(1) Wild Ass Guess
It is not what i am asking. The scary parts (looks worst than what you posted) are already done. My boot works already.
The handling of the ucode update is what i am asking about.
Last edited by 89c51 (2014-10-29 19:06:04)
Offline
Thought the problem was that you could not apply the cpu microcode to the CPUs. Are you able to apply the microcode at all?
I ask, because, at least in GRUB, you need two RAM disk images that get passed to the kernel loaded at boot. The wiki showed how to set up one.
Is the question then, how to migrate the microcode back to the EFI directory automatically? I guess I am a bit lost.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Microcode applies just fine as it seems
journalctl -k| grep microcode
Oct 29 17:25:16 mainland kernel: CPU0 microcode updated early to revision 0x1b, date = 2014-05-29
Oct 29 17:25:16 mainland kernel: CPU1 microcode updated early to revision 0x1b, date = 2014-05-29
Oct 29 17:25:16 mainland kernel: CPU2 microcode updated early to revision 0x1b, date = 2014-05-29
Oct 29 17:25:16 mainland kernel: CPU3 microcode updated early to revision 0x1b, date = 2014-05-29
Oct 29 17:25:16 mainland kernel: microcode: CPU0 sig=0x306a9, pf=0x2, revision=0x1b
Oct 29 17:25:16 mainland kernel: microcode: CPU1 sig=0x306a9, pf=0x2, revision=0x1b
Oct 29 17:25:16 mainland kernel: microcode: CPU2 sig=0x306a9, pf=0x2, revision=0x1b
Oct 29 17:25:16 mainland kernel: microcode: CPU3 sig=0x306a9, pf=0x2, revision=0x1b
Oct 29 17:25:16 mainland kernel: microcode: CPU4 sig=0x306a9, pf=0x2, revision=0x1b
Oct 29 17:25:16 mainland kernel: microcode: CPU5 sig=0x306a9, pf=0x2, revision=0x1b
Oct 29 17:25:16 mainland kernel: microcode: CPU6 sig=0x306a9, pf=0x2, revision=0x1b
Oct 29 17:25:16 mainland kernel: microcode: CPU7 sig=0x306a9, pf=0x2, revision=0x1b
Oct 29 17:25:16 mainland kernel: microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
And yes the question is exactly this. How to handle the copying of intel-ucode.img from /boot to /EFI/arch.
If the ucode updates with every kernel i can just stuff it in my systemd service. If not i can just create another service that will handle only that. I don't want to do it manually.
Offline
Yep, I misunderstood. Sorry about that.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Rather than after every kernel update, copy it after every intel-ucode update.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
If the ucode updates with every kernel i can just stuff it in my systemd service. If not i can just create another service that will handle only that. I don't want to do it manually.
Perhaps store the md5sum of /boot/intel-ucode.img in a file and check against it for the replacement. See the code for modprobed-db which does just that for a modules database. Your implementation would be a single file and much more simplistic. Or maybe you could parse pacman.log and only run the check on a grep hit for the package name. You have many options.
Last edited by graysky (2014-10-29 19:59:53)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Sooooo. I was thinking something like:
Create /etc/systemd/system/ucode-update.path
with
[Unit]
Description=Copy Intel Microcode to UEFISYS Partition
[Path]
PathChanged=/boot/intel-ucode.img
[Install]
WantedBy=multi-user.target
in it.
Then create /etc/systemd/system/ucode-update.service
with:
[Unit]
Description=Copy Intel Microcode to UEFISYS Partition
[Service]
Type=oneshot
ExecStart=/usr/bin/cp -f /boot/intel-ucode.img /boot/efi/EFI/arch/intel-ucode.img
then
systemctl enable ucode-update.path
Will this work?
Last edited by 89c51 (2014-10-29 20:10:15)
Offline
Never heard of .path files before. Why not try it and see with a dummy file.
EDIT: is your $esp always mounted?
Last edited by graysky (2014-10-29 20:14:07)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Something like the above works flawlessly for the last two years i set up the PC.
@graysky i suspect yes it's always mounted (or at least nothing failed thus far with a similar configuration for the initramfs)
Offline
Hi
I can confirm to you that these services work because that's how I practice with rEFInd.
intel_ucode_update.path
[Unit]
Description=Check update Microde intel-ucode
[Path]
PathChanged=/boot/intel-ucode.img
Unit=intel_ucode_update.service
[Install]
WantedBy=multi-user.target
intel_ucode_update.service
[Unit]
Description=Copy Microcode intel-ucode to UEFISYS Partition
[Service]
Type=oneshot
ExecStart=/usr/bin/cp -f /boot/intel-ucode.img /boot/efi/EFI/arch_1/intel-ucode.img
ExecStart=/usr/bin/cp -f /boot/intel-ucode.img /boot/efi/EFI/arch_1_ck/intel-ucode.img
$ cat /proc/cmdline
\EFI\arch_1_ck\vmlinuz-arch_1_ck.efi root=PARTUUID=665fca39-0246-467e-b74d-dadde7036567 rootfstype=ext4 rw add_efi_memmap systemd.unit=graphical.target elevator=bfq quiet initrd=EFI/arch_1_ck/intel-ucode.img initrd=EFI/arch_1_ck/initramfs-arch_1_ck.img
A+
Offline
Pages: 1