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

Simple kernel won't boot in GRUB

I'm learning a bit of OS development from OSDev.org. I have a kernel and I'm trying to boot in GRUB Legacy (0.97) using qemu. However, when I type kernel 200+9, I get the message [Multiboot-elf, <0x100000:0x80:0x4008>(bad), entry=0x10000c] This is…
gsgx
  • 12,020
  • 25
  • 98
  • 149
19
votes
3 answers

Does GRUB switch to protected mode?

I would like to ask if it is GRUB that switch the CPU to protected mode during boot up or is it the Linux kernel that does it. And also I would like to ask - is the kernel itself (vmlinuz) an ELF or is it plain binary format? Thanks.
mnc
  • 199
  • 1
  • 3
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
12
votes
2 answers

Enabling GRUB to automatically boot from the kernel

I am developing a kernel for an operating system. In order to execute it, I've decided to use GRUB. Currently, I have a script attached to GRUB's stage1, stage2, a pad file and the kernel itself together which makes it bootable. The only problem…
Cristián Romo
  • 9,814
  • 12
  • 50
  • 50
11
votes
1 answer

Grub bootloader with shared library support

I'd like to load a shared library (closed-source binary user-space library) at boot stage with grub boot-loader. Are there any chances for this or I must write a custom-elf-loader (grub module) to do it? 29/08/2014: For more detail, this is a…
tuantm
  • 341
  • 1
  • 10
11
votes
2 answers

vagrant provisioning switches character encoding

I was running vagrant provision today and it failed with the following error: Package configuration┌──────────────────────────┤ Configuring grub-pc ├──────────────────────────┐│││ The GRUB boot loader was previously installed to a disk that is…
ataber
  • 127
  • 5
10
votes
1 answer

how to build grub2 bootloader from it's source and test it with qemu emulator

I want to know how to build grub 2 bootloader from it's source in ubuntu and test it with qemu emulator. I would also like to change the default background image of grub2 bootloader in the new build? Is this possible? If yes, how ?
Project-A
  • 133
  • 1
  • 2
  • 12
8
votes
2 answers

Grub and getting into Real Mode (low-level assembly language programming)

I've been working on a toy OS and have been using grub as my boot loader. Recently when trying to use VGA I found that I couldn't use hardware interrupts. This I found was because I had been slung into protected mode by grub. Does anybody know how…
blackthorn
8
votes
1 answer

Differences between modprobe.blacklist and rd.driver.blacklist in Linux kernel parameters

Context I've seen, mainly, three ways of blacklisting driver modules by appending parameters to the kernel: (i) modprobe.blacklist=driver_name, (ii) rd.driver.blacklist=driver_name, or (iii) last both. This is usually done by appending these…
Ícaro Pires
  • 101
  • 1
  • 6
7
votes
2 answers

Is there a python grub.cfg parser?

Does anyone know of a python parser for grub2's grub.cfg file? I'm trying to get the "menuentry" by device partition (root), e.g. hd0,msdos1: ['Ubuntu, with Linux 3.0.0-15-generic', 'Ubuntu, with Linux 3.0.0-15-generic (recovery mode)', …
Savvas Radevic
  • 543
  • 1
  • 8
  • 23
7
votes
3 answers

How do I programmatically create a bootable CD?

I'm using a barebones tutorial as the basis for an OS I'm working on, and it seems to be an older tutorial: it has be compiling the kernel down to a floppy image, and then loading it with GRUB. Basically, I still want to use GRUB, but I'd like to…
Blank
  • 7,088
  • 12
  • 49
  • 69
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
7
votes
1 answer

Creating a simple multiboot kernel loaded with grub2

I'm trying to follow the instructions here to build a simple OS kernel: http://mikeos.sourceforge.net/write-your-own-os.html Except, instead of booting from a floppy, I want to create a grub-based ISO image and boot a multiboot CD in the emulator. …
BadZen
  • 4,083
  • 2
  • 25
  • 48
7
votes
1 answer

How does GRUB's stage 1 boot loader loads the stage 2 bootloader?

From the past week I am puzzled with the question that how the grub first stage boot loader which is only 446 bytes is able to search for the second stage, when the second stage is in a complex file system! How does it locate the second stage? When…
codeman48
  • 1,330
  • 11
  • 17
6
votes
2 answers

One time boot into Read Only?

I'm trying to boot into read only mode to test some software. I don't want to remount a drive after booting as that would not meet the requirements to test the software which checks the file system at boot. Is there a way to do this without…
neuroelectronic
  • 125
  • 3
  • 9
1
2 3
11 12