Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix and simplify example lsinitrd command #240

Merged
merged 1 commit into from May 13, 2022
Merged

fix and simplify example lsinitrd command #240

merged 1 commit into from May 13, 2022

Conversation

bugfood
Copy link
Contributor

@bugfood bugfood commented Apr 23, 2022

The original command prints:

[dev: root@dcoreytest02 ~]# lsinitrd -f kernel/x86/microcode/GenuineIntel.bin $(/boot/initramfs-*.img|sort -n|tail -n 1) | iucode_tool -t b -l -
-bash: /boot/initramfs-4.18.0-348.20.1.el8_5.x86_64.img: Permission denied
microcode bundle 1: (stdin)
selected microcodes:
  001/001: sig 0x000906e9, pf_mask 0x2a, 2019-04-01, rev 0x00b4, size 99328

Note the error: bash is trying to execute the initramfs file. The output
is correct anyway because lsinitrd automatically defaults to the correct
initramfs file for the running kernel. Thus, there is no need to specify
the file at all.

[dev: root@dcoreytest02 ~]# lsinitrd -f kernel/x86/microcode/GenuineIntel.bin | iucode_tool -t b -l -
microcode bundle 1: (stdin)
selected microcodes:
  001/001: sig 0x000906e9, pf_mask 0x2a, 2019-04-01, rev 0x00b4, size 99328

This is tested on CentOS 6.10, 7.2, 7.4, 7.8, 7.9, and Alma 8.5.

On CentOS 6.10, this should work (I don't have the other components, but
lsinitrd works).

On CentOS 6.5, lsinitrd does not accept arguments, so neither the old
command nor the new command will work.

The original command prints:
```
[dev: root@dcoreytest02 ~]# lsinitrd -f kernel/x86/microcode/GenuineIntel.bin $(/boot/initramfs-*.img|sort -n|tail -n 1) | iucode_tool -t b -l -
-bash: /boot/initramfs-4.18.0-348.20.1.el8_5.x86_64.img: Permission denied
microcode bundle 1: (stdin)
selected microcodes:
  001/001: sig 0x000906e9, pf_mask 0x2a, 2019-04-01, rev 0x00b4, size 99328
```

Note the error: bash is trying to execute the initramfs file. The output
is correct anyway because lsinitrd automatically defaults to the correct
initramfs file for the running kernel. Thus, there is no need to specify
the file at all.

```
[dev: root@dcoreytest02 ~]# lsinitrd -f kernel/x86/microcode/GenuineIntel.bin | iucode_tool -t b -l -
microcode bundle 1: (stdin)
selected microcodes:
  001/001: sig 0x000906e9, pf_mask 0x2a, 2019-04-01, rev 0x00b4, size 99328
```

This is tested on CentOS 6.10, 7.2, 7.4, 7.8, 7.9, and Alma 8.5.

On CentOS 6.10, this should work (I don't have the other components, but
lsinitrd works).

On CentOS 6.5, lsinitrd does not accept arguments, so neither the old
command nor the new command will work.
@liske liske added the bug label May 13, 2022
@liske liske added this to the v3.6 milestone May 13, 2022
@liske liske merged commit c121661 into liske:master May 13, 2022
@liske
Copy link
Owner

liske commented May 13, 2022

Thanks :-)

@bugfood
Copy link
Contributor Author

bugfood commented May 13, 2022

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants