Difference between revisions of "Install/GPT Partitioning"

From Funtoo
Jump to navigation Jump to search
m (Suggest users skip UEFI section if they are not using it.)
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{InstallNavigation|num=4|prev=MBR Partitioning|next=Creating Filesystems}}</noinclude>
<translate>
<includeonly>
== GPT Partitioning == <!--T:1-->
</includeonly><noinclude><languages/>
= Install Guide: GPT Partitioning =


==== UEFI/GPT Method ====
<!--T:19-->
{{InstallNavigation|num=4|prev=MBR Partitioning|next=Creating Filesystems}}</noinclude>


{{Note|Use this method if you are interested in booting using UEFI, and if your System Rescue CD initial boot menu was black and white. If it was light blue, this method will not work.}}
==== UEFI/GPT Method ==== <!--T:2-->


<!--T:3-->
{{Note|Use this method if you are interested in booting using UEFI, and if your System Rescue CD initial boot menu was black and white. If it was light blue, this method will not work. Instead, use the instructions in the previous section then skip this section, or reboot SystemRescueCD in UEFI mode first.}}
<!--T:4-->
The {{c|gdisk}} commands to create a GPT partition table are as follows. Adapt sizes as necessary, although these defaults will work for most users. Start {{c|gdisk}}:
The {{c|gdisk}} commands to create a GPT partition table are as follows. Adapt sizes as necessary, although these defaults will work for most users. Start {{c|gdisk}}:


<!--T:5-->
{{console|body=###i## gdisk /dev/sda}}
{{console|body=###i## gdisk /dev/sda}}


<!--T:6-->
Within {{c|gdisk}}, follow these steps:
Within {{c|gdisk}}, follow these steps:


<!--T:7-->
'''Create a new empty partition table''' (This ''will'' erase all data on the disk when saved):
'''Create a new empty partition table''' (This ''will'' erase all data on the disk when saved):
{{console|body=
{{console|body=
Line 19: Line 31:
'''Create Partition 1''' (boot):
'''Create Partition 1''' (boot):


<!--T:8-->
{{console|body=
{{console|body=
Command: ##i##n ↵
Command: ##i##n ↵
Line 27: Line 40:
}}
}}


<!--T:9-->
'''Create Partition 2''' (swap):
'''Create Partition 2''' (swap):


<!--T:10-->
{{console|body=
{{console|body=
Command: ##i##n ↵
Command: ##i##n ↵
Line 37: Line 52:
}}
}}


<!--T:11-->
'''Create Partition 3''' (root):
'''Create Partition 3''' (root):


<!--T:12-->
{{console|body=
{{console|body=
Command: ##i##n ↵
Command: ##i##n ↵
Line 47: Line 64:
}}
}}


<!--T:13-->
Along the way, you can type "{{c|p}}" and hit Enter to view your current partition table. If you make a mistake, you can type "{{c|d}}" to delete an existing partition that you created. When you are satisfied with your partition setup, type "{{c|w}}" to write your configuration to disk:
Along the way, you can type "{{c|p}}" and hit Enter to view your current partition table. If you make a mistake, you can type "{{c|d}}" to delete an existing partition that you created. When you are satisfied with your partition setup, type "{{c|w}}" to write your configuration to disk:


<!--T:14-->
'''Write Partition Table To Disk''':
'''Write Partition Table To Disk''':


<!--T:15-->
{{console|body=
{{console|body=
Command: ##i##w ↵
Command: ##i##w ↵
Line 57: Line 77:
The partition table will now be written to the disk and {{c|gdisk}} will close.
The partition table will now be written to the disk and {{c|gdisk}} will close.


<!--T:16-->
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:


<!--T:17-->
* {{c|/dev/sda1}}, which will be used to hold the {{c|/boot}} filesystem,  
* {{c|/dev/sda1}}, which will be used to hold the {{c|/boot}} filesystem,  
* {{c|/dev/sda2}}, which will be used for swap space, and  
* {{c|/dev/sda2}}, which will be used for swap space, and  
* {{c|/dev/sda3}}, which will hold your root filesystem.
* {{c|/dev/sda3}}, which will hold your root filesystem.


<!--T:18-->
{{Tip|You can verify that the block devices above were correctly created by running the command {{c|lsblk}}.}}
{{Tip|You can verify that the block devices above were correctly created by running the command {{c|lsblk}}.}}
</translate>
<noinclude>{{InstallNavigation|num=4|prev=MBR Partitioning|next=Creating Filesystems|align=right}}</noinclude>

Revision as of 16:13, September 22, 2019

Other languages:
English • ‎español • ‎polski • ‎português do Brasil • ‎русский • ‎中文(中国大陆)‎

Install Guide: GPT Partitioning

Install Guide, Chapter 4 < Prev Next >

UEFI/GPT Method

   Note

Use this method if you are interested in booting using UEFI, and if your System Rescue CD initial boot menu was black and white. If it was light blue, this method will not work. Instead, use the instructions in the previous section then skip this section, or reboot SystemRescueCD in UEFI mode first.

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 ↵

Create Partition 1 (boot):

Command: n ↵
Partition Number: 1 ↵
First sector: 
Last sector: +500M ↵
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: 

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.
   Tip

You can verify that the block devices above were correctly created by running the command lsblk.

Install Guide, Chapter 4 < Prev Next >