Correct installer
This commit is contained in:
parent
3e3aa969e3
commit
1c97d33d4e
@ -1,5 +1,5 @@
|
|||||||
# Use `cat` to get file with lines numbered
|
# Use `cat` to get file with lines numbered
|
||||||
cat -n install.txt
|
cat -n 10_install.txt
|
||||||
|
|
||||||
# Use `eval` from `sed` on lines X-Y
|
# Use `eval` from `sed` on lines X-Y
|
||||||
eval "$(sed -n X,Yp install.txt)"
|
eval "$(sed -n X,Yp install.txt)"
|
||||||
@ -7,18 +7,36 @@ eval "$(sed -n X,Yp install.txt)"
|
|||||||
# Ensure ethernet connection is up
|
# Ensure ethernet connection is up
|
||||||
ip link
|
ip link
|
||||||
|
|
||||||
# Partition 512M for efi (code ef00) and rest for luks
|
# Partition starting at 1MiB to 513MiB for boot per convention, then rest as ext2
|
||||||
part /dev/nvme0n1
|
parted /dev/nvme0n1
|
||||||
|
mklabel gpt
|
||||||
|
mkpart primary 1MiB 513MiB
|
||||||
|
set 1 boot on
|
||||||
|
mkpart primary ext2 513MiB 99%
|
||||||
|
align-check optimal 1
|
||||||
|
align-check optimal 2
|
||||||
|
|
||||||
|
# Change partition types with t
|
||||||
|
# Part 1 as ef00 for EFI system partition
|
||||||
|
# Part 2 as 8309 for Linux LUKS
|
||||||
|
gdisk /dev/nvme0n1p1
|
||||||
|
|
||||||
mkfs.vfat /dev/nvme0n1p1
|
mkfs.vfat /dev/nvme0n1p1
|
||||||
|
|
||||||
# Create LUKS container
|
# Create LUKS container
|
||||||
cryptsetup luksFormat /dev/nvme0n1p2
|
cryptsetup luksFormat /dev/nvme0n1p2
|
||||||
|
|
||||||
cryptsetup luksOpen /dev/nvme0n1p2 cryptoroot
|
cryptsetup luksOpen /dev/nvme0n1p2 cryptoroot
|
||||||
|
|
||||||
# Partition 4G for swap (code 8200) and the rest for solaris (code bf00)
|
# Partition starting at 0% to 4GiB for swap and 4GiB to 100% for ZFS
|
||||||
gpart /dev/mapper/cryptoroot
|
parted /dev/mapper/cryptoroot
|
||||||
|
mklabel gpt
|
||||||
|
mkpart ext2 0% 4GiB
|
||||||
|
mkpart ext2 4GiB 100%
|
||||||
|
|
||||||
|
# Change partition types with t
|
||||||
|
# Part 1 as 8200 for swap
|
||||||
|
# Part 2 as bf00 for solaris
|
||||||
|
gdisk /dev/mapper/cryptoroot
|
||||||
|
|
||||||
# Make swap and swap on
|
# Make swap and swap on
|
||||||
mkswap /dev/mapper/cryptoroot1
|
mkswap /dev/mapper/cryptoroot1
|
||||||
@ -76,7 +94,7 @@ mount /dev/nvme0n1p1 /mnt/boot/efi
|
|||||||
|
|
||||||
# Install with pacstrap
|
# Install with pacstrap
|
||||||
pacman -Syy
|
pacman -Syy
|
||||||
pacstrap /mnt base dkms git intel-ucode linux linux-firmware linux-headers tmux vim zsh
|
pacstrap /mnt base dkms git intel-ucode less linux linux-firmware linux-headers tmux vim zsh
|
||||||
|
|
||||||
# Create fs table and change root into mount
|
# Create fs table and change root into mount
|
||||||
genfstab -U -p /mnt/etc/fstab
|
genfstab -U -p /mnt/etc/fstab
|
||||||
@ -87,18 +105,20 @@ vim /etc/fstab
|
|||||||
|
|
||||||
# Add archzfs repository
|
# Add archzfs repository
|
||||||
vim /etc/pacman.conf
|
vim /etc/pacman.conf
|
||||||
-----
|
----
|
||||||
[archzfs]
|
[archzfs]
|
||||||
SigLevel = Optional TrustAll
|
SigLevel = Optional TrustAll
|
||||||
Server = https://zxcvfdsa.com/archzfs/$repo/$arch
|
Server = https://zxcvfdsa.com/archzfs/$repo/$arch
|
||||||
|
----
|
||||||
|
|
||||||
# Update repostories and install zfs-linux
|
# Update repostories and install zfs-linux
|
||||||
pacman -Syy
|
pacman -Syy
|
||||||
pacman -S zfs-linux
|
pacman -S zfs-linux
|
||||||
|
|
||||||
#
|
# Set hooks for startup load order
|
||||||
vim /etc/mkinitcpio.conf
|
vim /etc/mkinitcpio.conf
|
||||||
HOOKS=(base udev autodetect modconf block keyboard encrypt load_part resume zfs filesystems)
|
HOOKS=(base udev autodetect microcode modconf kms keymap consolefont block keyboard encrypt load_part resume zfs filesystems)
|
||||||
|
|
||||||
# Create loader to probe cryptoroot partition
|
# Create loader to probe cryptoroot partition
|
||||||
cat > /etc/initcpio/install/load_part << EOFHOOK
|
cat > /etc/initcpio/install/load_part << EOFHOOK
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
@ -124,24 +144,26 @@ EOFHOOK
|
|||||||
mkinitcpio -p linux
|
mkinitcpio -p linux
|
||||||
|
|
||||||
# Install packages
|
# Install packages
|
||||||
pacman -S base-devel dhcpcd efibootmgr grub openssh reflector rsync systemd-networkd terminus-font
|
pacman -S base-devel bind dhcpcd efibootmgr grub openssh os-prober reflector rsync systemd-networkd terminus-font
|
||||||
|
|
||||||
# Use blkid /dev/nvme0n1p2 for the uuid of cryptoroot and blkid /dev/mapper/cryptoroot2 for the uuid of the swap space and update the grub file
|
# Use blkid /dev/nvme0n1p2 for the uuid of cryptoroot and blkid /dev/mapper/cryptoroot2 for the uuid of the swap space and update the grub file
|
||||||
vim /etc/default/grub
|
vim /etc/default/grub
|
||||||
-----
|
----
|
||||||
GRUB_CMDLINE_LINUX="cryptdevice=/dev/disk/by-uuid/<uuid>:cryptoroot rw resume=UUID=<swap UUID> root=ZFS=zroot/ROOT/default"
|
GRUB_CMDLINE_LINUX="cryptdevice=/dev/disk/by-uuid/<uuid>:cryptoroot rw resume=UUID=<swap UUID> root=ZFS=zroot/ROOT/default"
|
||||||
GRUB_ENABLE_CRYPTODISK=y
|
GRUB_ENABLE_CRYPTODISK=y
|
||||||
|
----
|
||||||
|
|
||||||
# Create grub config
|
# Create grub config
|
||||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ArchLinux
|
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ArchLinux
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
|
||||||
# Enable important systems
|
# Enable important systems
|
||||||
systemctl enable systemd-networkd dhcpcd reflector.timer sshd
|
systemctl enable dhcpcd reflector.timer sshd systemd-networkd systemd-timesyncd
|
||||||
systemctl enable zfs-import-cache zfs-import-scan zfs-mount zfs-share zfs-zed zfs.target
|
systemctl enable zfs-import-cache zfs-import-scan zfs-mount zfs-share zfs-zed zfs.target
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
ln -sf /usr/share/zoneinfo/Canada/Vancouver /etc/localtime
|
timedatectl set-timezone America/Vancouver
|
||||||
|
ln -sf /usr/share/zoneinfo/Canada/Pacific /etc/localtime
|
||||||
hwclock --systohc
|
hwclock --systohc
|
||||||
|
|
||||||
# Make passwords
|
# Make passwords
|
||||||
@ -150,23 +172,25 @@ passwd iborrelli
|
|||||||
|
|
||||||
# Make wheel sudoers
|
# Make wheel sudoers
|
||||||
visudo
|
visudo
|
||||||
-----
|
----
|
||||||
%wheel ALL=(ALL) ALL
|
%wheel ALL=(ALL) ALL
|
||||||
|
----
|
||||||
|
|
||||||
# Backup reflector config and create new one
|
# Backup reflector config and create new one
|
||||||
cd /etc/xdg/reflector
|
cd /etc/xdg/reflector
|
||||||
mv reflector.conf.orig
|
mv reflector.conf.orig
|
||||||
vim reflector.conf
|
vim reflector.conf
|
||||||
-----
|
----
|
||||||
--country CA
|
--country CA
|
||||||
--protocol https
|
--protocol https
|
||||||
--latest 5
|
--latest 5
|
||||||
--sort rate
|
--sort rate
|
||||||
--save /etc/pacman.d/mirrorlist
|
--save /etc/pacman.d/mirrorlist
|
||||||
|
----
|
||||||
|
|
||||||
# Exit chroot and clean up
|
# Exit chroot and clean up
|
||||||
exit
|
exit
|
||||||
umount /mnt/boot/efi
|
umount /mnt/boot
|
||||||
zfs umount -a
|
zfs umount -a
|
||||||
zpool export zroot
|
zpool export zroot
|
||||||
reboot
|
reboot
|
||||||
|
|||||||
@ -25,5 +25,5 @@ curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh |
|
|||||||
paru -S filezilla firefox flatpak haveged libreoffice-fresh mpv neofetch qbittorrent vlc yt-dlp
|
paru -S filezilla firefox flatpak haveged libreoffice-fresh mpv neofetch qbittorrent vlc yt-dlp
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
paru -S nodejs-n
|
paru -S nodejs-n zip
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user