Questions tagged [grub2]

GENERAL GRUB2 SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. GRUB2 is a boot loader with support for modern day computer systems. It is meant to replace the older GRUB boot loader (now referred to as "GRUB Legacy").

Copied from https://wiki.gentoo.org/wiki/GRUB2:

GRUB2 is a boot loader with support for modern day computer systems. It is meant to replace the older GRUB boot loader (now referred to as "GRUB Legacy").

56 questions
16
votes
2 answers

How does the GRUB 2 UEFI loader know where to look for the configuration file (or where the 2nd stage's files are located)?

If I use GRUB 2 on a GPT-enabled partition, how does the loader "know" where to find its configuration file and other second stage's files? Note: I found some mentions about a configuration file which is located in the same folder as GRUB's EFI…
Sap
  • 914
  • 1
  • 6
  • 20
14
votes
5 answers

after upgrade 18.04 no gui available only tty

After upgrading my Ubuntu desktop from 17.10 to 18.04, everything went smooth until I restarted my PC. The first suspicious thing I noticed was that it has the same grub with 17.10 - it selected the old grub from the menu (auto-select) and then…
Mr.P
  • 1,182
  • 3
  • 20
  • 44
11
votes
2 answers

Debug GRUB2 EFI image running on QEMU

What I want to achieve I want to customize a GRUB EFI image, and debug it while running on QEMU. So I'm trying to debug a vanilla GRUB image before customizing it. What I have done so far I downloaded GRUB2 from http://git.savannah.gnu.org and…
lseki
  • 351
  • 6
  • 21
7
votes
1 answer

Reading GRUB2 debug logs

I want to see GRUB2 debug logs generated by grub_dprintf(), for example, at mmap.c: grub_dprintf ("mmap", "EFI memory region 0x%llx-0x%llx: %d\n", (unsigned long long) desc->physical_start, (unsigned long long)…
electro
  • 911
  • 4
  • 12
  • 28
6
votes
2 answers

How to list and edit GRUB2's "menuentry" in command-line under Centos-8?

How to list GRUB2's “menuentries” in command-line under Centos-8? The used workable method "fgrep menuentry /etc/grub2.conf" failed. Because at Centos-8/RHEL-8, they DO NOT store menuentry in /etc/grub2.conf. Instead, they search and build entries…
Kirby Zhou
  • 161
  • 1
  • 10
4
votes
1 answer

Ansible Unable to set password for GRUB bootloader in Redhat

As Salam-o-Alikum, I have written an Ansible playbook for setting GRUB bootloader password on RedHat and Ubuntu, there are no error and i can see changes in Grub2.cfg on both locations. It's weird that when i reboot my both machines, Ubuntu…
Mujtaba
  • 349
  • 1
  • 4
  • 17
4
votes
2 answers

grub2 howto increment variable

The grub2 shell aims to be a minimalistic bash like shell. But how can I increment a variable in grub2? In bash I would do: var=$((var+1)) or ((var=var+1)) In grub2 I get a syntax error on these calls. How can I achieve this in the grub2 shell?
franz86
  • 103
  • 1
  • 7
4
votes
1 answer

Filename wildcard expansion in GRUB scripting

Is it filename wildcard expansion possible in GRUB scripts? Something like: for i in directory/*; do echo $i; done My intention is for GRUB to load different cfg files located in certain directories.
Manuel
  • 41
  • 3
3
votes
1 answer

What is the grub/machine include directory in GRUB source code?

I have always wondered how does GRUB 2 work. While reading it's source code, I saw that there are some #include directives which include seemingly nonexistent "grub/machine/...", for example in grub-core/boot/i386/pc/boot.S bootloader file there…
NotYourFox
  • 35
  • 5
3
votes
1 answer

Simplest chainloading a boot manager

In order to boot from flash memory drive we load disks using the BIOS interrupt 13h in real mode with specifying the disk 0x80. Another disks should be accessed by 0x81, 0x82... as mentioned over this link I am trying to make my simple GRUB. My very…
user7688222
3
votes
3 answers

vgrename on root VG - grub2 issues

I'm struggling to update grub2 after using 'vgrename' on my root VG in Centos 7. I ran 'vgrename' successfully, then edited /etc/fstab with the VG name, then edited 'GRUB_CMDLINE_LINUX=' in /etc/default/grub with the new VG name, then attempted to…
machinist
  • 171
  • 1
  • 4
  • 12
2
votes
1 answer

Where in memory will os boot code be loaded when using grub chainloader?

Problem Description Hi. I want to use grub chainloader to load my minios (an os I developed myself, not linux or windows). Before using grub chainloader, minios boot process was BIOS->MBR->os boot(stored in sector 0 of the primary…
DanielSun
  • 33
  • 4
2
votes
0 answers

Can grub switch to long mode?

I'm wondering if I can use grub to switch to long mode then load a 64-bit kernel? I want grub to switch to long mode, setup page tables so the map one-to-one virtual to physical addresses and setup enough page tables to cover physical memory.
Frank Miller
  • 499
  • 1
  • 7
  • 19
2
votes
2 answers

The boot behavior for GRUB's multiple EFI executable files

After installing Ubuntu, there are several *.efi files inside /efi/UBUNTU/ of EFI system partition: GRUBX64.EFI MOKMANAG.EFI SHIMX64.EFI mmx64.efi fwupx64.efi But UEFI Specification 2.7 says in the section "13.3.1.3 Directory Structure": There…
Intron BBS
  • 21
  • 3
2
votes
1 answer

GNU GRUB Gives "error: unsupported tag: 0xc" for Multiboot2

I tried to use the following code for the header of a Multiboot2 compliant kernel, but when I tried the multiboot2 command in grub, it gave the following error message: error: unsupported tag: 0xc My Multiboot2 header is defined as: section…
1
2 3 4