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
2
votes
1 answer

GRUB error 13: invalid or unsupported executable format on custom kernel

I am trying to learn OS Dev and I started building my own kernel based on The Little book about OS Development. When I loaded the kernel using bochs GRUB complains with: error 13: invalid or unsupported executable format The files I'm…
B. Kostas
  • 583
  • 4
  • 17
2
votes
1 answer

How to install grub on image file WITHOUT root privilege?

I'm doing a project that needs to generate a vm image file which will then be used as qemu bootable disk image. Previously, our product is like an modified linux system and is made into a USB installation drive and then boot and install into an bare…
skywalker
  • 45
  • 3
2
votes
1 answer

Use `grub-md5-crypt` in a script where user is prompted for password to encrypt

As you already know from title, I want to configure an encrypted password for grub in /etc/grub.conf. I want to use a single script, where I will use grub-md5-crypt, enter my password that I want to encrypt, and sed that encrypted output in…
dig_123
  • 2,240
  • 6
  • 35
  • 59
2
votes
1 answer

Centos 7 Emergency Mode infinite error

I cant boot my linux machine due to /etc/fstab having bad lines of code. Currently my machine will attempt to boot and will infinitely loop the message "Welcome to Emergency Mode!..." . I can't get to the console or login. Hitting escape at the…
tripskeet
  • 186
  • 2
  • 12
2
votes
1 answer

Can GRUB load an ELF file without a multiboot header?

I have always assumed that this is not the case, however, an FAQ for a tutorial I have read recently implies that it is: Why the multiboot header? Wouldn't a pure ELF file be loadable by GRUB anyway? GRUB is capable of loading a variety of formats.…
elaforma
  • 652
  • 1
  • 9
  • 29
2
votes
1 answer

grub_script.yy.c:2354:13: error: 'yy_fatal_error' defined but not used

When building the latest grub2 (2.00) I get this error. I have tried adding -Wno-unused-function to both HOST_CFLAGS, HOST_CPPFLAGS, TARGET_CPPFLAGS and TARGET_CFLAGS in the Makefile. I even tried deleting that function whilst make was…
A T
  • 13,008
  • 21
  • 97
  • 158
2
votes
1 answer

Why doesn't GRUB2 load the diskboot.img to address 0x8000 directly?

I'm looking into the source code of GRUB2 and try to understand why the code in boot.S load the diskboot.img (first sector of core.img) to address 0x70000 first, then copy it to 0x8000 using copy_buffer and jump there to continue execution. Why…
silmerusse
  • 125
  • 6
2
votes
2 answers

grub2, grub-mkrescue, bios, vbe framebuffer, custom kernel

Time to ask my first-ever question here. At some point in past, I used to have my kernel Just Work (TM) with GRUB2; it still does with GRUB Legacy, but I want [VBE] framebuffer graphics. The first problem I noticed is that grub-mkrescue -o cd.iso…
Vendu
  • 39
  • 1
  • 3
2
votes
0 answers

How to configure kgdb with Grub2?

I need to setup a kernel debug session so that I can peek & poke some registers on a PCIe HW device. I am using Ubuntu 12.04, which uses Grub2. Based on my /boot/config-3.5.0-23-generic file, the kernel was already built with KGDB support, but…
Matt M
  • 259
  • 3
  • 6
2
votes
2 answers

Testing Linux kernel quickly

I want to learn linux kernel programming and so I downloaded Linux kernel 3.7.6 source from www.kernel.org. However before editing anything, I tried to compile it using online tutorials. The make takes a lot of time to compile and I haven't done it…
upInCloud
  • 979
  • 2
  • 10
  • 29
1
vote
1 answer

Can not see Kernel Image On Boot-Grub Menu Linux

I am trying to make a real time kernel by patching Xenomai framework: Xenomai 2.6.0 and Kernel 2.6.38.8 I patched it successfully. And was able to build the kernel: make make modules make modules_install make install After make install it creates…
Mehmet AKYOL
  • 1,666
  • 1
  • 12
  • 20
1
vote
1 answer

GRUB not Switching to Graphics Mode in Custom OS Development

I am developing a custom operating system and using the GRUB bootloader to load my kernel. In my development process, I've encountered an issue where I am unable to switch the display mode from text to graphics mode. Despite configuring GRUB to…
TechMC
  • 13
  • 4
1
vote
1 answer

multiboot2 header to properly go into "EFI amd64 machine state with boot services enabled" - hlt instruction not working?

I have a simple setup of a basic start.asm (nasm assembler) and a multiboot2_header.asm that get linked together once compiled. The multiboot2 header is at the beginning of the final ELF64-x86_64-file. To run it, I use QEMU -> OVMF (UEFI) -> GRUB ->…
phip1611
  • 5,460
  • 4
  • 30
  • 57
1
vote
1 answer

How to control the amount of contents loaded into memory from disk by grub?

I am working on a toy OS that is booted by grub. However, some of the sections in the kernel images (especially which are objcopy-ed to original kernel image) are not loaded into physical memory at boot time. (i.e., after jumping to ENTRY defined by…
shpark
  • 369
  • 2
  • 7
1
vote
0 answers

Not generating multibooot header correctly

I'm developing on my little OS. Using Bochs emulator to run it. Currently when I generate final ELF file, GRUB inside Bochs is able to boot from it, but the problem is that currently in C code I have a variable that holds a text that will be…
Cxovrika
  • 125
  • 9