help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grub on BIOS/GPT


From: David Ventura
Subject: Grub on BIOS/GPT
Date: Sun, 20 Feb 2022 23:53:15 +0100

Hi
I'm trying to boot grub on a BIOS/GPT combination and am currently stuck.
I've created a test disk image with the following GPT partition (and
protective MBR):


Found valid GPT with protective MBR; using GPT.
Disk hdd-grub.raw: 131072 sectors, 64.0 MiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 488005E7-D3AF-4B71-AEE6-F54B497A63FC
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 131038
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            4095   1024.0 KiB  EF02  BIOS boot partition
   2            4096           65535   30.0 MiB    EF00  EFI system partition
   3           65536          131038   32.0 MiB    8300  Linux filesystem

On this disk image, I've applied the boot.img MBR like so:

    dd if=/usr/lib/grub/i386-pc/boot.img of=hdd-grub.raw bs=440
count=1 conv=notrunc
which successfully shows a "GRUB" prompt on BIOS.

The only thing I've done after this, is to apply the core.img on the
exact BIOS boot partition offset:

    dd if=core.img of=hdd-grub.raw bs=512 seek=2048 conv=notrunc

However, nothing different happens (the only thing I see is, still,
"GRUB" and a flashing cursor).
To be clear, I am _not_ seeing the emergency shell.

The core image I've generated with this command:
    grub-mkimage -O i386-pc -o ./core.img -p '(hd0,gpt3)/boot/grub'
biosdisk part_msdos xfs part_gpt

I've tried embedding an early config and actually populating
(hd0,gpt3)/boot/grub/grub.cfg out of desperation but that did not
help.

What am I doing wrong?

David

-- 
Stack is the new term for "I have no idea what I'm actually using".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]