help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to get the architecture of the machine just booted up


From: Narcis Garcia
Subject: Re: Is there a way to get the architecture of the machine just booted up by GRUB2: [32|64]-[amd|arm]? ...
Date: Mon, 18 Dec 2023 10:21:54 +0100

El 17/12/23 a les 16:56, Andrei Borzenkov ha escrit:
On 17.12.2023 18:00, Narcis Garcia wrote:

What about selecting between vmlinuz-...-amd64 and vmlinuz-...-i386 on
non EFI firmware?



If you describe what condition you are going to use to decide which kernel to load someone may have an idea how to implement it in grub. grub itself just loads file you told it to load.


Expecting non EFI firmware (BIOS only):

if [ $grub_cpu = x86_64 ]; then
    # instructions to boot with amd64 kernel
elif [ $grub_cpu = i386 ]; then
    # instructions to boot with i386 kernel
fi

How to get $grub_cpu filled?

--
Narcis Garcia



reply via email to

[Prev in Thread] Current Thread [Next in Thread]