You are not logged in.

#1 2015-05-30 22:35:37

bpont
Banned
Registered: 2010-03-24
Posts: 161

[SOLVED] Creating a BIOS boot partition using gdisk

Using GRUB on legacy BIOS-based personal computers requires a BIOS boot partition if using a GUID Partition Table (GPT).  According to the wiki:


[. . .] there is a good chance that the first partition starts at sector 2048 for alignment reasons. That means at the beginning will be 1007 KiB of empty space where this bios-boot partition can be created. To do this, first do the mbr->gpt conversion with gdisk as described above. Afterwards, create a new partition with gdisk and manually specify its position to be sectors 34 - 2047, and set the EF02 partition type.

...however, doing this manually will result in the following error:

Information: Moved requested sector from 34 to 2048 in order to align on 2048-sector boundaries.  Use 'l' on the experts menu to adjust alignment

Assuming you have already converted from MBR to GPT, or are starting from a new disk, here is the procedure for correcting this error:

# gdisk /dev/sd[x]
Command: (? for help): r
Recovery/transformation command (? for help): x
Expert command (? for help): l
Enter the sector alignment value (1 - [variable], default = 2048): 34
Expert command (? for help): m
Command: (? for help): n
Partition number (1 - 128, default 1:) 1
First sector (34 - [variable], default = 34): 34
Last sector (34 - [variable], default = [variable]): 2047
Current type is 'Linux file system' 
Hex code or GUID (L to show codes, Enter = 8300): ef02
Changed type of partition to 'BIOS boot partition'
Command: (? for help): p

...the last command will verify that partition 1 starts at sector 34 and ends at sector 2047 with a size of 1007.0 KiB with a code of EF02 which is a BIOS boot partition. 

Now change the default sector alignment value back to the previous default:

Command: (? for help): r
Recovery/transformation command (? for help): x
Expert command (? for help): l
Enter the sector alignment value (1 - [variable], default = 2048): 2048
Expert command (? for help): m

From this point forward, you can create your remaining partitions as you wish.

Last edited by bpont (2015-05-30 22:39:23)

Offline

#2 2015-05-30 23:15:19

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,485
Website

Re: [SOLVED] Creating a BIOS boot partition using gdisk

This information should be on the wiki, not a forum post..


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB