The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Install/GPT Partitioning/zh-cn"
Mmwweettyy (talk | contribs) (Created page with "'''创建分区 2'''(交换)''':'''") |
(Updating to match new version of source page) |
||
(13 intermediate revisions by one other user not shown) | |||
Line 8: | Line 8: | ||
==== UEFI/GPT 方法 ==== | ==== UEFI/GPT 方法 ==== | ||
{{Note| | {{Note|如果对使用 UEFI 启动感兴趣,并且 Funtoo LiveCD 初始启动菜单是黑白的,或者系统启动时没有启动菜单,请使用此方法。如果是淡蓝色的,这个方法将不起作用。相反,使用上一节的说明,然后跳过这一节,或者先在 UEFI 模式下重新启动 LiveCD。}} | ||
{{Note| | {{Note|你可以在 GPT 分区表中建立传统模式,但它需要一个 BIOS 启动分区,参见[[Talk:Install/GPT_Partitioning]]}} | ||
创建 GPT 分区表的 {{c|gdisk}} 命令如下。根据需要调整大小,尽管这些默认值对大多数用户都适用。启动 {{c|gdisk}}: | |||
{{console|body=###i## gdisk /dev/sda}} | {{console|body=###i## gdisk /dev/sda}} | ||
Line 18: | Line 18: | ||
在 {{c|gdisk}} 中,按照以下步骤操作: | 在 {{c|gdisk}} 中,按照以下步骤操作: | ||
''' | '''创建一个新的空分区表'''(这''将会''在保存时擦除磁盘上的所有数据): | ||
{{console|body= | {{console|body= | ||
Command: ##i##o ↵ | Command: ##i##o ↵ | ||
Line 24: | Line 24: | ||
Proceed? (Y/N): ##i##y ↵ | Proceed? (Y/N): ##i##y ↵ | ||
}} | }} | ||
''' | '''创建分区 1''' (引导)''':''' | ||
{{console|body= | {{console|body= | ||
Line 34: | Line 34: | ||
}} | }} | ||
'''创建分区 2''' | '''创建分区 2'''(交换): | ||
{{console|body= | {{console|body= | ||
Line 44: | Line 44: | ||
}} | }} | ||
''' | '''创建分区 3'''(根目录): | ||
<div class="mw-translate-fuzzy"> | |||
{{console|body= | {{console|body= | ||
Command: ##i##n ↵ | Command: ##i##n ↵ | ||
Line 53: | Line 54: | ||
Hex Code: ##i##↵ | Hex Code: ##i##↵ | ||
}} | }} | ||
(可选)如果希望使用磁盘标签而不是 /dev/sdXX(其中 XX 是磁盘和分区编号),请这样做: | |||
{{console|body= | {{console|body= | ||
Command: ##i##c ↵ | Command: ##i##c ↵ | ||
Line 65: | Line 66: | ||
Enter name: ##i##ROOT | Enter name: ##i##ROOT | ||
}} | }} | ||
</div> | |||
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: | ||
''' | '''将分区表写入磁盘:''' | ||
{{console|body= | {{console|body= | ||
Line 74: | Line 76: | ||
Do you want to proceed? (Y/N): ##i##Y ↵ | Do you want to proceed? (Y/N): ##i##Y ↵ | ||
}} | }} | ||
分区表现在将被写入磁盘,{{c|gdisk}} 将关闭。 | |||
现在,GPT/GUID 分区已经创建,并将在 Linux 下显示为以下“块设备”: | |||
* {{c|/dev/sda1}} | * {{c|/dev/sda1}},将用于存放 {{c|/boot}} 文件系统, | ||
* {{c|/dev/sda2}} | * {{c|/dev/sda2}},将用于交换空间,以及 | ||
* {{c|/dev/sda3}} | * {{c|/dev/sda3}},将存放根文件系统。 | ||
{{Tip| | {{Tip|可以通过运行命令 {{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> |
Latest revision as of 04:27, December 13, 2021
安装指南:GPT 分区
Install Guide, Chapter 4 | < Prev | Next > |
UEFI/GPT 方法
如果对使用 UEFI 启动感兴趣,并且 Funtoo LiveCD 初始启动菜单是黑白的,或者系统启动时没有启动菜单,请使用此方法。如果是淡蓝色的,这个方法将不起作用。相反,使用上一节的说明,然后跳过这一节,或者先在 UEFI 模式下重新启动 LiveCD。
你可以在 GPT 分区表中建立传统模式,但它需要一个 BIOS 启动分区,参见Talk:Install/GPT_Partitioning
创建 GPT 分区表的 gdisk
命令如下。根据需要调整大小,尽管这些默认值对大多数用户都适用。启动 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
,将存放根文件系统。
可以通过运行命令 lsblk
来验证上面的块设备是否正确创建。
Install Guide, Chapter 4 | < Prev | Next > |