Skip to content

This is a guide on how to partition disk for GNU / Linux operating system installations.

Notifications You must be signed in to change notification settings

geeknozy/disk-partition-guide-on-linux-for-installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 

Repository files navigation

Disk-partition-guide-on-linux-for-Arch-Linux-installation on UEFI devices.

THIS WILL ERASE DATA on Disk!!!

----------------------------------------------------------------------------------------------------------
NOTE: Im using fdisk utility to partition the disk.

1. Open Your terminal and type

fdisk -l

----------------------------------------------------------------------------------------------------------

2. Now you see the list of storage devices on your system.

Select the device as below command.

fdisk /dev/sdX

Note X here represents the disk alphabet. X may be sda/sdb/nvmep01/etc...

NOTE: https://wiki.archlinux.org/index.php/Installation_guide#Partition_the_disks refer this for partition table schema.

----------------------------------------------------------------------------------------------------------

3. Now Follow below steps.

EFI partition

  • d -> hit d and select partition number until all the partitions are deleted

  • g -> creates new gpt label for disk.

  • n -> new partition

  • hit from 2048---end -> starting sector.

  • when fdisk asks for +/-/ end type

  • +512M -> EFI partition size of 512MB (At least 260 MiB )

  • hit yes for removing signature of existing partitons.

  • t -> to change the type of the partition

  • -> select partition number 1,2,3 etc.

  • L to list types -> and press Q to quit the list and select 1 on the prompt for - EFI

----------------------------------------------------------------------------------------------------------

SWAP partition.

  • n - > new partition.

  • Hit enter for starting sector

  • when fdisk asks for +/-/ end type

  • +your RAM-size + 1G -> for Hibernate Support

  • example: if your ram size is 8GB then +9GB

  • +4G or +8G -> Common swap partition. (Without Hibernate support).

  • hit yes for removing signature of existing partitons.

  • t -> to change the type of the partition

  • -> select partition number 1,2,3 etc. (2 in this case)

  • L to list types -> and press Q to quit the list and select 19 on the prompt for - EFI

----------------------------------------------------------------------------------------------------------

Root partition

  • n - > new partition.
  • Hit enter for starting sector
  • when fdisk asks for +/-/ end hit enter this is the last partition and end of disk.
  • This is the root partitions so it must be in Linux File System type.
  • t -> to change the type of the partition
  • -> select partition number 1,2,3 etc.
  • L to list types -> select 20 - Linux File System.
  • now write the partitions
  • w -> this will write partition

----------------------------------------------------------------------------------------------------------

Disk-partitions-done now formatting.

  1. For EFI Partition

mkfs.fat -F 32 /dev/sdX1

  1. For Swap Partition.

mkswap /dev/sdX2 `
swapon /dev/sdX2

  1. For root partition

mkfs.ext4 /dev/sdX3

About

This is a guide on how to partition disk for GNU / Linux operating system installations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published