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: Pascal Hambourg
Subject: Re: Is there a way to get the architecture of the machine just booted up by GRUB2: [32|64]-[amd|arm]? ...
Date: Sun, 17 Dec 2023 09:56:40 +0100
User-agent: Mozilla Thunderbird

On 17/12/2023 at 09:43, Albretch Mueller wrote:

you could deduce via dmidecode if a machine is 32- or 64-bit, and,
say, in Debian Linux, after boot up you can get the processor type
from the OS by running:

$ dpkg --print-architecture
amd64

This is Debian-specific and returns the system architecture, not the CPU kernel architecture (uname -m or arch) nor the CPU architecture.

How could you get the architecture it is running on from GRUB2?

If you want to get the architecture from GRUB shell, you can check $grub_cpu and $grub_platform variables. In PC BIOS/legacy mode, it runs in 32-bit mode and I do not think GRUB can tell if the CPU is 64-bit capable.



reply via email to

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