grub-install on hybrid mbr disk












1















I followed the very detailed guide for making hybrid MBR record (GPT/MBR) taken from here



Now, gdisk says I have hybrid mbr. But I can only boot in UEFI and cannot do that in BIOS (I use external hard drive). Seems that simple execution of grub-install installs only uefi part. I saw the discussion about requirement for protective entry to be the first on the disk, so I made it the first and that is not the root cause.



So the question is how to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?



$ sudo gdisk /dev/sdd



GPT fdisk (gdisk) version 1.0.1

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

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): o

Disk size is 468862128 sectors (223.6 GiB)
MBR disk identifier: 0x7213C4A0
MBR partitions:

Number Boot Start Sector End Sector Status Code
1 1 208895 primary 0xEE
2 * 208896 1196031 primary 0x83
3 1196032 135413759 primary 0x83
4 200425472 468860927 primary 0x83

Recovery/transformation command (? for help): p
Disk /dev/sdd: 468862128 sectors, 223.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 21773ad9-3d43-4832-85b7-6c841d20ce75
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 1-sector boundaries
Total free space is 62183 sectors (30.4 MiB)

Number Start (sector) End (sector) Size Code Name
1 63 80324 39.2 MiB EF00 Basic data partition
2 208896 1196031 482.0 MiB 8300 Basic data partition
3 1196032 135413759 64.0 GiB 8300
4 135413760 168968191 16.0 GiB 0700 Basic data partition
5 168968192 200425471 15.0 GiB 0700 Basic data partition
6 200425472 468860927 128.0 GiB 8300
7 81920 149503 33.0 MiB EF02


$ sudo parted /dev/sdd



GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA OCZ-VECTOR150 (scsi)
Disk /dev/sdd: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 32.3kB 41.1MB 41.1MB fat32 Basic data partition boot, esp
7 41.9MB 76.5MB 34.6MB bios_grub
2 107MB 612MB 505MB ext4 Basic data partition
3 612MB 69.3GB 68.7GB ext4
4 69.3GB 86.5GB 17.2GB linux-swap(v1) Basic data partition msftdata
5 86.5GB 103GB 16.1GB ntfs Basic data partition msftdata
6 103GB 240GB 137GB ext4


$ sudo grub-install



Installing for x86_64-efi platform.
Installation finished. No error reported.









share|improve this question




















  • 1





    Oh, this question fixed my pentium 4. It wouldn't boot with a 3TB disk, and sparkylinux fixed it with that link on gdisk. :) I know the bios is old, but since I had a blank hard drive, I just put a new OS onto it, and worked around the non-support for GPT.

    – marinara
    Feb 9 at 16:26


















1















I followed the very detailed guide for making hybrid MBR record (GPT/MBR) taken from here



Now, gdisk says I have hybrid mbr. But I can only boot in UEFI and cannot do that in BIOS (I use external hard drive). Seems that simple execution of grub-install installs only uefi part. I saw the discussion about requirement for protective entry to be the first on the disk, so I made it the first and that is not the root cause.



So the question is how to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?



$ sudo gdisk /dev/sdd



GPT fdisk (gdisk) version 1.0.1

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

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): o

Disk size is 468862128 sectors (223.6 GiB)
MBR disk identifier: 0x7213C4A0
MBR partitions:

Number Boot Start Sector End Sector Status Code
1 1 208895 primary 0xEE
2 * 208896 1196031 primary 0x83
3 1196032 135413759 primary 0x83
4 200425472 468860927 primary 0x83

Recovery/transformation command (? for help): p
Disk /dev/sdd: 468862128 sectors, 223.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 21773ad9-3d43-4832-85b7-6c841d20ce75
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 1-sector boundaries
Total free space is 62183 sectors (30.4 MiB)

Number Start (sector) End (sector) Size Code Name
1 63 80324 39.2 MiB EF00 Basic data partition
2 208896 1196031 482.0 MiB 8300 Basic data partition
3 1196032 135413759 64.0 GiB 8300
4 135413760 168968191 16.0 GiB 0700 Basic data partition
5 168968192 200425471 15.0 GiB 0700 Basic data partition
6 200425472 468860927 128.0 GiB 8300
7 81920 149503 33.0 MiB EF02


$ sudo parted /dev/sdd



GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA OCZ-VECTOR150 (scsi)
Disk /dev/sdd: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 32.3kB 41.1MB 41.1MB fat32 Basic data partition boot, esp
7 41.9MB 76.5MB 34.6MB bios_grub
2 107MB 612MB 505MB ext4 Basic data partition
3 612MB 69.3GB 68.7GB ext4
4 69.3GB 86.5GB 17.2GB linux-swap(v1) Basic data partition msftdata
5 86.5GB 103GB 16.1GB ntfs Basic data partition msftdata
6 103GB 240GB 137GB ext4


$ sudo grub-install



Installing for x86_64-efi platform.
Installation finished. No error reported.









share|improve this question




















  • 1





    Oh, this question fixed my pentium 4. It wouldn't boot with a 3TB disk, and sparkylinux fixed it with that link on gdisk. :) I know the bios is old, but since I had a blank hard drive, I just put a new OS onto it, and worked around the non-support for GPT.

    – marinara
    Feb 9 at 16:26
















1












1








1








I followed the very detailed guide for making hybrid MBR record (GPT/MBR) taken from here



Now, gdisk says I have hybrid mbr. But I can only boot in UEFI and cannot do that in BIOS (I use external hard drive). Seems that simple execution of grub-install installs only uefi part. I saw the discussion about requirement for protective entry to be the first on the disk, so I made it the first and that is not the root cause.



So the question is how to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?



$ sudo gdisk /dev/sdd



GPT fdisk (gdisk) version 1.0.1

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

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): o

Disk size is 468862128 sectors (223.6 GiB)
MBR disk identifier: 0x7213C4A0
MBR partitions:

Number Boot Start Sector End Sector Status Code
1 1 208895 primary 0xEE
2 * 208896 1196031 primary 0x83
3 1196032 135413759 primary 0x83
4 200425472 468860927 primary 0x83

Recovery/transformation command (? for help): p
Disk /dev/sdd: 468862128 sectors, 223.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 21773ad9-3d43-4832-85b7-6c841d20ce75
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 1-sector boundaries
Total free space is 62183 sectors (30.4 MiB)

Number Start (sector) End (sector) Size Code Name
1 63 80324 39.2 MiB EF00 Basic data partition
2 208896 1196031 482.0 MiB 8300 Basic data partition
3 1196032 135413759 64.0 GiB 8300
4 135413760 168968191 16.0 GiB 0700 Basic data partition
5 168968192 200425471 15.0 GiB 0700 Basic data partition
6 200425472 468860927 128.0 GiB 8300
7 81920 149503 33.0 MiB EF02


$ sudo parted /dev/sdd



GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA OCZ-VECTOR150 (scsi)
Disk /dev/sdd: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 32.3kB 41.1MB 41.1MB fat32 Basic data partition boot, esp
7 41.9MB 76.5MB 34.6MB bios_grub
2 107MB 612MB 505MB ext4 Basic data partition
3 612MB 69.3GB 68.7GB ext4
4 69.3GB 86.5GB 17.2GB linux-swap(v1) Basic data partition msftdata
5 86.5GB 103GB 16.1GB ntfs Basic data partition msftdata
6 103GB 240GB 137GB ext4


$ sudo grub-install



Installing for x86_64-efi platform.
Installation finished. No error reported.









share|improve this question
















I followed the very detailed guide for making hybrid MBR record (GPT/MBR) taken from here



Now, gdisk says I have hybrid mbr. But I can only boot in UEFI and cannot do that in BIOS (I use external hard drive). Seems that simple execution of grub-install installs only uefi part. I saw the discussion about requirement for protective entry to be the first on the disk, so I made it the first and that is not the root cause.



So the question is how to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?



$ sudo gdisk /dev/sdd



GPT fdisk (gdisk) version 1.0.1

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

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): o

Disk size is 468862128 sectors (223.6 GiB)
MBR disk identifier: 0x7213C4A0
MBR partitions:

Number Boot Start Sector End Sector Status Code
1 1 208895 primary 0xEE
2 * 208896 1196031 primary 0x83
3 1196032 135413759 primary 0x83
4 200425472 468860927 primary 0x83

Recovery/transformation command (? for help): p
Disk /dev/sdd: 468862128 sectors, 223.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 21773ad9-3d43-4832-85b7-6c841d20ce75
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 1-sector boundaries
Total free space is 62183 sectors (30.4 MiB)

Number Start (sector) End (sector) Size Code Name
1 63 80324 39.2 MiB EF00 Basic data partition
2 208896 1196031 482.0 MiB 8300 Basic data partition
3 1196032 135413759 64.0 GiB 8300
4 135413760 168968191 16.0 GiB 0700 Basic data partition
5 168968192 200425471 15.0 GiB 0700 Basic data partition
6 200425472 468860927 128.0 GiB 8300
7 81920 149503 33.0 MiB EF02


$ sudo parted /dev/sdd



GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA OCZ-VECTOR150 (scsi)
Disk /dev/sdd: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 32.3kB 41.1MB 41.1MB fat32 Basic data partition boot, esp
7 41.9MB 76.5MB 34.6MB bios_grub
2 107MB 612MB 505MB ext4 Basic data partition
3 612MB 69.3GB 68.7GB ext4
4 69.3GB 86.5GB 17.2GB linux-swap(v1) Basic data partition msftdata
5 86.5GB 103GB 16.1GB ntfs Basic data partition msftdata
6 103GB 240GB 137GB ext4


$ sudo grub-install



Installing for x86_64-efi platform.
Installation finished. No error reported.






partition grub2 gpt mbr






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 4 '16 at 0:19







Grief

















asked Nov 3 '16 at 14:35









GriefGrief

1235




1235








  • 1





    Oh, this question fixed my pentium 4. It wouldn't boot with a 3TB disk, and sparkylinux fixed it with that link on gdisk. :) I know the bios is old, but since I had a blank hard drive, I just put a new OS onto it, and worked around the non-support for GPT.

    – marinara
    Feb 9 at 16:26
















  • 1





    Oh, this question fixed my pentium 4. It wouldn't boot with a 3TB disk, and sparkylinux fixed it with that link on gdisk. :) I know the bios is old, but since I had a blank hard drive, I just put a new OS onto it, and worked around the non-support for GPT.

    – marinara
    Feb 9 at 16:26










1




1





Oh, this question fixed my pentium 4. It wouldn't boot with a 3TB disk, and sparkylinux fixed it with that link on gdisk. :) I know the bios is old, but since I had a blank hard drive, I just put a new OS onto it, and worked around the non-support for GPT.

– marinara
Feb 9 at 16:26







Oh, this question fixed my pentium 4. It wouldn't boot with a 3TB disk, and sparkylinux fixed it with that link on gdisk. :) I know the bios is old, but since I had a blank hard drive, I just put a new OS onto it, and worked around the non-support for GPT.

– marinara
Feb 9 at 16:26












1 Answer
1






active

oldest

votes


















0















How to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?




You should create a bios boot partition labled bios_grub. This partition need to be created before GRUB installation .




For GRUB to boot from a GPT-partitioned disk on a BIOS-based system, a BIOS boot partition is required. Please note that this partition is unrelated to the /boot mountpoint, and will be used by GRUB directly. Do not create a filesystem on it, and do not mount it.




How to create the bios boot partition? What is the minimum size?




When creating a BIOS Boot Partition on a GPT system, you should make sure that it is at least 31 KiB in size. (GPT-formatted disks are not usually particularly small, so we recommend that you make it larger than the bare minimum, such as 1 MiB, to allow plenty of room for growth.) You must also make sure that it has the proper partition type. Using GNU Parted, you can set this using a command such as the following:



parted /dev/disk set partition-number bios_grub on







share|improve this answer
























  • I've created this partition, but that didn't the trick. Same result - system is booting with UEFI but not with BIOS. I've updated the question with some output, maybe it would be helpful

    – Grief
    Nov 4 '16 at 0:08











  • From your Bios settings switch to Legacy boot

    – GAD3R
    Nov 4 '16 at 7:30











  • Doesn't help either.

    – Grief
    Nov 4 '16 at 17:02











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f320825%2fgrub-install-on-hybrid-mbr-disk%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0















How to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?




You should create a bios boot partition labled bios_grub. This partition need to be created before GRUB installation .




For GRUB to boot from a GPT-partitioned disk on a BIOS-based system, a BIOS boot partition is required. Please note that this partition is unrelated to the /boot mountpoint, and will be used by GRUB directly. Do not create a filesystem on it, and do not mount it.




How to create the bios boot partition? What is the minimum size?




When creating a BIOS Boot Partition on a GPT system, you should make sure that it is at least 31 KiB in size. (GPT-formatted disks are not usually particularly small, so we recommend that you make it larger than the bare minimum, such as 1 MiB, to allow plenty of room for growth.) You must also make sure that it has the proper partition type. Using GNU Parted, you can set this using a command such as the following:



parted /dev/disk set partition-number bios_grub on







share|improve this answer
























  • I've created this partition, but that didn't the trick. Same result - system is booting with UEFI but not with BIOS. I've updated the question with some output, maybe it would be helpful

    – Grief
    Nov 4 '16 at 0:08











  • From your Bios settings switch to Legacy boot

    – GAD3R
    Nov 4 '16 at 7:30











  • Doesn't help either.

    – Grief
    Nov 4 '16 at 17:02
















0















How to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?




You should create a bios boot partition labled bios_grub. This partition need to be created before GRUB installation .




For GRUB to boot from a GPT-partitioned disk on a BIOS-based system, a BIOS boot partition is required. Please note that this partition is unrelated to the /boot mountpoint, and will be used by GRUB directly. Do not create a filesystem on it, and do not mount it.




How to create the bios boot partition? What is the minimum size?




When creating a BIOS Boot Partition on a GPT system, you should make sure that it is at least 31 KiB in size. (GPT-formatted disks are not usually particularly small, so we recommend that you make it larger than the bare minimum, such as 1 MiB, to allow plenty of room for growth.) You must also make sure that it has the proper partition type. Using GNU Parted, you can set this using a command such as the following:



parted /dev/disk set partition-number bios_grub on







share|improve this answer
























  • I've created this partition, but that didn't the trick. Same result - system is booting with UEFI but not with BIOS. I've updated the question with some output, maybe it would be helpful

    – Grief
    Nov 4 '16 at 0:08











  • From your Bios settings switch to Legacy boot

    – GAD3R
    Nov 4 '16 at 7:30











  • Doesn't help either.

    – Grief
    Nov 4 '16 at 17:02














0












0








0








How to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?




You should create a bios boot partition labled bios_grub. This partition need to be created before GRUB installation .




For GRUB to boot from a GPT-partitioned disk on a BIOS-based system, a BIOS boot partition is required. Please note that this partition is unrelated to the /boot mountpoint, and will be used by GRUB directly. Do not create a filesystem on it, and do not mount it.




How to create the bios boot partition? What is the minimum size?




When creating a BIOS Boot Partition on a GPT system, you should make sure that it is at least 31 KiB in size. (GPT-formatted disks are not usually particularly small, so we recommend that you make it larger than the bare minimum, such as 1 MiB, to allow plenty of room for growth.) You must also make sure that it has the proper partition type. Using GNU Parted, you can set this using a command such as the following:



parted /dev/disk set partition-number bios_grub on







share|improve this answer














How to install GRUB so it would boot OS both being started from BIOS/MBR and UEFI/GPT?




You should create a bios boot partition labled bios_grub. This partition need to be created before GRUB installation .




For GRUB to boot from a GPT-partitioned disk on a BIOS-based system, a BIOS boot partition is required. Please note that this partition is unrelated to the /boot mountpoint, and will be used by GRUB directly. Do not create a filesystem on it, and do not mount it.




How to create the bios boot partition? What is the minimum size?




When creating a BIOS Boot Partition on a GPT system, you should make sure that it is at least 31 KiB in size. (GPT-formatted disks are not usually particularly small, so we recommend that you make it larger than the bare minimum, such as 1 MiB, to allow plenty of room for growth.) You must also make sure that it has the proper partition type. Using GNU Parted, you can set this using a command such as the following:



parted /dev/disk set partition-number bios_grub on








share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 3 '16 at 14:59









GAD3RGAD3R

27.4k1858114




27.4k1858114













  • I've created this partition, but that didn't the trick. Same result - system is booting with UEFI but not with BIOS. I've updated the question with some output, maybe it would be helpful

    – Grief
    Nov 4 '16 at 0:08











  • From your Bios settings switch to Legacy boot

    – GAD3R
    Nov 4 '16 at 7:30











  • Doesn't help either.

    – Grief
    Nov 4 '16 at 17:02



















  • I've created this partition, but that didn't the trick. Same result - system is booting with UEFI but not with BIOS. I've updated the question with some output, maybe it would be helpful

    – Grief
    Nov 4 '16 at 0:08











  • From your Bios settings switch to Legacy boot

    – GAD3R
    Nov 4 '16 at 7:30











  • Doesn't help either.

    – Grief
    Nov 4 '16 at 17:02

















I've created this partition, but that didn't the trick. Same result - system is booting with UEFI but not with BIOS. I've updated the question with some output, maybe it would be helpful

– Grief
Nov 4 '16 at 0:08





I've created this partition, but that didn't the trick. Same result - system is booting with UEFI but not with BIOS. I've updated the question with some output, maybe it would be helpful

– Grief
Nov 4 '16 at 0:08













From your Bios settings switch to Legacy boot

– GAD3R
Nov 4 '16 at 7:30





From your Bios settings switch to Legacy boot

– GAD3R
Nov 4 '16 at 7:30













Doesn't help either.

– Grief
Nov 4 '16 at 17:02





Doesn't help either.

– Grief
Nov 4 '16 at 17:02


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f320825%2fgrub-install-on-hybrid-mbr-disk%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀