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.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
17 views

Grub not showing icons after installing theme, remains in "table" mode [closed]

I just installed a Debian 12 OS and I'm configuring it... Wanted to install a cool theme for my PC and followed this popular tutorial. After the installation I execute grub2-theme-preview command and ...
user3793393's user avatar
1 vote
1 answer
145 views

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 ...
TechMC's user avatar
  • 13
3 votes
1 answer
47 views

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 ...
NotYourFox's user avatar
2 votes
1 answer
159 views

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 ...
DanielSun's user avatar
0 votes
2 answers
295 views

Modify a specific line in Ansible

How to update a line in /etc/default/grub using Ansible from -> GRUB_CMDLINE_LINUX="audit=1 crashkernel=auto rhgb quiet" to GRUB_CMDLINE_LINUX="audit=1 crashkernel=auto rhgb quiet ...
Pulak Mehta's user avatar
0 votes
1 answer
161 views

CR0 contains PE/PG flags right upon the Linux Kernel startup

I'm using GNU GRUB version 2.04 bootloader and Linux Kernel 5.19-rc2 I'm debugging the Linux Kernel initialization and expected that right upon the Kernel startup the CPU should be in real mode. ...
Some Name's user avatar
  • 8,772
-2 votes
2 answers
726 views

what is magic number to find whether OS on disk present and is it same for all archetectures & devices.Or is it bootloader 2 decide what it should be

I was trying to study bootloader and OS and bios do. So I found this link https://dev.to/frosnerd/writing-my-own-boot-loader-3mld which lead to a lengthy tutorial from a university professor. from the ...
user786's user avatar
  • 3,982
0 votes
1 answer
1k views

mmap error : cannot allocate memory. how to allocate enough default sized huge pages as admin?

I was compiling and running this program but received 'mmap error : cannot allocate memory'. The comment at the top reads /* * Example of using hugepage memory in a user application using the mmap * ...
Chan Kim's user avatar
  • 5,351
0 votes
1 answer
187 views

Why does grub-file say that NASM raw binary is not multiboot2 compliant?

I am trying to make a minimal kernel. My goal is to make this not-yet-existing kernel to be multiboot2 compliant. So I started out by creating a minimal multiboot2-header in NASM-Assembly. I am using ...
Alexander's user avatar
1 vote
1 answer
453 views

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....
phip1611's user avatar
  • 5,620
0 votes
0 answers
233 views

I made a simple hello world ,, kernel ''. It doesn't print anything. What did I do wrong?

I have followed this tutorial: https://www.youtube.com/watch?v=1rnA6wpF0o4 in order to write a very very basic hello world after boot, as it seems very complete on the next episodes. My problem is ...
Sofronea Georgian's user avatar
4 votes
1 answer
10k views

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 ...
Dan's user avatar
  • 179
0 votes
1 answer
414 views

GRUB memory map gives me weird values

I am trying to use grub in order to get the memory map, instead of going through the bios route. The problem is that grub seems to be giving me very weird values for some reason. Can anyone help with ...
user avatar
0 votes
2 answers
2k views

Create a grub script that auto detect EFI systems, and boot first one

I am working on an opensource project, bluebanquise, that aims to deploy baremetal infrastructures, and now that we support RHEL/CentOS 8 distributions, I wish to add other RHEL derivative ...
oxedions's user avatar
0 votes
1 answer
10k views

grub error systemd.unified_cgroup_hierarchy=0: not found

i am running on a vps debian 9 stretch master@vps726152:~$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION=&...
Frederic's user avatar
0 votes
1 answer
2k views

Ansible: insert string at the end of the line but only if string is not present OR/AND change value if present

I am struggling below scenario: In /etc/default/grub file, there is GRUB_CMDLINE_LINUX_DEFAULT stanza, I need to insert audit=1 at the end of the line if value is not there already (note that there is ...
8star's user avatar
  • 3
3 votes
1 answer
257 views

grub doesn't seem to load my kernel correctly

I use grub to load my kernel. Although I specified .=0x100 0000 in the linker script, I can only find a valid MultiBoot2 header at 0x10 0000. After comparing them one by one, I found that it is not my ...
AlanCui's user avatar
  • 137
-1 votes
2 answers
331 views

How was Grub programmed without OS? And is it possible to install only the grub bootloader in an newly assembled UEFI PC with no other OS installed?

In which platform/Environment/OS was grub bootloader programmed? Example the linux kernal was programmed on GCC compiler on MINIX OS, but how was grub made? Since grub is a bootloader (that loads the ...
Anju kumar's user avatar
-2 votes
1 answer
7k views

Error: grub-efi-amd64-signed in Ubuntu 20.04. Trying to install packages [closed]

I'm having problems when Iḿ trying ¿to install any package or software. My OS is Ubuntu 20.04. I've already tried all the solutions mentioned in this post https://bugs.launchpad.net/ubuntu/+source/...
Kurama794's user avatar
1 vote
1 answer
165 views

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 ...
shpark's user avatar
  • 379
9 votes
1 answer
6k views

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....
Ícaro Pires's user avatar
-1 votes
1 answer
229 views

How to remove grub entries with sed?

I need know how to remove entries in grub.cfg with sed In my case i want remove Windows 10 entrie on sda3 and that is a multiline entrie Thanks
Francisco Rocha's user avatar
2 votes
1 answer
284 views

Jumping back to Grub from the kernel in UEFI system

I am working on a tiny x86 64 bit kernel that is multiboot2 compliant, the kernel is loaded and launched by Grub. The requirement is that, once the kernel finishes its activity it needs to relaunch ...
GKT's user avatar
  • 23
-2 votes
2 answers
4k views

safely remove Ubuntu EFI partition and move windows EFI partition to free space [closed]

Problem #1: I messed up my Windows once and it wouldn't start so I had to reinstall using a flash drive, during installation I deleted the EFI partition and the free space is still there but windows ...
Jay Mehta's user avatar
1 vote
0 answers
54 views

Not generating multibooot header correctly [duplicate]

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 ...
Cxovrika's user avatar
  • 145
0 votes
1 answer
270 views

GRUB set address kernel is loaded at

How would I go about changing the address GRUB tries to load my kernel at without using the linker? I would like to do this from GRUB config files.
DrCarnivore's user avatar
0 votes
1 answer
367 views

Debugging C: GDB returns "address where <file> has been loaded is missing"

I'm very new to the C language and have been tasked with modifying GRUB. What a way to learn, right? Anyway, I'm trying to debug my modified GRUB using VMWare and GDB. I've been able to get the ...
Harin's user avatar
  • 15
-1 votes
1 answer
1k views

Add Git to Yocto image

For development I want to add Git to my Yocto image. So I add IMAGE_INSTALL += "git" to my `local.conf. But when I run QEMU I run into this crash straightaway: Welcome to GRUB! lock: OK ...
grmmgrmm's user avatar
  • 1,070
2 votes
1 answer
8k views

QEMU Hangs At Boot Time

Attempting to boot from a Live Linux Mint 18.4 (x64) ISO using QEMU under macOS Catalina (with patches to use hvf as hypervisor in place of kvm). I am able to get as far as the boot menu, but ...
Timothy Muscat's user avatar
2 votes
1 answer
255 views

Multiboot 1 Boot Information total size

Is there a quick and reliable way find out the total size of the Multiboot 1 boot information in memory? Just to clarify: I'm not asking about the size of the structure pointed to by the value in the ...
ajxs's user avatar
  • 3,417
0 votes
1 answer
2k views

Why won't grub boot immediately into Ubuntu?

I want to boot directly into my Xubuntu. I searched a bit online and found out that you can edit the file /etc/default/grub to make the timeout of GRUB 0 seconds. What you have to do is change ...
Juan Scerri's user avatar
4 votes
1 answer
703 views

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 ...
user10607's user avatar
  • 3,031
1 vote
1 answer
1k views

How to make a "Hello world" kernel

I followed this article on how to make a very simple kernel which prints "Hello, World". The files to my project are available on Github. I built my cross compiler from this project. I use these ...
user avatar
0 votes
2 answers
784 views

How To Call ExitBootService through GRUB

I am working on a UEFI Based Hypervisor for Intel x86 platform. The GRUB is being used to load both the VMM and OS images, for reducing the complexity I am currently loading only one GPOS through GRUB ...
Ameer Hamza's user avatar
4 votes
1 answer
3k views

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 ...
densha's user avatar
  • 155
-1 votes
1 answer
539 views

Why u-boot calls grub in rpi3?

I have rpi3. This situation is under the embedded system. The RPI reference shows how to boot Ubuntu. It shows the way that u-boot calls grub and grub calls Linux... and I have tried this chain ...
helloworldkkk's user avatar
1 vote
0 answers
534 views

Where in source code of GRUB can I found ELF kernel loader?

As we all know, GRUB can boot an ELF executable kernel. But here, in source code of GRUB, in which file and/or directory, the source of ELF loader resides? Also which file contains source code of ...
Amir Khan's user avatar
-3 votes
1 answer
226 views

How to Shrink a VirtualBox Virtual Machine and Free Up Disk Space in nixos guest system? [closed]

I was following this instruction to try to shrink my virtual nixos. It says, You can’t actually use zerofree on your / partition while you’re booted into the standard Linux environment. Instead, ...
Johnny Liao's user avatar
6 votes
2 answers
1k views

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 ...
WinEunuuchs2Unix's user avatar
-3 votes
1 answer
178 views

grub file updation failed in sles12

working on SLES12SP3 kdump configuration hosted on MICROSOFT-AZURE. Trying to start the kdump service but grub file is not getting updated with crash kernel parameter in /etc/default/grub crashkernel=...
Vamshi Marati's user avatar
-2 votes
1 answer
47 views

Batch Linux installation in VirtualBox

I have the following question. When I install manually a Linux (say, CentOS or RHEL) in VirtualBox, at start up the grub menu appears (Installation CD in virtual tray). Then I can manually choose a ...
teidelu's user avatar
-2 votes
1 answer
409 views

Kernel on x86_64 not boot after upgrading Binutils and GCC

I'm not able to see ANY logs on console (even not the "Decompressing Linux... " message). I enabled any Early Boot prints under Kernel config, at least which I know (see below Kernel configuration) ...
Dude's user avatar
  • 17
1 vote
1 answer
4k views

Grub can't find grub.cfg file -- Stuck at GRUB Command Line [closed]

I am using GPT/UEFI system. I installed KDE Neon and I was using it without any problem since the summer. Then today, I deleted /EFI/ubuntu/ and after I reboot the system, it stuck at grub command ...
furkantokac's user avatar
-4 votes
1 answer
239 views

Centos/RHEL 7 XEN paravirtualized DomU stoped booting

After a recent kernel update for Centos 7.4, Paravirtualized DomUs under Xen stooped booting. They just crash on boot. Apparently it seems a new restriction in RHEL 7 kernel. And there are some ...
topmop75's user avatar
1 vote
1 answer
3k views

OS programming using grub

I found a website online to learn Operating system programming. I did the first tutorial and just followed with what they did. I came to the last step where I type "grub-mkrescue -o myos.iso isodir". ...
Steven 's user avatar
  • 380
-2 votes
1 answer
2k views

GRUB can't recognize FAT32 filesystem on an isohybrid image

I am building a multiboot isohybrid image using the following command: xorriso -as mkisofs -iso-level 3 -full-iso9660-filenames -volid "MULTIBOOT" -eltorito-boot boot/isolinux/isolinux.bin -...
ZapperDJ's user avatar
0 votes
0 answers
255 views

GRUB invalid multiboot

I am writing a simple 32-bit kernel. I'm booting with GRUB. Here is the code: #include <stdio.h> #include <sys/kernel.h> #include <sys/tty.h> #include <string.h> #include <...
SpilledMango's user avatar
6 votes
4 answers
10k views

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/...
Júlio César's user avatar
1 vote
2 answers
1k views

How to pass parameters to Kernel using GRUB 0.97 menu.lst?

I'm working on an OS and I have to create a debug mode. In order to do this, I want to add an entry in menu.lst, pointing to the same kernel, but with an added argument. In the GRUB manual, it's ...
Turbolay's user avatar
1 vote
1 answer
1k views

Crafting an ELF file using linker scripts without zero-initialized blocks between sections

I am trying to craft a linker-command script to be bootable by legacy grub (using multiboot). I am having difficulty getting the multiboot header in the required location (within the first 8192 bytes)....
sherrellbc's user avatar
  • 4,720