1
0
mirror of https://github.com/systemd/systemd synced 2025-10-02 18:24:46 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
keentux
3e14d02500 detect-virt: bare-metal GCE only for x86 and i386
From the previous changes, bare-metal support has been added by using
the `detect_vm_cpuid()` which works only for x86_64 and i386 architecture.
Do not use this change for other architectures to avoid wrong result of
the detect-virt tool.

Follow-up for fb71571d3a4efddeb44f02939304be9007301974.
Fixes #38125.
2025-08-13 21:16:19 +09:00
Antonio Alvarez Feijoo
13358b7ce2 bootctl: specify that kernel image commands require a kernel image argument 2025-08-13 11:28:22 +01:00
Yu Watanabe
5e4115e59e TEST-17-UDEV: rotate journal before checking
Otherwise, journal files may be rotated during checking journal entries
and the main system journal file may not be loaded:
```
[  350.372652] TEST-17-UDEV.sh[5841]: + test b253:2 = b253:2
[  350.373288] TEST-17-UDEV.sh[5841]: + [[ 1 == \1 ]]
[  350.373722] TEST-17-UDEV.sh[5841]: + journalctl -n 1 -q -u systemd-udevd.service --invocation=0 --grep 'Found inotify watch .*457'
[  350.374534] TEST-17-UDEV.sh[5970]: Journal file /run/log/journal/edc1fb58daff00ad89d6c8d9689bf172/system.journal is truncated, ignoring file.
[  350.375415] TEST-17-UDEV.sh[415]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-17-UDEV.watch.sh failed'
```

Fixes #38559.
2025-08-13 09:36:35 +01:00
4 changed files with 16 additions and 4 deletions

View File

@ -269,7 +269,7 @@
<variablelist>
<varlistentry>
<term><option>kernel-identify</option> <replaceable>kernel</replaceable></term>
<term><option>kernel-identify</option> <replaceable>KERNEL-IMAGE</replaceable></term>
<listitem><para>Takes a kernel image as argument. Checks what kind of kernel the image is. Returns
one of <literal>uki</literal>, <literal>addon</literal>, <literal>pe</literal>, and
@ -280,7 +280,7 @@
</varlistentry>
<varlistentry>
<term><option>kernel-inspect</option> <replaceable>kernel</replaceable></term>
<term><option>kernel-inspect</option> <replaceable>KERNEL-IMAGE</replaceable></term>
<listitem><para>Takes a kernel image as argument. Prints details about the image.</para>

View File

@ -475,6 +475,13 @@ Virtualization detect_vm(void) {
VIRTUALIZATION_ORACLE,
VIRTUALIZATION_XEN,
VIRTUALIZATION_AMAZON,
/* Unable to distinguish a GCE machine from a VM to bare-metal
* for non-x86 architectures due to its necessity for cpuid
* detection, which functions solely on x86 platforms. Report
* as a VM for other architectures. */
#if !defined(__i386__) && !defined(__x86_64__)
VIRTUALIZATION_GOOGLE,
#endif
VIRTUALIZATION_PARALLELS)) {
v = dmi;
goto finish;

View File

@ -280,8 +280,10 @@ static int help(int argc, char *argv[], void *userdata) {
" random-seed Initialize or refresh random seed in ESP and EFI\n"
" variables\n"
"\n%3$sKernel Image Commands:%4$s\n"
" kernel-identify Identify kernel image type\n"
" kernel-inspect Prints details about the kernel image\n"
" kernel-identify KERNEL-IMAGE\n"
" Identify kernel image type\n"
" kernel-inspect KERNEL-IMAGE\n"
" Prints details about the kernel image\n"
"\n%3$sBlock Device Discovery Commands:%4$s\n"
" -p --print-esp-path Print path to the EFI System Partition mount point\n"
" -x --print-boot-path Print path to the $BOOT partition mount point\n"

View File

@ -24,6 +24,9 @@ function check_validity() {
function check() {
for _ in {1..2}; do
# To make journal not rotated during checking journals below.
journalctl --rotate
systemctl reset-failed systemd-udevd.service
systemctl restart systemd-udevd.service
udevadm settle --timeout=30