linux:notes:arch_linux_partitioning
Table of Contents
Information
- Various partitioning layouts
- Tailored for Arch Linux Install
GPT, EFI, No LVM, No Encryption
- 512.0 MiB ef00 EFI System
- [remaining] 8300 Linux filesystem
gdisk
- n (create new partition)
- 1 (partition number)
- Enter (use default first sector)
- +512MiB (last sector)
- ef00 (EFI System partition type)
- n (create new partition)
- 2 (partition number)
- Enter (use default first sector)
- Enter (use default last sector)
- 8300 (Linux filesystem partition type)
- p (verify two partitions):
- 1 512.0 MiB EF00 EFI System
- 2 (remaining space) 8300 Linux filesystem
- w (write changes to disk; confirm with y)
gdisk '/dev/sda'
Format
mkfs.fat -F32 '/dev/sda1'
XFS
mkfs.xfs '/dev/sda2'
F2FS
mkfs.f2fs '/dev/sda2'
Mount
mount '/dev/sda2' '/mnt'
mkdir -p '/mnt/boot'
mount '/dev/sda1' '/mnt/boot'
GPT, EFI, LVM
- 512.0 MiB ef00 EFI System
- [remaining] 8e00 Linux LVM
gdisk
- n (create new partition)
- 1 (partition number)
- Enter (use default first sector)
- +512MiB (last sector)
- ef00 (EFI System partition type)
- n (create new partition)
- 2 (partition number)
- Enter (use default first sector)
- Enter (use default last sector)
- 8e00 (Linux LVM partition type)
- p (verify two partitions):
- 1 512.0 MiB EF00 EFI System
- 2 (remaining space) 8E00 Linux LVM
- w (write changes to disk; confirm with y)
gdisk '/dev/sda'
LVM
Encrypted
cryptsetup -v -c 'aes-xts-plain64' -s '512' -h 'sha512' -i '5000' --use-random luksFormat '/dev/sda2'
cryptsetup luksOpen '/dev/sda2' 'lvm'
pvcreate '/dev/mapper/lvm'
vgcreate 'arch' '/dev/mapper/lvm'
lvcreate -l 100%FREE 'arch' -n 'root'
Unencrypted
pvcreate '/dev/mapper/sda2'
vgcreate 'arch' '/dev/mapper/sda2'
lvcreate -l 100%FREE 'arch' -n 'root'
Format
mkfs.fat -F32 '/dev/sda1'
XFS
mkfs.xfs '/dev/mapper/arch-root'
F2FS
mkfs.f2fs '/dev/mapper/arch-root'
Mount
mount '/dev/mapper/arch-root' '/mnt'
mkdir -p '/mnt/boot'
mount '/dev/sda1' '/mnt/boot'
MBR, BIOS, No LVM, No Encryption
fdisk
- n (create new partition)
- p (primary partition type)
- 1 (partition number)
- Enter (use default first sector)
- Enter (use default last sector)
- p (verify one partition):
- /dev/sda1 (rest) 83 Linux
- w (write changes to disk)
fdisk '/dev/sda'
Format
mkfs.xfs '/dev/sda1'
Mount
mount '/dev/sda1' '/mnt'
1)
sda2 does work though
/usr/local/www/wiki/data/pages/linux/notes/arch_linux_partitioning.txt · Last modified: by 127.0.0.1