-
-
Save nsyntych/1f8ac76ea87543a6b15d4f8e9feca99c to your computer and use it in GitHub Desktop.
Archlinux install notes
This file contains hidden or 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
| # load kernel modules | |
| modprobe dm-crypt | |
| modprobe dm-mod | |
| # connect to the internet and set date | |
| wifi-menu | |
| timedatectl set-ntp true | |
| # verify boot by systemd-boot | |
| ls /sys/firmware/efi/efivars | |
| # dev/sda2 is apparently in use by the system; will not make a filesystem here! | |
| # https://superuser.com/questions/668347/installing-arch-linux-unable-to-format-filesystem#comment844950_668347 | |
| # dmsetup ls | |
| # dmsetup remove VolumeGroup-swap | |
| # dmsetup remove VolumeGroup-root | |
| # dmsetup remove VolumeGroup-home | |
| # lsblk | |
| # NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
| # sda 8:0 0 1.8T 0 disk | |
| # └─sda1 252:0 0 1.8T 0 crypt | |
| # hardisk erasure | |
| cryptsetup open --type plain -d /dev/urandom /dev/sda sda1 | |
| dd if=/dev/zero of=/dev/mapper/sda1 status=progress | |
| cryptsetup close sda1 | |
| cfdisk /dev/sda | |
| # sda1 Boot, EFI Primary Linux - 1G FAT32 (UEFI) | |
| # sda2 ext2 1G ext2 | |
| # sda3 Primary Linux ~ ext4 (Linux) | |
| # lsblk -f || fdisk -l | |
| # LVM on LUKS: | |
| # encrypted container | |
| cryptsetup luksFormat --type luks2 /dev/sda3 | |
| # open container | |
| cryptsetup open /dev/sda3 cryptlvm | |
| # preparing the locical volumes | |
| pvcreate /dev/mapper/cryptlvm | |
| vgcreate t460pVolGroup /dev/mapper/cryptlvm | |
| lvcreate -L 32G t460pVolGroup -n root | |
| lvcreate -L 16G t460pVolGroup -n swap | |
| lvcreate -l 100%FREE t460pVolGroup -n home | |
| mkfs.ext4 /dev/t460pVolGroup/root | |
| mkfs.ext4 /dev/t460pVolGroup/home | |
| mount /dev/t460pVolGroup/root /mnt | |
| mkdir /mnt/home | |
| mount /dev/t460pVolGroup/home /mnt/home | |
| mkswap /dev/t460pVolGroup/swap | |
| swapon /dev/t460pVolGroup/swap | |
| # preparing the boot/efi partition | |
| mkfs.fat -F32 /dev/sda1 | |
| mkfs.ext2 /dev/sda2 | |
| mkdir /mnt/boot | |
| mount /dev/sda2 /mnt/boot | |
| mkdir /mnt/boot/efi | |
| mount /dev/sda1 /mnt/boot/efi | |
| pacstrap /mnt base base-devel efibootmgr | |
| genfstab -U /mnt >> /mnt/etc/fstab | |
| arch-chroot /mnt | |
| # update /etc/mkinitcpio.conf hooks: | |
| # HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 resume filesystems fsck) | |
| mkinitcpio -p linux | |
| pacman -S grub | |
| # update /etc/default/grub kernel parameter for bootloader: | |
| # lsblk -f | grep '/dev/sda3' >> /etc/default/grub | |
| # cryptdevice=UUID=<device-UUID>:cryptlvm root=/dev/t460pVolGroup/root | |
| # resume=/dev/t460pVolGroup/swap | |
| grub-mkconfig -o /boot/grub/grub.cfg | |
| grub-mkconfig -o /boot/efi/EFI/arch/grub.cfg | |
| grub-install --target=x86_64-efi --efi-directory=/boot/efi | |
| ln -sf /usr/share/zoneinfo/Greenwich /etc/localtime | |
| hwclock --systohc | |
| # uncomment in /etc/locale.gen en_US.UTF8 UTF-8 | |
| locale-gen | |
| echo "LANG=\"en_US.UTF-8\"" > /etc/locale.conf | |
| echo "t460p" > /etc/hostname | |
| # update /etc/hosts: | |
| # 127.0.0.1 localhost | |
| # ::1 localhost | |
| # 127.0.1.1 t460p.localdomain t460p | |
| # set root password | |
| passwd | |
| exit | |
| umount -R /mnt | |
| reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment