The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Install/GPT Partitioning"
(clarify the purpose of the bios boot partition, remove optional because people were thinking it was an ok idea to not install it for problems they were having elsewhere, namely secureboot shim!) |
m (clear up that gpt supports legacy mode with bios boot. remove notes saying if you're booted in legacy mode or uefi mode.) |
||
Line 11: | Line 11: | ||
<!--T:3--> | <!--T:3--> | ||
{{Note| | {{Note|Everyone should use this method because it supports legacy mode, and UEFI.}} | ||
<!--T:20--> | <!--T:20--> | ||
{{Note|You can build legacy mode into your GPT partition table but it requires a BIOS Boot partition at the start of the disk.}} | {{Note|You can build legacy mode into your GPT partition table but it requires a 1M BIOS Boot partition at the start of the disk.}} | ||
<!--T:4--> | <!--T:4--> |
Revision as of 01:22, December 6, 2020
Install Guide: GPT Partitioning
Install Guide, Chapter 4 | < Prev | Next > |
UEFI/GPT Method
Everyone should use this method because it supports legacy mode, and UEFI.
You can build legacy mode into your GPT partition table but it requires a 1M BIOS Boot partition at the start of the disk.
The gdisk
commands to create a GPT partition table are as follows. Adapt sizes as necessary, although these defaults will work for most users. Start gdisk
:
root # gdisk /dev/sda
Within gdisk
, follow these steps:
Create a new empty partition table (This will erase all data on the disk when saved):
Command: o ↵ This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): y ↵
This partition is mandatory for booting in legacy mode. Your system might not boot without it, and it is used for debugging uefi. Create Partition 4 (BIOS Boot)
Command: n ↵ Partition Number: 4 ↵ First sector: ↵ Last sector: +1M ↵ Hex Code: EF02 ↵ Command: c ↵ Partition number: 4 Enter name: BIOS Boot
Create Partition 1 (boot):
Command: n ↵ Partition Number: 1 ↵ First sector: ↵ Last sector: +256M ↵ Hex Code: EF00 ↵
Create Partition 2 (swap):
Command: n ↵ Partition Number: 2 ↵ First sector: ↵ Last sector: +4G ↵ Hex Code: 8200 ↵
Create Partition 3 (root):
Command: n ↵ Partition Number: 3 ↵ First sector: ↵ Last sector: ↵ (for rest of disk) Hex Code: ↵
(Optional) If you wish to use PARTLABEL= /etc/fstab statements:
Command: c ↵ Partition Number: 1 Enter name: BOOT Command: c ↵ Partition Number: 2 Enter name: SWAP Command: c ↵ Partition Number: 3 Enter name: FUNTOO
Along the way, you can type "p
" and hit Enter to view your current partition table. If you make a mistake, you can type "d
" to delete an existing partition that you created. When you are satisfied with your partition setup, type "w
" to write your configuration to disk:
Write Partition Table To Disk:
Command: w ↵ Do you want to proceed? (Y/N): Y ↵
The partition table will now be written to the disk and gdisk
will close.
Now, your GPT/GUID partitions have been created, and will show up as the following block devices under Linux:
/dev/sda1
, which will be used to hold the/boot
filesystem,/dev/sda2
, which will be used for swap space, and/dev/sda3
, which will hold your root filesystem, and/dev/sda4
, which will enable legacy, & UEFI booting.
You can verify that the block devices above were correctly created by running the command lsblk
.
Install Guide, Chapter 4 | < Prev | Next > |