Arch Linux Install File System Ext4¶
Instruction Order¶
- Instruction Order
- Partition The Drive
- Format The Drive Partitions
- Mount The Drive Partitions
- External Links
Partition The Drive¶
-
Find the desired drive to partition
# fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 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: 0x7a21f024 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 206847 204800 100M 83 Linux /dev/sda2 206848 943925247 943718400 450G 83 Linux
-
Set up the new partition structure using "gdisk"
# gdisk /dev/sda
- Press X to enter the advanced menu.
- Press Z to zap the drive.
- Press Y to confirm.
- Press Y to delete MBR.
Note: If "found invalid MBR and/or corrupt GPT", create a blank GPT.
Note: If "gdisk" complains about existing partition tables, zap (wipe the partition tables) the drive.
-
Create boot partition using "gdisk"
# gdisk /dev/sda
- Press N for new "boot" partition.
- Partition number, press Enter (default 1).
- Press Enter to use the default first sector.
- Type "500M" and press Enter to specify the last sector.
- Enter "ef00" to specify that this is an EFI partition.
- Create root partition
- Press N for new "root" partition
- Partition number, press Enter (default 2).
- Press Enter to use the default first sector.
- Press Enter to use the default last sector.
- Press Enter to accept the default partition type (should be "8300" or Linux).
-
Write the changes to the disk
- Press W to write changes.
- Confirm writing changes.
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? Y
Format The Drive Partitions¶
Note: You will require the package, "dosfstools".
-
Format the EFI partition.
# mkfs.fat -F32 /dev/sda1
-
Format the Linux root partition. The label "archlinux" can be replaced with any desired string.
# mkfs.ext4 -L archlinux /dev/sda2
Mount The Drive Partitions¶
Mount the partitions, create the boot directory and mount the EFI partition.
-
Create the root directory.
# mkdir /mnt/root
-
Mount the root partition.
# mount /dev/sda2 /mnt/root
-
Create the boot directory.
# mkdir /mnt/root/boot
-
Mount the boot partition.
# mount /dev/sda1 /mnt/root/boot