first steps
This commit is contained in:
41
3.install.sh
41
3.install.sh
@@ -2,10 +2,16 @@
|
||||
|
||||
source .env
|
||||
|
||||
echo $_LUKS_UUID
|
||||
#_LUKS_UUID=$(cryptsetup luksUUID --header /dev/sdb1 /dev/sda3)
|
||||
_DATA_PARTUUID=$(blkid -s PARTUUID -o value /dev/sda3)
|
||||
_HEADER_PARTUUID=$(blkid -s PARTUUID -o value /dev/sdb1)
|
||||
|
||||
pacstrap -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
|
||||
|
||||
genfstab -U /mnt >> /mnt/etc/fstab
|
||||
arch-chroot /mnt
|
||||
arch-chroot /mnt /bin/bash <<EOF
|
||||
|
||||
sed -i '/en_US.UTF-8 UTF-8/s/^#//' /etc/locale.gen && sed -i '/ru_RU.UTF-8 UTF-8/s/^#//' /etc/locale.gen && grep -v '^#' /etc/locale.gen
|
||||
locale-gen
|
||||
echo "LANG=ru_RU.UTF-8" > /etc/locale.conf
|
||||
@@ -13,7 +19,36 @@ printf "KEYMAP=ru\nFONT=cyr-sun16" > /etc/vconsole.conf
|
||||
echo "$_HOSTNAME" > /etc/hostname
|
||||
|
||||
bootctl --path=/boot install
|
||||
printf "title Arch Linux\nlinux /vmlinuz-linux\ninitrd /intel-ucode.img\ninitrd /initramfs-linux.img\n" > /boot/loader/entries/arch.conf
|
||||
|
||||
#options rd.luks.name=PARTUUID=bdb153db-4a79-40f3-8507-759e15013526=cryptroot rd.luks.header=/dev/disk/by-id/usb-VBOX_HARDDISK-0:0 rd.luks.options=discard root=/dev/mapper/cryptroot rw rootflags=subvol=@
|
||||
#Создаем пункт загрузки
|
||||
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=PARTUUID=${_DATA_PARTUUID} rd.luks.options=${_LUKS_UUID}=header=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
|
||||
|
||||
mkinitcpio -P
|
||||
|
||||
# Финальнве шаги
|
||||
useradd -m -G wheel -s /bin/bash astraleuro
|
||||
sed -i '/%wheel ALL=(ALL:ALL) ALL/s/^# *//' /etc/sudoers
|
||||
systemctl enable NetworkManager
|
||||
systemctl enable sshd
|
||||
|
||||
EOF
|
||||
|
||||
umount -R /mnt
|
||||
cryptsetup close cryptroot
|
||||
mdadm --stop /dev/md0
|
||||
#reboot
|
||||
|
||||
#rd.luks.name=${$_LUKS_UUID}=cryptroot
|
||||
#rd.luks.options=<LUKS_UUID>=header=/dev/disk/by-id/<USB_HEADER_ID>
|
||||
##rd.luks.data=<LUKS_UUID>=/dev/disk/by-id/<SYSTEM_DISK_PART3_ID>
|
||||
#root=/dev/mapper/cryptroot
|
||||
#rootflags=subvol=@
|
||||
#rw
|
||||
|
||||
|
||||
|
||||
#options #rd.luks.name=PARTUUID=bdb153db-4a79-40f3-8507-759e15013526=cryptroot #rd.luks.header=/dev/disk/by-id/usb-VBOX_HARDDISK-0:0 #rd.luks.options=discard root=/dev/mapper/cryptroot rw rootflags=subvol=@
|
||||
#HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block sd-encrypt filesystems fsck)
|
||||
|
||||
Reference in New Issue
Block a user