Introduction

This post describes an installation of Arch Linux with GPT (GUID partition table), LUKS (Linux Unified Key Setup) and LVM (Logical Volume Manager) with the basic graphical window manager i3. LVM is set up on top of LUKS. Systemd-boot is used as an EFI compatible boot manager. I wrote this post, so next time I don’t have to search all the information in the Arch Linux Wiki. For more details, consult the links in the reference section.

Important: This is not a beginners guide for an Arch Linux installation, so you should have basic understanding of Arch Linux, LUKS and LVM. You should understand all options so you can adjust them to your needs.

Preparations

Set keyboard layout:

# l o a d k e y s d e _ C H - l a t i n 1

Activate vi mode for more convinience:

# s e t v i

Connect to WiFi:

# w i f i - m e n u

Set system time using NTP:

# # t t i i m m e e d d a a t t e e c c t t l l s s e t t a - t n u t s p t r u e

Disk setup

Setup GUID partition Table (GPT):

# y # n 1 [ + e # n 2 [ [ 8 p w y R 5 f R R e g # # E # # e 1 0 L # # e e 0 # # # d F t 2 0 U t t 0 i C C I A P u M K A P u u C W C s r o d a r # S d a r r # h r o k e n S d r n # d r n n e i n a f y t ] P c t ] ] P c t f / t i s a i L a o a i a k e i d e r t t # a r n t # # r r e m e n i s t t n i t p c m v a m e o F t i a e o F L i a h / w n i t i w n i a t r a s n P r s i n r s i t n d e a p n s e o e p n s t o i g a w r a u t c n r a u t n t e t r m t r m s i s e i t b s o t t b s e t o m t i e e r y i e e c y n t p i t r c p t r c t p s o t o i t = e i t o e y n o o o o r d n r s = n r = i G ( i = s U E z E L k I S e F U i D P I s n a ) e u n p S x d a y r r s e L e t t m V x i e a M i t m i t i n o i n n g t a s b p l a e c e ( G P T )

Format EFI System Partition (ESP):

# m k f s . f a t - F 3 2 / d e v / s d a 1

Encrypt the other partition with LUKS (512 Bit AES-XTS and SHA512 for passphrase):

# # c c r r y y p p t t s s e e t t u u p p l l u u k k s s F O o p r e m n a t / d e v / - s s d a 5 2 1 2 l u - k h s s h a 5 1 2 / d e v / s d a 2

Setup Logical Volume Manager:

# # p v v g c c r r e e a a t t e e / r d o e o v t / v m g a p / p d e e r / / l m u a k p s p e r / l u k s

Create Logical Volumes:

# # # # l l l l v v v v c c c c r r r r e e e e a a a a t t t t e e e e - - - - n n n n s r v h w o a o a o r m p t e - - - L - L L l 1 4 2 5 1 G 5 G 0 G 0 - r % C r o F o o R y o t E t v E r v g o g r o o t o v t g v g # - C = c o n t i n u o u s d a t a b l o c k s )

Check LVM Setup:

# # # p v l v g v s s s

Create filesystems for LVs:

# # # # # m m m m s k k k k w f f f s a s s s w p . . . a o e e e p n x x x t t t / / 4 4 4 d d e e / / / v d d d / / e e e m m v a a / / / p p m m m p p a a a e e p p p r r p p p / / e e e r r r r r o / / o o r r r t t o o o v v o o o g g t t t - - v v v s s g g g w w - - - a a h r v p p o o a m o r e t

Install base system

Mount LVs and ESP for installation:

# # # # # m m m m m o k o o o u d u u u n i n n n t r t t t / / / / / d m d d d e n e e e v t / / / / / m { m m s a v a a d p a p p a p r p p 1 e , e e r h r r / o / m r m r r n o e o o t o , o o / t b t t b v o v v o g o g g o - t - - t r } h v o o a o m r t e / m m m n n n t t t v h a o r m e

Select mirrors:

# v i / e t c / p a c m a n . d / m i r r o r l i s t

Synchronize repositories:

# p a c m a n - S y

Install base packages:

# p a c s t r a p / m n t b a s e l i n u x l i n u x - f i r m w a r e

Generate fstab file:

# g e n f s t a b - p / m n t > / m n t / e t c / f s t a b

Chroot into the new system:

# a r c h - c h r o o t / m n t

Basic configuration

Configure hostname:

# e c h o c h a o s > / e t c / h o s t n a m e

Configure timezone:

# E # u $ r t o i t p m i e e m / d e Z a d u t a r e t i c e c t c h l t l s e l t i - s t t i - m t e i z m o e n z e o n E e u s r o | p e g / r Z e u p r i Z c u h r i c h

Configure locale:

# e e n n v _ _ i U U S S / . e U I t T S c F O / - - l 8 8 o 8 c U 5 a T 9 l F - e - 1 . 8 g e n # u n c o m m e n t t h e f o l l o w i n g l o c a l e s

Update locales:

# l o c a l e - g e n

Set language:

# e c h o " L A N G = e n _ U S . U T F - 8 " > / e t c / l o c a l e . c o n f

Configure virtual console:

# # e e c c h h o o " " K F E O Y N M T A = P L = a d t e 2 _ - C T H e - r l m a i t n i u n s 1 1 " 6 " > > > / e / t e c t / c v / c v o c n o s n o s l o e l . e c . o c n o f n f

Configure pacman:

# # C I # [ I o L m n v A l o E u c i d o v n l l d r e a t u / C b i d e t a l l e t o n e i c d b = / [ y M ] p o u / a p l e c t t t m i i c a o l / n n i p . s b a c ] c o m n s a f e n c . t d i / o m n i : r r o r l i s t

Synchronize repositories:

# p a c m a n - S y

Install basic software

Install basic packages:

# p a c m a n - S b a s e l v m 2 e 2 f s p r o g s v i m n e t - t o o l s d h c p c d m a n - d b m a n - p a g e s b a s h - c o m p l e t i o n

Install packages for WiFi:

# # p s a y c s m t a e n m c - t S l d e i n a a l b o l g e w n p e a t _ c s t u l p - p a l u i t c o a @ n w t l p w 4 p s a 0 _ a c t i o n d w i r e l e s s _ t o o l s r f k i l l

Activate IPv6 Privacy extension:

# n n e e v t t i . . i i / p p e v v t 6 6 c . . c c s o o y n n s f f c . . t a d l l e . l f d . a u u i s l p e t v _ . 6 t u _ e s t m e e p _ m a t p d e a d m d r p d a r = d . d c 2 r o n = f 2

Install and configure sudo:

# # % w p v h a i e c s e m u l a d n o A L - L S = ( s A u L d L o ) v A i L m L

Activate NTP Client:

# s y s t e m c t l e n a b l e s y s t e m d - t i m e s y n c d

Install and activate OpenSSH:

# # p s a y c s m t a e n m c - t S l o e p n e a n b s l s e h s r s x h v d t - # u n I i f c o y d o e u - t w e a r n m t i n a f n o S S H s e r v e r r u n n i n g

Configure Users

Set root password:

# p a s s w d

Add new user:

# # u p s a e s r s a w d d d e - m m a n - u G e l w h e e l e m a n u e l

Configure Boot Environment

Configure hooks for initramfs:

# H O v O i K S / = e ( t c m k i k n e i y t b c o p a i r o d . c k o e n y f m a p e n c r y p t l v m 2 f i l e s y s t e m s

Create initramfs:

# m k i n i t c p i o - p l i n u x

Install bootloader

# b o o t c t l i n s t a l l

Create bootloader entry:

# # t l i o i i n p b v t n i t l i l u t i k e x r o i / d n d b A s o r v / c m i c t h l n r g / i i y r l L n t p e o i u r t p a n z a d d u - m e s e x l f v d r i s i a / n - c 2 e u l e n x i = | t n U r u U c i x I u e . D t s i = / m d - a g a f r 3 2 c 6 h 0 - . 6 d c 7 \ o 7 " n - f 3 > 1 d / 9 b - o 4 o 1 t d / a l - o b a 7 d 3 e 8 r - / 7 e c n 5 t 3 r c i 9 e 9 s 3 / 2 a 9 r 1 c 4 h : . l c u o k n s f r # o o W t r = i / t d e e v l / o m n a g p p U e U r I / D r o t o o t v f g i - l r e o o f t o r r w l a t e r u s e

Create default entry:

# t d i e v m f i e a u u l b t t o o 2 a t r / c l h o a d e r / l o a d e r . c o n f

Install Basic Desktop Environment (i3)

Install video driver:

# p a c m a n - S x f 8 6 - v i d e o - i n t e l

Install Xorg:

# # p l a o c c m a a l n e c - t S l x o - r n g o - x c t o e n r v m e r x t o r s g e - t x - r x a 1 n 1 d - r k e y m a p c h

Install i3 window manager and desktop environment:

# p a c m a n - S i 3 - w m i 3 b l o c k s i 3 l o c k i 3 s t a t u s d m e n u r x v t - u n i c o d e x t e r m x b i n d k e y s z e n i t y x c l i p f i g l e t

Install login manager:

# # p s a y c s m t a e n m c - t S l l e i n g a h b t l d e m l l i i g g h h t t d d m m . - s g e t r k v - i g c r e e e t e r

Install basic desktop applications:

# p a c m a n - S a c p i f e h m p v g n o m e - t e r m i n a l n a u t i l u s e v i n c e e o g f i l e - r o l l e r g v f s g v f s - g p h o t o 2 g v f s - m t p g v f s - n f s g v f s - s m b f i r e f o x s m b c l i e n t

Install some basic terminal applications:

# p a c m a n - S m l o c a t e s c r o t b i n d - t o o l s e d j q b c g i t m o s h n m a p p 7 z i p z i p u n z i p u n r a r q r e n c o d e t h e _ s i l v e r _ s e a r c h e r t m u x w g e t

Install alsa-utils for sound:

# p a c m a n - S a l s a - u t i l s p u l s e a u d i o - a l s a

Themes:

# p a c m a n - S g n o m e - t h e m e s - e x t r a g t k - e n g i n e - m u r r i n e a r c - g t k - t h e m e a r c - s o l i d - g t k - t h e m e a r c - i c o n - t h e m e l x a p p e a r a n c e - g t k

Finish installation

Reboot into new system:

# # # e u r x m e i o b t u o n o t t - # R Y / a m y n ! t

References