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
1
vote
2 answers

edit grub option programmatically

I want to programmatically select the next os that will be run after the current os restart. For example I've these os: -Linux Mint -Windows 7 i'm in linux now, and i want run windows after the restart. What file I have to modify?
1
vote
0 answers

GRUB2 + VESA BIOS Extensions / VBE broken?

Whereas I did get my earlier problem with building proper boot images fixed, I've been struggling with another GRUB2-related problem for most of the day. The problem is that even though I do set the video info request bit in my multiboot header,…
Vendu
  • 39
  • 1
  • 3
1
vote
3 answers

Bootloader countdown timer stuck at 4 seconds

I seem to have a problem for one the servers that i am handling, i have reinstalled CentOS for nth times, and formated everything, edited the grub.conf time out = 0, but all still the same, the grub timer wont move, always stuck.
1
vote
1 answer

multiboot header doesn't work in boot file

I'm trying to write a multiboot kernel compliant using the grub (legacy) specification , here is the content of my boot.s (written with the gnu as) #include "boot.h" .code32 .globl start .type start, @function .extern kernel_main …
salmane
  • 117
  • 2
  • 5
1
vote
1 answer

How should I call BIOS interrupts

I have developed a small x86 'Hello World' Linux-based OS. I just created the files loader.s, linker.ld and main.c then I used the GRUB loader to boot my OS using bochs emulator in Ubuntu. I just accessed the video memory and displayed the 'hello…
Mohanraj
  • 4,056
  • 2
  • 22
  • 24
0
votes
2 answers

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 console=ttyS0,1100" I tried the following - - name: Updating…
0
votes
1 answer

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. Actually as specified in the Intel System Programming…
Some Name
  • 8,555
  • 5
  • 27
  • 77
0
votes
1 answer

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 * system call with MAP_HUGETLB flag. Before…
Chan Kim
  • 5,177
  • 12
  • 57
  • 112
0
votes
1 answer

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 grub-file to test whether my binary is…
Alexander
  • 3
  • 1
0
votes
0 answers

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 that I cannot see what I've done wrong as I verified…
0
votes
1 answer

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 this? Relevant code: This is how I parse the…
user12312423
0
votes
2 answers

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 distributions (Rocky Linux, Oracle Linux, Cloud Linux, etc…
oxedions
  • 61
  • 3
0
votes
1 answer

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="9 (stretch)" VERSION_CODENAME=stretch ID=debian I started to have errors after…
Frederic
  • 39
  • 1
  • 3
0
votes
1 answer

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 quote char at the end of line). If audit=0 is…
8star
  • 3
  • 2
0
votes
1 answer

Change GRUB's variable using a C language

I was wondering if there is any way for me to write a C program to change the value off GRUB's variables. I need to write a program that can reboot my computer on another OS, for example : I am on Suse disk1 program changes GRUB's variable and…
greg
  • 11
  • 2