Questions tagged [grub]

GENERAL GRUB SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. GRUB, the GNU GRand Unified Bootloader, is a boot loader used on x86 systems, typically used to boot Linux. Questions about using or configuring GRUB are rarely on-topic for Stack Overflow outside of unusual circumstances.

GRUB is the reference implementation of the Multiboot Specification, which provides a user the choice to boot one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system's partitions.

As GRUB is not a tool specifically used for software development, questions about it will typically be considered off-topic on Stack Overflow unless it is being used in a particularly unusual manner, e.g. if you are developing custom modules for GRUB, or if you have developed your own operating system kernel.

If you are having a problem with using or configuring GRUB on your computer, please consider asking your question on SuperUser.com, the Stack Exchange site for computer enthusiasts and power users, or on a site specific to the Linux distribution you are using, such as the Ask Ubuntu Stack Exchange or UNIX & Linux Stack Exchange.

171 questions
6
votes
2 answers

Finding countdown timer in Grub 2.02 source code

Change Grub's timeout to 1/10th or 1/100th second intervals Using Grub 2.02 on UEFI system with AMD64 architecture. I'd like to change grub's timeout counter from 1 second intervals to 1/10th second or 1/100th second intervals. The reason is to make…
WinEunuuchs2Unix
  • 1,801
  • 1
  • 17
  • 34
6
votes
3 answers

Change default kernel version in GRUB

This is the content of the grub.cfg file of my Arch Linux system. # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header…
Júlio César
  • 95
  • 2
  • 7
6
votes
1 answer

Isn't 07C0:0000, the same physical address on x86 machines as 0000:7C00?

Reason for my question is that Starman seems to believe the GRUB Legacy author's explanation (see for the following inexplicable code: 7C4B EA507C0000 JMP 0000:7C50 ; Long Jump to the next instruction ;…
James P.
  • 71
  • 3
6
votes
1 answer

How to debug a boot loader?

I debugged small programs using gdb. I have source code of GRUB. Second stage of GRUB is written in C. Can I debug it using gdb ? Is it possible to debug a boot loader ? If yes, then how ?
Vikram
  • 1,999
  • 3
  • 23
  • 35
6
votes
1 answer

Where does code of GRUB stage 1.5 reside on disk and what is the address it is loaded?

I have grub v1.98 installed and after disassembling the MBR I find the following code snippet that I don't understand: xor ax,ax mov [si+0x4],ax inc ax mov [si-0x1],al mov [si+0x2],ax mov word [si],0x10 mov ebx,[0x7c5c] mov [si+0x8],ebx mov…
Summer_More_More_Tea
  • 12,740
  • 12
  • 51
  • 83
5
votes
1 answer

Error 13: Invalid or unsupported executable while booting simple kernel in grub with string literal

I've written a simple kernel that tries to write two characters to the frame buffer. If I define a string literal in the kernel, I get the following output when it boots: Booting 'os' …
albertlockett
  • 204
  • 3
  • 13
5
votes
1 answer

How to query BIOS using GRUB?

I am trying to make a small kernel for 80386 processor mainly for learning purpose and want to get the full memory map of the available RAM. I have read that it is possible and better to do so with the help of GRUB than directly querying the BIOS.…
Pratik Singhal
  • 6,283
  • 10
  • 55
  • 97
5
votes
1 answer

Using grub, is it possible to use "if, while" during booting (before loading normal.mod)?

My computer has grub installed. During booting before normal.mod is loaded, I need to be able to run if and while commands in my config file which has been linked into core.img (using grub-mkimage -c myconfig.confg). In myconfig.config, I have an if…
5
votes
1 answer

Grub 2 not detecting Multiboot header in kernel

I'm having an issue with Grub 2 (and QEMU's -kernel) not detecting the Multiboot v1 header in my kernel. I have the header in a separate section before .text. linker.ld: SECTIONS { . = 1M; .multiboot ALIGN(4K) : { *(.multiboot) …
Sam Kingston
  • 111
  • 2
  • 7
4
votes
1 answer

Unable to install grub-customizer on Manjaro 21.0.4

I'm having trouble installing other packages too, I assume it's because I didn't configure something. Thoughts? sudo pacman -S grub-customizer error: target not found: grub-customizer
Dan
  • 179
  • 1
  • 1
  • 13
4
votes
1 answer

Who enables the A20 line when booting in pure UEFI?

Is this handled by the UEFI firmware or by for the GRUB grubx64.efi bootloader? I looked at https://wiki.osdev.org/UEFI which claims: UEFI firmware ... also prepares a protected mode environment with flat segmentation and for x86-64 CPUs, a long…
user10607
  • 3,011
  • 4
  • 24
  • 31
4
votes
1 answer

Run script from GRUB menu entry

I have created a Debian Live DVD following the excellent guide https://willhaley.com/blog/custom-debian-live-environment/. I would like to be able to great two grub menu enteries when selected auto login and run a script. menuentry "Run Script…
densha
  • 157
  • 3
  • 12
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
4
votes
1 answer

Generating an iso from Kernel built with GRUB/NASM/C

I was following along with this series of articles, and on the last page, he linked an iso image of the kernel that he produced. He doesn't mention this in the series, so that's my question... how do I generate an iso image from my kernel…
user2588174
  • 159
  • 1
  • 9
1
2
3
11 12