Compare commits
8 Commits
2be680b1e4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 69f31566d1 | |||
| f9cb37cc04 | |||
| e8a698fc6a | |||
| 8841ec1e59 | |||
| 5614f70116 | |||
| 1db741beb9 | |||
| d0100711f6 | |||
| c96fec87c8 |
@@ -1,4 +1,4 @@
|
||||
pacman-key --init && pacman-key --populate archlinux && pacman -Sy git --noconfirm && git clone https://git.xkrs.ru/astraleuro/arch-install.git && cd arch-install
|
||||
mount -t nfs -o nfsvers=4 192.168.11.105:/srv/pacman-cache /var/cache/pacman/pkg && pacman-key --init && pacman-key --populate archlinux && pacman -Sy git --noconfirm && git clone https://git.xkrs.ru/astraleuro/arch-install.git && cd arch-install
|
||||
|
||||
mount -t nfs -o nfsvers=4 192.168.11.105:/srv/pacman-cache /var/cache/pacman/pkg
|
||||
|
||||
|
||||
22
final.sh
22
final.sh
@@ -1,6 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
source .env
|
||||
mount -o remount,size=4G /run/archiso/cowspace
|
||||
|
||||
complele_install_script_generator() {
|
||||
cat << 'SCRIPT_EOF'
|
||||
#!/bin/bash
|
||||
pacman -Syu nvidia-utils
|
||||
SCRIPT_EOF
|
||||
}
|
||||
|
||||
# === DISKS PREPARE ===
|
||||
disks_prepare() {
|
||||
@@ -18,6 +26,7 @@ disks_prepare() {
|
||||
#HEADER_PART=/dev/${_HEADER_DEV}1
|
||||
wipefs -a /dev/${_HEADER_DEV}1
|
||||
wipefs -a /dev/${_SYS_DEV}1
|
||||
wipefs -a /dev/${_SYS_DEV}3
|
||||
|
||||
echo -n "$_LUKS_PASS" | cryptsetup luksFormat --type luks2 --batch-mode --key-file - --header /dev/${_HEADER_DEV}1 /dev/${_SYS_DEV}3
|
||||
echo -n "$_LUKS_PASS" | cryptsetup open /dev/${_SYS_DEV}3 --header /dev/${_HEADER_DEV}1 --key-file - cryptroot
|
||||
@@ -66,7 +75,7 @@ install_system() {
|
||||
_DATA_PARTUUID=$(blkid -s PARTUUID -o value /dev/${_SYS_DEV}3)
|
||||
_HEADER_PARTUUID=$(blkid -s PARTUUID -o value /dev/${_HEADER_DEV}1)
|
||||
|
||||
pacstrap -c -K /mnt base base-devel linux linux-firmware btrfs-progs mdadm nano sof-firmware intel-ucode nvidia-utils iwd dhcpcd vim cryptsetup networkmanager openssh efibootmgr git ly
|
||||
pacstrap -c -K /mnt base base-devel linux linux-firmware btrfs-progs mdadm nano sof-firmware intel-ucode iwd dhcpcd vim cryptsetup networkmanager openssh efibootmgr git ly
|
||||
|
||||
genfstab -U /mnt >> /mnt/etc/fstab
|
||||
arch-chroot /mnt /bin/bash <<EOF
|
||||
@@ -83,7 +92,7 @@ install_system() {
|
||||
printf "title Arch Linux\nlinux /vmlinuz-linux\ninitrd /intel-ucode.img\ninitrd /initramfs-linux.img\noptions rd.luks.name=${_LUKS_UUID}=cryptroot rd.luks.data=${_LUKS_UUID}=/dev/disk/by-partuuid/${_DATA_PARTUUID} rd.luks.options=${_LUKS_UUID}=header=/dev/disk/by-partuuid/${_HEADER_PARTUUID} root=/dev/mapper/cryptroot rw rootflags=subvol=@" > /boot/loader/entries/arch.conf
|
||||
|
||||
# Правим хуки
|
||||
sed -i 's/^HOOKS=(.*/HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block sd-encrypt filesystems fsck)/' /etc/mkinitcpio.conf
|
||||
sed -i 's/^HOOKS=(.*/HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)/' /etc/mkinitcpio.conf
|
||||
|
||||
mkinitcpio -P
|
||||
|
||||
@@ -96,6 +105,9 @@ install_system() {
|
||||
systemctl enable NetworkManager
|
||||
systemctl enable sshd
|
||||
|
||||
$(complele_install_script_generator) > /home/${_USERNAME}/complete_install.sh
|
||||
chmod +x /home/${_USERNAME}/complete_install.sh
|
||||
|
||||
systemctl enable ly@tty2.service
|
||||
systemctl disable getty@tty2.service
|
||||
systemctl mask getty@tty2.service
|
||||
@@ -110,7 +122,7 @@ fs_init
|
||||
install_system
|
||||
|
||||
echo "DONE! "
|
||||
umount -R /mnt
|
||||
cryptsetup close cryptroot
|
||||
#umount -R /mnt
|
||||
#cryptsetup close cryptroot
|
||||
#mdadm --stop /dev/md0
|
||||
reboot
|
||||
#reboot
|
||||
|
||||
Reference in New Issue
Block a user