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 11:54:22 +0100

OKAY, thank you SteveSi:

'cpuid' command returns exitcode 1 or exitcode 0 depending on CPU features: 64-bit and/or PAE.

grub> cpuid -l
grub> echo $?
1

help:
grub> cpuid -h

Then I suppose this can be used at grub.cfg script to select appropriate OS kernel (maybe only in Intel-compatible hardware).


El 18/12/23 a les 11:43, SteveSi ha escrit:
try  cpuid    ???



On Mon, 18 Dec 2023 at 09:30, Narcis Garcia <narcisgarcia@gilug.org <mailto:narcisgarcia@gilug.org>> wrote:

    grub> cpu -l
    error: can't find command `cpu'.


    El 17/12/23 a les 16:22, SteveSi ha escrit:
     > Use cpu -l command to detect 64bit CPU
     >
     >
     > On Sun, 17 Dec 2023, 15:01 Narcis Garcia, <narcisgarcia@gilug.org
    <mailto:narcisgarcia@gilug.org>
     > <mailto:narcisgarcia@gilug.org <mailto:narcisgarcia@gilug.org>>>
    wrote:
     >
     >     El 17/12/23 a les 15:18, Pascal Hambourg ha escrit:
     >      > On 17/12/2023 at 12:08, Albretch Mueller wrote:
     >      >>
     >      >>   Say I burn a DVD with the debian bootable iso (the live
    DVD) for
     >      >> amd64, arm64 and 64-bit risc-v processors
     >      >
     >      > Debian does not provide any such multi-arch ISO image. Until
     >     bookworm it
     >      > provided a amd64+i386 multi-arch image which was able to boot
     >     with PC
     >      > BIOS (with ISOLinux, 32-bit x86 UEFI and 64-bit x86 UEFI
    (with GRUB).
     >      >
     >      >> will GRUB2 automatically
     >      >> detect the architecture and pick the file?
     >      >
     >      > Let's assume you you create such an ISO image for UEFI
    boot only. It
     >      > must contain an EFI partition with EFI images for each
    firmware
     >      > architecture : bootarm64.efi (built for ARM64), bootx64.efi
     >     (built for
     >      > AMD64/x86_64) and bootriscv64.efi (built for RISC-V64).
    The UEFI
     >      > firmware will seek the matching EFI image, and the GRUB
    image will
     >      > report the architecture in $grub_cpu and $grub_platform.
     >      >
     >
     >     What about selecting between vmlinuz-...-amd64 and
    vmlinuz-...-i386 on
     >     non EFI firmware?
     >
     >
     >     --
     >     Narcis Garcia
     >

-- Narcis Garcia


--
Narcis Garcia



reply via email to

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