Install/MBR Partitioning/zh-cn
< Install
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
安装指南: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 > |