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

From Funtoo
Jump to navigation Jump to search
(Created page with "{{Warning|这将使任何现有分区无法访问! 强烈提醒并建议在继续之前备份一切关键数据。}}")
 
(14 intermediate revisions by the same user not shown)
Line 8: Line 8:
==== 传统(BIOS/MBR)方法 ====  
==== 传统(BIOS/MBR)方法 ====  


{{Note|Use this method if you are booting using your BIOS, and if your Funtoo LiveCD initial boot menu was light blue. If you're going to use the UEFI/GPT disk format, then please proceed to the next section.}}
{{Note|如果使用 BIOS 启动,并且 Funtoo LiveCD 初始启动菜单是浅蓝色的,就使用这个方法。如果要使用 UEFI/GPT 磁盘格式,那么请至下一节继续。}}


First, it's a good idea to make sure that you've found the correct hard disk to partition. Try this command and verify that {{f|/dev/sda}} is the disk that you want to partition:
首先,需要找到正确的硬盘来进行分区。尝试下列命令验证 {{f|/dev/sda}} 是要进行分区的硬盘:


{{console|body=
{{console|body=
Line 25: Line 25:
}}
}}


Now, it is recommended that you erase any existing MBR or GPT partition tables on the disk, which could confuse the system's BIOS at boot time. We accomplish this using {{c|sgdisk}}:
现在,建议擦除磁盘上任何现有的 MBR GPT 分区表,否则可能会在启动时混淆系统的 BIOS。我们使用 {{c|sgdisk}} 来完成这项工作。


{{Warning|This will make any existing partitions inaccessible! You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}
{{Warning|这将使任何现有分区无法访问! 强烈提醒并建议在继续之前备份一切关键数据。}}


{{console|body=
{{console|body=
Line 37: Line 37:
}}
}}


This output is also nothing to worry about, as the command still succeeded:
如果输出这样的结果也不必担心,因为命令还是成功了:


{{console|body=
{{console|body=
Line 46: Line 46:
}}
}}


Now we will use {{c|fdisk}} to create the MBR partition table and partitions:
现在我们将使用 {{c|fdisk}} 创建 MBR 分区表和分区:


{{console|body=
{{console|body=
Line 52: Line 52:
}}
}}


Within {{c|fdisk}}, follow these steps:
{{c|gdisk}} 中,按照以下步骤操作:


'''清空分区表:'''
'''清空分区表:'''
Line 60: Line 60:
}}
}}


'''创建分区 1:'''(引导):
'''创建分区 1'''(引导)''':'''


{{console|body=
{{console|body=
Line 70: Line 70:
}}
}}


'''Create Partition 2''' (swap):
'''创建分区 2'''(交换)''':'''


{{console|body=
{{console|body=
Line 111: Line 111:
}}
}}


'''Write the partition table to disk:'''
'''将分区表写入磁盘:'''


{{console|body=Command (m for help): ##i##w}}
{{console|body=Command (m for help): ##i##w}}


Your new MBR partition table will now be written to your system disk.
新的 MBR 分区表现在将被写入系统磁盘。


{{Note|You're done with partitioning! Now, jump over to [[{{BASEPAGENAME}}#Creating filesystems|Creating filesystems]].}}
{{Note|你已经完成了分区!现在,跳转至 [[{{BASEPAGENAME}}#Creating filesystems|创建文件系统]]}}


<noinclude>{{InstallNavigation|num=3|prev=Prepare Disk|next=GPT Partitioning|align=right}}</noinclude>
<noinclude>{{InstallNavigation|num=3|prev=Prepare Disk|next=GPT Partitioning|align=right}}</noinclude>

Latest revision as of 16:15, March 14, 2021

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

安装指南:MBR 分区

Install Guide, Chapter 3 < Prev Next >

传统(BIOS/MBR)方法

   Note

如果使用 BIOS 启动,并且 Funtoo LiveCD 初始启动菜单是浅蓝色的,就使用这个方法。如果要使用 UEFI/GPT 磁盘格式,那么请至下一节继续。

首先,需要找到正确的硬盘来进行分区。尝试下列命令验证 /dev/sda 是要进行分区的硬盘:

root # fdisk -l /dev/sda

Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt

#         Start          End    Size  Type            Name
 1         2048   1250263694  596.2G  Linux filesyste Linux filesystem

现在,建议擦除磁盘上任何现有的 MBR 或 GPT 分区表,否则可能会在启动时混淆系统的 BIOS。我们使用 sgdisk 来完成这项工作。

   Warning

这将使任何现有分区无法访问! 强烈提醒并建议在继续之前备份一切关键数据。

root # sgdisk --zap-all /dev/sda

Creating new GPT entries.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.

如果输出这样的结果也不必担心,因为命令还是成功了:

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************

现在我们将使用 fdisk 创建 MBR 分区表和分区:

root # fdisk /dev/sda

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

清空分区表:

Command (m for help): o ↵

创建分区 1(引导)

Command (m for help): n ↵
Partition type (default p): 
Partition number (1-4, default 1): 
First sector: 
Last sector: +128M ↵

创建分区 2(交换)

Command (m for help): n ↵
Partition type (default p): 
Partition number (2-4, default 2): 
First sector: 
Last sector: +2G ↵
Command (m for help): t ↵ 
Partition number (1,2, default 2): 
Hex code (type L to list all codes): 82 ↵

创建根目录分区:

Command (m for help): n ↵
Partition type (default p): 
Partition number (3,4, default 3): 
First sector: 
Last sector: 

验证分区表:

Command (m for help): p

Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x82abc9a6

Device    Boot     Start       End    Blocks  Id System
/dev/sda1           2048    264191    131072  83 Linux
/dev/sda2         264192   4458495   2097152  82 Linux swap / Solaris
/dev/sda3        4458496 625142447 310341976  83 Linux

将分区表写入磁盘:

Command (m for help): w

新的 MBR 分区表现在将被写入系统磁盘。

   Note

你已经完成了分区!现在,跳转至 创建文件系统

Install Guide, Chapter 3 < Prev Next >