draft: arch linux install
This commit is contained in:
parent
1e0b18dba0
commit
c1e01d07ff
1 changed files with 18 additions and 10 deletions
|
@ -23,10 +23,10 @@ timedatectl set-timezone Europe/Madrid
|
||||||
# fdisk ...
|
# fdisk ...
|
||||||
|
|
||||||
# Prepare the filesystems and the luks encryption
|
# Prepare the filesystems and the luks encryption
|
||||||
mkfs.vfat -F32 /dev/nmve0n1p0
|
mkfs.vfat -F32 /dev/nmve0n1p1
|
||||||
mkswap /dev/nmve0n1p1
|
mkswap /dev/nmve0n1p2
|
||||||
cryptsetup luksFormat /dev/nvme0n1p2 # Password here
|
cryptsetup luksFormat /dev/nvme0n1p2 # Password here
|
||||||
cryptsetup open /dev/nvme0n1p2 luks
|
cryptsetup open /dev/nvme0n1p3 luks
|
||||||
mkfs.btrfs -L btrfs /dev/mapper/luks
|
mkfs.btrfs -L btrfs /dev/mapper/luks
|
||||||
|
|
||||||
# Prepare the btrfs partition
|
# Prepare the btrfs partition
|
||||||
|
@ -38,19 +38,19 @@ btrfs subvolume create home
|
||||||
btrfs subvolume create snapshots
|
btrfs subvolume create snapshots
|
||||||
|
|
||||||
# Mount everything under /mnt
|
# Mount everything under /mnt
|
||||||
mkdir /mnt/{home,boot}
|
|
||||||
mount -o subvol=root,compress=lzo /dev/mapper/luks /mnt
|
mount -o subvol=root,compress=lzo /dev/mapper/luks /mnt
|
||||||
|
mkdir /mnt/{home,boot}
|
||||||
mount -o subvol=home,compress=lzo /dev/mapper/luks /mnt/home
|
mount -o subvol=home,compress=lzo /dev/mapper/luks /mnt/home
|
||||||
mount /dev/nvme0n1p0 /mnt/boot
|
mount /dev/nvme0n1p1 /mnt/boot
|
||||||
|
|
||||||
# Run pacstrap with several base packages:
|
# Run pacstrap with several base packages:
|
||||||
pacstrap /mnt \
|
pacstrap /mnt \
|
||||||
base \
|
base \
|
||||||
linux-lts linux-firmware \
|
linux-lts linux-firmware \
|
||||||
intel-ucode \
|
intel-ucode \
|
||||||
terminus-font \ # Fonts in vconsole
|
terminus-font \ # Font in vconsole
|
||||||
man-db man-pages \ # Man pages
|
man-db man-pages \ # Man pages
|
||||||
iwd sudo vim NetworkManager # Utilities
|
iwd sudo vim networkmanager # Utilities
|
||||||
|
|
||||||
# Generate the /etc/fstab file
|
# Generate the /etc/fstab file
|
||||||
genfstab -L /mnt >> /mnt/etc/fstab
|
genfstab -L /mnt >> /mnt/etc/fstab
|
||||||
|
@ -76,7 +76,7 @@ locale-gen
|
||||||
echo 'LANG=en_US.UTF-8' > /etc/locale.conf
|
echo 'LANG=en_US.UTF-8' > /etc/locale.conf
|
||||||
|
|
||||||
# Setup keymap and font
|
# Setup keymap and font
|
||||||
echo 'KEYMAP=us\nFONT=ter-232n' > /etc/vconsole.conf
|
printf "KEYMAP=us\nFONT=ter-232n\n" > /etc/vconsole.conf # Not installing terminus-font
|
||||||
pacman -S physlock # To allow locking the computer when in VConsole
|
pacman -S physlock # To allow locking the computer when in VConsole
|
||||||
|
|
||||||
# Setup the computer hostname
|
# Setup the computer hostname
|
||||||
|
@ -99,7 +99,7 @@ mkinitcpio -p linux-lts
|
||||||
bootctl --path=/boot install
|
bootctl --path=/boot install
|
||||||
|
|
||||||
# Create the bootloader entry for Arch
|
# Create the bootloader entry for Arch
|
||||||
LUKS_UUID=$(cryptsetup luksUUID /dev/nvme0n1p2)
|
LUKS_UUID=$(cryptsetup luksUUID /dev/nvme0n1p3)
|
||||||
cat >/boot/loader/entries/arch.conf <<EOL
|
cat >/boot/loader/entries/arch.conf <<EOL
|
||||||
title Arch Linux (LTS)
|
title Arch Linux (LTS)
|
||||||
linux /vmlinuz-linux-lts
|
linux /vmlinuz-linux-lts
|
||||||
|
@ -127,6 +127,13 @@ systemctl enable --now NetworkManager
|
||||||
# Connect to wifi if required
|
# Connect to wifi if required
|
||||||
nmcli d wifi connntect <ssid> password <pass>
|
nmcli d wifi connntect <ssid> password <pass>
|
||||||
|
|
||||||
|
# Install and enable ssh
|
||||||
|
pacman -S openssh
|
||||||
|
vim /etc/ssh/sshd_config
|
||||||
|
# Allow root login with password if needed:
|
||||||
|
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||||
|
systemctl enable --now sshd
|
||||||
|
|
||||||
# Setup hibernate
|
# Setup hibernate
|
||||||
# Get the swap disk UUID (double check manually)
|
# Get the swap disk UUID (double check manually)
|
||||||
sudo blkid | grep swap | sed -rn 's/^.* UUID=\"([a-z0-9\-]+)\".*$/\1/p'
|
sudo blkid | grep swap | sed -rn 's/^.* UUID=\"([a-z0-9\-]+)\".*$/\1/p'
|
||||||
|
@ -138,7 +145,7 @@ vim /boot/loader/entries/arch.conf
|
||||||
# Systemd should check automatically for the swap partition on GPT tables [1]
|
# Systemd should check automatically for the swap partition on GPT tables [1]
|
||||||
|
|
||||||
# Setup suspend-then-hibernate
|
# Setup suspend-then-hibernate
|
||||||
vim /etc/systemd/login.conf
|
vim /etc/systemd/logind.conf
|
||||||
# My enabled options:
|
# My enabled options:
|
||||||
# HandlePowerKey=suspend-then-hibernate
|
# HandlePowerKey=suspend-then-hibernate
|
||||||
# HandleLidSwitch=suspend-then-hibernate
|
# HandleLidSwitch=suspend-then-hibernate
|
||||||
|
@ -203,6 +210,7 @@ pacman -S brightnessctl
|
||||||
```
|
```
|
||||||
pacman -S otf-ipafont # Japanese
|
pacman -S otf-ipafont # Japanese
|
||||||
pacman -S ttf-bitstream-vera # Default
|
pacman -S ttf-bitstream-vera # Default
|
||||||
|
pacman -S ttf-jetbrains-mono ttf-jetbrains-mono-nerd
|
||||||
```
|
```
|
||||||
|
|
||||||
## Userspace
|
## Userspace
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue