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: Andrei Borzenkov
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 13:27:23 +0300

On Mon, Dec 18, 2023 at 12:22 PM Narcis Garcia <narcisgarcia@gilug.org> wrote:
>
> 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):
>

There is only one non-EFI x86 grub platform - i386-pc.

> 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?
>

It is automatically set by grub.



reply via email to

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