grub2-install boot loader on the GPT formated disk

0

I have a problem with hdd that is formatted to GPT with linux Fedora 28 on it, with working EFI boot. I had to move it to an old MB which doesn't support EFI. I can't or don't want to reformat to MSDOS, as will eventually go back to newer MB
df

Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sdb2      102687672 11715644  85712764  13% /
/dev/sdb1        1046512     8992   1037520   1% /boot/efi
/dev/sdb4       36894176 13898884  21091472  40% /var
/dev/sdb5       17414928    99124  16408132   1% /tmp
/dev             1989924        0   1989924   0% /dev
/dev/shm         2009320        0   2009320   0% /dev/shm

I've updated disk to be hybrid with gdisk /dev/sdb

GPT fdisk (gdisk) version 1.0.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 937703088 sectors, 447.1 GiB
Model: SATA SSD        
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): A6BD6DE4-21FC-449D-A89D-3DCB84177B6D
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 937703054
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         2099199   1024.0 MiB  EF02  
   2         2099200       211814399   100.0 GiB   8300  
   3       211814400       790628351   276.0 GiB   8300  
   4       790628352       866125823   36.0 GiB    8300  
   5       866125824       901777407   17.0 GiB    8300  
   6       901777408       937703054   17.1 GiB    8200  

Command (? for help): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 4 2 1
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y

Creating entry for GPT partition #4 (MBR partition #2)
Enter an MBR hex code (default 83): 
Set the bootable flag? (Y/N): N

Creating entry for GPT partition #2 (MBR partition #3)
Enter an MBR hex code (default 83): 
Set the bootable flag? (Y/N): N

Creating entry for GPT partition #1 (MBR partition #4)
Enter an MBR hex code (default EF): 
Set the bootable flag? (Y/N): Y

Recovery/transformation command (? for help): o

Disk size is 937703088 sectors (447.1 GiB)
MBR disk identifier: 0x00000000
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1                     1         2047   primary     0xEE
   2             790628352    866125823   primary     0x83
   3               2099200    211814399   primary     0x83
   4      *           2048      2099199   primary     0xEF

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdb.
The operation has completed successfully.

grub2-mkconfig -o /boot/grub2/grub.cfg => works fine grub2-install /dev/sdb => works fine

so everything shows no errors in chroot environment, but it doesn't boot when I select this HDD to boot from bios. Thanks for help. Denis

boot
bios
gpt
grub2
asked on Super User Apr 10, 2021 by Denis

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0