Last active
December 14, 2015 05:09
-
-
Save bjorndown/5033439 to your computer and use it in GitHub Desktop.
Steps for setting up Archlinux with LVM over LUKS (no keyfile), syslinux with GPT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cgdisk /dev/sda | |
----------------- | |
sda1 512M EF00 | |
sda2 200M 8300 | |
sda3 rest 8300 | |
cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/sda2 | |
cryptsetup luksOpen /dev/sda2 cryptroot | |
pvcreate /dev/mapper/cryptroot | |
vgcreate vg /dev/mapper/cryptroot | |
lvcreate -L 15G -n root vg | |
lvcreate -L 1G -n swap vg | |
lvcreate -L 12G -n var vg | |
lvcreate -L 20G -n home vg | |
mkfs.vfat /dev/sda1 | |
mkfs.ext4 /dev/sda2 | |
mkfs.ext4 /dev/mapper/vg-root | |
mkfs.ext4 /dev/mapper/vg-var | |
mkfs.ext4 /dev/mapper/vg-home | |
mkswap -L swap /dev/mapper/vg-swap | |
mount /dev/mapper/vg-root /mnt | |
mkdir /mnt/boot | |
mkdir /mnt/boot/efi | |
mkdir /mnt/home | |
mkdir /mnt/var | |
mount /dev/sda2 /mnt/boot | |
mount /dev/sda1 /mnt/boot/efi | |
mount /dev/mapper/vg-home /mnt/home | |
mount /dev/mapper/vg-var /mnt/var | |
swapon /dev/mapper/vg-swap | |
nano /etc/pacman.d/mirrorlist | |
modprobe efivars | |
pacstrap /mnt base base-devel | |
genfstab -U -p /mnt >> /mnt/etc/fstab | |
nano /mnt/etc/fstab | |
arch-chroot /mnt | |
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen | |
locale-gen | |
echo LANG=en_US.UTF-8 > /etc/locale.conf | |
export LANG=en_US.UTF-8 | |
loadkeys us | |
setfont Lat2-Terminus16 | |
nano /etc/vconsole.conf | |
------------------------ | |
KEYMAP=us | |
FONT=Lat2-Terminus16 | |
ln -s /usr/share/zoneinfo/Europe/Zurich /etc/localtime | |
hwclock --systohc --utc | |
echo zim > /etc/hostname | |
nano /etc/mkinitcpio.conf | |
mkinitcpio -p linux | |
passwd | |
mkdir /boot/efi/EFI/arch/ | |
cp /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi | |
cp /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img | |
cp /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img | |
pacman -S refind-efi efibootmgr | |
mkdir -p /boot/efi/EFI/refind | |
cp /usr/lib/refind/refind_x64.efi /boot/efi/EFI/refind/refind_x64.efi | |
cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/refind/refind.conf | |
cp -r /usr/share/refind/icons /boot/efi/EFI/refind/icons | |
nano /boot/efi/EFI/arch/refind_linux.conf | |
----------------------------------------------------------------------------------------- | |
"Boot to X" "root=/dev/mapper/vg-root cryptdevice=/dev/sda3:cryptroot:allow-discards ro rootfstype=ext4 systemd.unit=graphical.target" | |
"Boot to console" "root=/dev/mapper/vg-root cryptdevice=/dev/sda3:cryptroot:allow-discards ro rootfstype=ext4 systemd.unit=multi-user.target" | |
efibootmgr -c -g -d /dev/sda -p 1 -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi' | |
pacman -S networkmanager |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment