El 17/12/23 a les 9:43, Albretch Mueller ha escrit:
I can't find it in the documentation:

https://www.gnu.org/software/grub/manual/grub/grub.html

https://www.mail-archive.com/search?l=help-grub%40gnu.org&q=architecture+amd64

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

$ uname -a
Linux debian 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02)
x86_64 GNU/Linux

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

lbrtchx


Hello, I don't know in GRUB command line, but in GNU operating systems you need to differentiate:

This returns something if CPU is 64-bit capable (only Linux):
$ grep -ie '^flags.*:.* lm ' /proc/cpuinfo


This returns running kernel architecture (either Linux or Hurd):
$ uname -m

 This returns Dpkg/Debian packages architecture:
$ dpkg --print-architecture

I've tried on GNU GRUB 2.06 :
$ lbrtchx
error: can't find command `lbrtchx'.


--
Narcis Garcia

Reply via email to