Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

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

From Funtoo
Jump to navigation Jump to search
(Created page with "現在,建議你清除所有現存的MBR或GPT分割表,他會影響BIOS在開機時的工作,我們使用{{c|sgdisk}}來達成目的ː")
(Created page with "{{Warning|這會使任何現存的分割區消失!!!!!! "強烈" 警告與建議 你在執行之前先行備份}}")
Line 28: Line 28:
現在,建議你清除所有現存的MBR或GPT分割表,他會影響BIOS在開機時的工作,我們使用{{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=

Revision as of 16:19, September 8, 2019

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

安裝教學 : MBR分割

Install Guide, Chapter 3 < Prev Next >

Legacy (BIOS/MBR) 方法

   Note

如果你正在使用BIOS來啟動且你System Rescue CD的開機選單是淺藍色的,使用這個方法。如果你想要使用UEFT/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

root #         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.

This output is also nothing to worry about, as the command still succeeded:

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

Now we will use fdisk to create the MBR partition table and partitions:

root # fdisk /dev/sda

fdisk中依照下列指示操作:

清空分割表:

Command (m for help): o ↵

建立分割區1: (boot)

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

建立分割區2 (swap):

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 ↵

建立root分割區:

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

You're done with partitioning! Now, jump over to Creating filesystems.