The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Install/MBR Partitioning"
(Removed page from translation) |
m (Protected "Install/MBR Partitioning": create a draft in your user space and open a bug to change this page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(15 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<translate> | |||
<includeonly> | <includeonly> | ||
== MBR Partitioning == | == MBR Partitioning == <!--T:34--> | ||
</includeonly><noinclude> | </includeonly><noinclude><languages/> | ||
= Install Guide: MBR Partitioning = | = Install Guide: MBR Partitioning = | ||
<!--T:35--> | |||
{{InstallNavigation|num=3|prev=Prepare Disk|next=GPT Partitioning}}</noinclude> | {{InstallNavigation|num=3|prev=Prepare Disk|next=GPT Partitioning}}</noinclude> | ||
==== Legacy (BIOS/MBR) Method ==== | ==== Legacy (BIOS/MBR) Method ==== <!--T:36--> | ||
{{Note|Use this method if you are booting using your BIOS, and if your | <!--T:37--> | ||
{{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.}} | |||
<!--T:38--> | |||
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: | 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: | ||
<!--T:39--> | |||
{{console|body= | {{console|body= | ||
###i## fdisk -l /dev/sda | ###i## fdisk -l /dev/sda | ||
<!--T:40--> | |||
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors | Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors | ||
Units = sectors of 1 * 512 = 512 bytes | Units = sectors of 1 * 512 = 512 bytes | ||
Line 21: | Line 27: | ||
Disk label type: gpt | Disk label type: gpt | ||
# Start End Size Type Name | <!--T:41--> | ||
\# Start End Size Type Name | |||
1 2048 1250263694 596.2G Linux filesyste Linux filesystem | 1 2048 1250263694 596.2G Linux filesyste Linux filesystem | ||
}} | }} | ||
<!--T:42--> | |||
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}}: | 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}}: | ||
<!--T:43--> | |||
{{Warning|This will make any existing partitions inaccessible! You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}} | {{Warning|This will make any existing partitions inaccessible! You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}} | ||
<!--T:44--> | |||
{{console|body= | {{console|body= | ||
###i## sgdisk --zap-all /dev/sda | ###i## sgdisk --zap-all /dev/sda | ||
<!--T:45--> | |||
Creating new GPT entries. | Creating new GPT entries. | ||
GPT data structures destroyed! You may now partition the disk using fdisk or | GPT data structures destroyed! You may now partition the disk using fdisk or | ||
Line 37: | Line 48: | ||
}} | }} | ||
<!--T:46--> | |||
This output is also nothing to worry about, as the command still succeeded: | This output is also nothing to worry about, as the command still succeeded: | ||
<!--T:47--> | |||
{{console|body= | {{console|body= | ||
*************************************************************** | *************************************************************** | ||
Line 46: | Line 59: | ||
}} | }} | ||
<!--T:48--> | |||
Now we will use {{c|fdisk}} to create the MBR partition table and partitions: | Now we will use {{c|fdisk}} to create the MBR partition table and partitions: | ||
<!--T:49--> | |||
{{console|body= | {{console|body= | ||
###i## fdisk /dev/sda | ###i## fdisk /dev/sda | ||
}} | }} | ||
<!--T:50--> | |||
Within {{c|fdisk}}, follow these steps: | Within {{c|fdisk}}, follow these steps: | ||
<!--T:51--> | |||
'''Empty the partition table''': | '''Empty the partition table''': | ||
<!--T:52--> | |||
{{console|body= | {{console|body= | ||
Command (m for help): ##i##o ↵ | Command (m for help): ##i##o ↵ | ||
}} | }} | ||
<!--T:53--> | |||
'''Create Partition 1''' (boot): | '''Create Partition 1''' (boot): | ||
<!--T:54--> | |||
{{console|body= | {{console|body= | ||
Command (m for help): ##i##n ↵ | Command (m for help): ##i##n ↵ | ||
Line 70: | Line 90: | ||
}} | }} | ||
<!--T:55--> | |||
'''Create Partition 2''' (swap): | '''Create Partition 2''' (swap): | ||
<!--T:56--> | |||
{{console|body= | {{console|body= | ||
Command (m for help): ##i##n ↵ | Command (m for help): ##i##n ↵ | ||
Line 83: | Line 105: | ||
}} | }} | ||
<!--T:57--> | |||
'''Create the root partition:''' | '''Create the root partition:''' | ||
<!--T:58--> | |||
{{console|body= | {{console|body= | ||
Command (m for help): ##i##n ↵ | Command (m for help): ##i##n ↵ | ||
Line 93: | Line 117: | ||
}} | }} | ||
<!--T:59--> | |||
'''Verify the partition table:''' | '''Verify the partition table:''' | ||
<!--T:60--> | |||
{{console|body= | {{console|body= | ||
Command (m for help): ##i##p | Command (m for help): ##i##p | ||
<!--T:61--> | |||
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors | Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors | ||
Units: sectors of 1 * 512 = 512 bytes | Units: sectors of 1 * 512 = 512 bytes | ||
Line 105: | Line 132: | ||
Disk identifier: 0x82abc9a6 | Disk identifier: 0x82abc9a6 | ||
<!--T:62--> | |||
Device Boot Start End Blocks Id System | Device Boot Start End Blocks Id System | ||
/dev/sda1 2048 264191 131072 83 Linux | /dev/sda1 2048 264191 131072 83 Linux | ||
Line 111: | Line 139: | ||
}} | }} | ||
<!--T:63--> | |||
'''Write the partition table to disk:''' | '''Write the partition table to disk:''' | ||
<!--T:64--> | |||
{{console|body=Command (m for help): ##i##w}} | {{console|body=Command (m for help): ##i##w}} | ||
<!--T:65--> | |||
Your new MBR partition table will now be written to your system disk. | Your new MBR partition table will now be written to your system disk. | ||
<!--T:66--> | |||
{{Note|You're done with partitioning! Now, jump over to [[{{BASEPAGENAME}}#Creating filesystems|Creating filesystems]].}} | {{Note|You're done with partitioning! Now, jump over to [[{{BASEPAGENAME}}#Creating filesystems|Creating filesystems]].}} | ||
<!--T:67--> | |||
<noinclude>{{InstallNavigation|num=3|prev=Prepare Disk|next=GPT Partitioning|align=right}}</noinclude> | |||
</translate> |
Latest revision as of 04:25, December 13, 2021
Install Guide: MBR Partitioning
Install Guide, Chapter 3 | < Prev | Next > |
Legacy (BIOS/MBR) Method
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.
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 /dev/sda
is the disk that you want to partition:
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
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 sgdisk
:
This will make any existing partitions inaccessible! You are strongly cautioned and advised to backup any critical data before proceeding.
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
Within fdisk
, follow these steps:
Empty the partition table:
Command (m for help): o ↵
Create Partition 1 (boot):
Command (m for help): n ↵ Partition type (default p): ↵ Partition number (1-4, default 1): ↵ First sector: ↵ Last sector: +128M ↵
Create Partition 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 ↵
Create the root partition:
Command (m for help): n ↵ Partition type (default p): ↵ Partition number (3,4, default 3): ↵ First sector: ↵ Last sector: ↵
Verify the partition table:
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
Write the partition table to disk:
Command (m for help): w
Your new MBR partition table will now be written to your system disk.
You're done with partitioning! Now, jump over to Creating filesystems.
Install Guide, Chapter 3 | < Prev | Next > |