artix + arch + gentoo
This commit is contained in:
89
arch.txt
Normal file
89
arch.txt
Normal file
@@ -0,0 +1,89 @@
|
||||
##EFI, swap, ext4, lvm, luks
|
||||
|
||||
## perma IP without dhcp
|
||||
sudo ip a add { ip/mask } dev { interface }
|
||||
|
||||
## ssh set up
|
||||
systemctl start sshd && passwd
|
||||
|
||||
|
||||
## partitioning and mounting
|
||||
fdisk /dev/sda
|
||||
|
||||
/dev/sda1 1G EFI
|
||||
/dev/sda2 4G Linux swap
|
||||
/dev/sda3 rest Linux x86-64
|
||||
|
||||
exit fdisk
|
||||
|
||||
mkswap /dev/sda2 && \
|
||||
mkfs.fat -F 32 /dev/sda1 && \
|
||||
cryptsetup luksFormat /dev/sda3
|
||||
|
||||
cryptsetup open /dev/sda3 cryptlvm
|
||||
|
||||
pvcreate /dev/mapper/cryptlvm
|
||||
|
||||
vgcreate MainLvm /dev/mapper/cryptlvm && \
|
||||
lvcreate -L 10G MainLvm -n root && \
|
||||
lvcreate -L 2G MainLvm -n home && \
|
||||
mkfs.ext4 /dev/MainLvm/root && \
|
||||
mkfs.ext4 /dev/MainLvm/home && \
|
||||
mount /dev/MainLvm/root /mnt && \
|
||||
mount --mkdir /dev/MainLvm/home /mnt/home && \
|
||||
mount --mkdir /dev/sda1 /mnt/boot/efi
|
||||
|
||||
## install and chroot
|
||||
pacstrap -K /mnt base linux linux-firmware
|
||||
|
||||
## for artix
|
||||
basestrap /mnt base base-devel openrc elogind-openrc linux linux-firmware
|
||||
|
||||
##arch
|
||||
genfstab -U /mnt >> /mnt/etc/fstab
|
||||
##artix
|
||||
fstabgen -U /mnt >> /mnt/etc/fstab
|
||||
|
||||
##arch
|
||||
arch-chroot /mnt
|
||||
##artix
|
||||
artix-chroot /mnt /bin/bash
|
||||
|
||||
## time and locale
|
||||
ln -sf /usr/share/zoneinfo/Europe/Prague /etc/localtime && \
|
||||
hwclock --systohc
|
||||
|
||||
nano /etc/locale.conf
|
||||
locale-gen
|
||||
|
||||
## networking
|
||||
echo archie > /etc/hostname
|
||||
|
||||
pacman -S networkmanager openssh && \
|
||||
systemctl enabled sshd && \
|
||||
systemctl enabled NetworkManager
|
||||
|
||||
##artix
|
||||
pacman -S cryptsetup-openrc openssh-openrc system/lvm2-openrc vim grub os-prober efibootmgr
|
||||
|
||||
## password set
|
||||
passwd
|
||||
|
||||
## Bootloader and iniramfs
|
||||
nano /etc/mkinitcpio.conf
|
||||
|
||||
##arch (systemd)
|
||||
HOOKS=(systemd keyboard sd-vconsole sd-encrypt lvm2)
|
||||
##artix
|
||||
HOOKS=(udev keyboard keymap consolefont encrypt lvm2)
|
||||
|
||||
##Grub
|
||||
GRUB_CMDLINE_LINUX="cryptdevice=UUID=424e46f9-ffdb-4825-a83a-1cbb53c65627:cryptlvm root=/dev/MainLvm/root"
|
||||
GRUB_ENABLE_CRYPTODISK=y
|
||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
|
||||
mkinitcpio -P
|
||||
|
||||
|
||||
Reference in New Issue
Block a user