Difference between revisions of "Install/GPT Partitioning/zh-cn"

From Funtoo
Jump to navigation Jump to search
(Created page with "'''创建一个新的空分区表'''(这''将会''在保存时擦除磁盘上的所有数据): {{console|body= Command: ##i##o ↵ This option deletes all partitions and...")
(Created page with "* {{c|/dev/sda1}},将用于存放 {{c|/boot}} 文件系统, * {{c|/dev/sda2}},将用于交换空间,以及 * {{c|/dev/sda3}},将存放根文件系统。")
Line 78: Line 78:
现在,GPT/GUID 分区已经创建,并将在 Linux 下显示为以下“块设备”:
现在,GPT/GUID 分区已经创建,并将在 Linux 下显示为以下“块设备”:


* {{c|/dev/sda1}}, which will be used to hold the {{c|/boot}} filesystem,
* {{c|/dev/sda1}},将用于存放 {{c|/boot}} 文件系统,
* {{c|/dev/sda2}}, which will be used for swap space, and
* {{c|/dev/sda2}},将用于交换空间,以及
* {{c|/dev/sda3}}, which will hold your root filesystem.
* {{c|/dev/sda3}},将存放根文件系统。


{{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}}.}}
<noinclude>{{InstallNavigation|num=4|prev=MBR Partitioning|next=Creating Filesystems|align=right}}</noinclude>
<noinclude>{{InstallNavigation|num=4|prev=MBR Partitioning|next=Creating Filesystems|align=right}}</noinclude>

Revision as of 16:37, March 14, 2021

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

安装指南:GPT 分区

Install Guide, Chapter 4 < Prev Next >

UEFI/GPT 方法

   Note

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

   Note

You can build legacy mode into your GPT partition table but it requires a BIOS Boot partition. see Talk:Install/GPT_Partitioning

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

gdisk 中,按照以下步骤操作:

创建一个新的空分区表(这将会在保存时擦除磁盘上的所有数据):

Command: o ↵
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y ↵

创建分区 1 (引导)

Command: n ↵
Partition Number: 1 ↵
First sector: 
Last sector: +128M ↵
Hex Code: EF00 ↵

创建分区 2(交换)

Command: n ↵
Partition Number: 2 ↵
First sector: 
Last sector: +4G ↵
Hex Code: 8200 ↵

创建分区 3(根目录)

Command: n ↵
Partition Number: 3 ↵
First sector: 
Last sector:  (for rest of disk)
Hex Code: 

(可选)如果希望使用磁盘标签而不是 /dev/sdXX(其中 XX 是磁盘和分区编号),请这样做:

Command: c ↵
Partition Number: 1
Enter name: BOOT 
Command: c ↵
Partition Number: 2
Enter name: swap
Command: c ↵
Partition Number: 3
Enter name: ROOT

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:

将分区表写入磁盘:

Command: w ↵
Do you want to proceed? (Y/N): Y ↵

分区表现在将被写入磁盘,gdisk 将关闭。

现在,GPT/GUID 分区已经创建,并将在 Linux 下显示为以下“块设备”:

  • /dev/sda1,将用于存放 /boot 文件系统,
  • /dev/sda2,将用于交换空间,以及
  • /dev/sda3,将存放根文件系统。
   Tip

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

Install Guide, Chapter 4 < Prev Next >