The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Install/MBR Partitioning"
(install MBR UEFI support cuz GPT is HOT GARBAGE.) |
(→partition: flag bootable!) |
||
Line 90: | Line 90: | ||
Last sector: ##i##+128M ↵ | Last sector: ##i##+128M ↵ | ||
Command (m for help): ##i##t ↵ | Command (m for help): ##i##t ↵ | ||
Partition number: ##i##1 | Partition number: ##i##1 ↵ | ||
Hex code (type L to list all codes): ##i##EF | Hex code (type L to list all codes): ##i##EF ↵ | ||
Changed type of partition to 'EFI (FAT-12/16/32)'. | Changed type of partition to 'EFI (FAT-12/16/32)'. | ||
Command (m for help): ##i##a ↵ | |||
Partition number (1-3, default 3): ##i##1 ↵ | |||
The bootable flag on partition 1 is enabled now. | |||
}} | }} | ||
Line 138: | Line 141: | ||
<!--T:62--> | <!--T:62--> | ||
Device Boot | Device Boot Start End Blocks Id System | ||
/dev/funtoo1 | /dev/funtoo1 * 2048 526335 524288 ef EFI (FAT-12/16/32) | ||
/dev/funtoo2 264192 4458495 2097152 82 Linux swap / Solaris | /dev/funtoo2 264192 4458495 2097152 82 Linux swap / Solaris | ||
/dev/funtoo3 4458496 625142447 310341976 83 Linux | /dev/funtoo3 4458496 625142447 310341976 83 Linux | ||
}} | }} | ||
Revision as of 13:24, December 9, 2020
Install Guide: MBR Partitioning
Install Guide, Chapter 3 | < Prev | Next > |
Legacy (BIOS/MBR) Method
This method is legacy only, and does not support UEFI installation. For UEFI installs advance to the next page.
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/funtoo Disk /dev/funtoo: 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/funtoo 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. ***************************************************************
partition
Now we will use fdisk
or cfdisk
to create the MBR partition table and partitions:
root # fdisk /dev/funtoo
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 ↵ Command (m for help): t ↵ Partition number: 1 ↵ Hex code (type L to list all codes): EF ↵ Changed type of partition to 'EFI (FAT-12/16/32)'. Command (m for help): a ↵ Partition number (1-3, default 3): 1 ↵ The bootable flag on partition 1 is enabled now.
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/funtoo: 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/funtoo1 * 2048 526335 524288 ef EFI (FAT-12/16/32)
/dev/funtoo2 264192 4458495 2097152 82 Linux swap / Solaris
/dev/funtoo3 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 > |