0

Eg: "x86_64-efi"
How do I know the default target of the platform in use on my PC?
Does it reside in some file or can I get it via a command?
I have not found relevant search results on the internet.

Mario Palumbo
  • 277
  • 2
  • 8
  • 36
  • If installing from inside your install, it is the mount of the ESP - efi system partition (FAT32) in your /etc/fstab file. If installing from a chroot, you must mount the ESP. UEFI chroot, must include ESP - efi system partition http://askubuntu.com/questions/53578/can-i-install-in-uefi-mode-with-the-alternate-installer/57380#57380 chroot with UEFI, LVM, encryption on NVMe drive https://ubuntuforums.org/showthread.php?t=2349833&p=13602088#post13602088 If just installing only grub to flash drive you can specify drive & partition in command. Where are you installing? – oldfred Feb 19 '22 at 21:12
  • /etc/fstab does not contain this information "x86_64-efi". I just want to get this value from I don't know which file or command. – Mario Palumbo Feb 19 '22 at 22:04
  • Where are you installing from? Grub has multiple versions and if you have an UEFI install it will automatically reinstall the 64 bit UEFI version of grub. What model system? What version of Ubuntu? – oldfred Feb 20 '22 at 03:27
  • I need to install the dual boot FAT32 / exFAT with Ubuntu 20.04 LTS on a pendrive (with "insmod exfat" I solve the problem of the exFAT partition). – Mario Palumbo Feb 20 '22 at 13:18
  • Have not installed grub by itself to flash drive for ages. Large flash drives got full installs and now I boot from SSD or second drive. Do not know if exFAT works or not. If booted in UEFI mode. mounted the USB EFI partition at /media/test and I installed grub with sudo grub-install --target=x86_64-efi --efi-directory=/media/test --bootloader-id=grub --removable --recheck --debug You then have to manually create your own grub.cfg boot stanza(s) to boot whatever you want to boot. – oldfred Feb 20 '22 at 14:59
  • I have created another question regarding a problem with this thing: https://askubuntu.com/questions/1393957/stdin-invalid-argument – Mario Palumbo Feb 20 '22 at 15:03
  • Instead for this topic what I intended to do was, instead of writing this: --target=x86_64-efi, write this: --target=$target, where the $target variable is taken somewhere, I don't know where, which is the reason for this question. This variable, I want to get it from the platform currently in use on my PC, even if the pendrive could instead be used on different platforms. – Mario Palumbo Feb 20 '22 at 15:10
  • I have edited the question. – Mario Palumbo Feb 20 '22 at 15:18
  • 1
    x86_64-efi is not really a variable, just specifying 64 bit UEFI install to 64 bit PC. Unless also planning on 32 bit, or other non-PC based systems that use different software that have different descriptions. --target=i386-pc instructs grub-install to install for BIOS systems only. Generally you have to boot in same mode as you want to install. – oldfred Feb 20 '22 at 15:19
  • Are you sure there is no way to get this value from some file on the system or command? x86_64-efi is just an example. – Mario Palumbo Feb 20 '22 at 15:31
  • Check UEFI boot mode [ -d /sys/firmware/efi ] && echo EFI || echo Legacy If UEFI then then x86_64-efi is correct. Why would you have anything else? – oldfred Feb 20 '22 at 16:13
  • Ah ok, the answer is exhaustive. Thanks a lot. – Mario Palumbo Feb 20 '22 at 16:40

0 Answers0