From 3ea70d97e3fecb0d5333d58ce5efe3a6e1f9100b Mon Sep 17 00:00:00 2001 From: eichehome Date: Sat, 11 Dec 2021 19:22:56 +0100 Subject: [PATCH] Stand einckecken --- .gitignore | 1 + base.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ mod.sh | 24 +++++++++++++++++++++++ pre.sh | 42 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 .gitignore create mode 100644 base.sh create mode 100644 mod.sh create mode 100644 pre.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/base.sh b/base.sh new file mode 100644 index 0000000..048d44b --- /dev/null +++ b/base.sh @@ -0,0 +1,56 @@ +ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime +hwclock --systohc + +vim /etc/locale.gen +sed -i 's/#(de_DE.UTF-8)/\1/' /etc/locale.gen +locale-gen + +echo "LANG=de_DE.UTF-8" >> /etc/locale.conf +echo "KEYMAP=de-latin1" >> /etc/vconsole.conf #only for console not for DE or terminal +echo "FONT=Tamsyn10x20r" >> /etc/vconsole.conf +echo "arch" >> /etc/hostname +# vim /etc/hosts +echo "127.0.0.1 localhost" >> /etc/hosts +echo "::1 localhost" >> /etc/hosts +echo "127.0.1.1 arch.localedomain arch" >> /etc/hosts +echo root:test | chpasswd + + +# Wish +# pacman -S --noconfirm efibootmgr dialog iwd mtools doasfstools reflector base-devel linux-headers avahi nss-mdns xdg-user-dirs xdg-utils inetutils dnsutils bluez bluez-utils cups hplip alsa-utils pipewire pipewire-alsa pipewire-pulseaudio pipewire-jack pavucontrol bash-completion openssh rsync acpi acpi_call tlp virt-manager qemu qemu-arch-extra edk2-ovmf bridge-utils dnsmasq vde2 openbsd-netcat iptables-nft ipset firewalld sof-firmware acpid os-prober ntfs-3g tamsyn-font +# i3 +pacman -S --noconfirm efibootmgr dialog iwd mtools doasfstools reflector base-devel linux-headers avahi xdg-user-dirs xdg-utils gvfs gvfs-smb nfs-utils inetutils dnsutils bluez bluez-utils cups hplip alsa-utils pulseaudio xorg pavucontrol bash-completion openssh rsync acpi acpi_call tlp virt-manager qemu qemu-arch-extra edk2-ovmf bridge-utils dnsmasq vde2 openbsd-netcat iptables-nft ipset firewalld sof-firmware acpid os-prober ntfs-3g + +# All +# pacman -S --noconfirm efibootmgr dialog / mtools doasfstools reflector base-devel linux-headers xdg-user-dirs xdg-utils inetutils dnsutils bluez bluez-utils cups alsa-utils pipewire pipewire-alsa pipewire-pulseaudio pipewire-jack pavucontrol bash-completion openssh rsync acpi acpi_call iptables-nft ipset firewalld acpid os-prober treminus-font + +pacman -S --noconfirm xf86-video-amdgpu + +systemctl enable bluetooth +systemctl enable cups.service +systemctl enable sshd +systemctl enable avahi-deamon +systemctl enable reflector.timer +systemctl enable fstrim.timer +systemctl enable libvirtd +systemctl enable firewalld +systemctl enable acpid +systemctl enable iwd + +# Systemd-networkd (for wlan0) +echo "[Match]" >> /etc/systemd/network/25-wireless.network +echo "Name=wlan0" >> /etc/systemd/network/25-wireless.network +echo "\n" >> /etc/systemd/network/25-wireless.network +echo "[Network]" >> /etc/systemd/network/25-wireless.network +echo "DHCP=yes" >> /etc/systemd/network/25-wireless.network + +systemctl enable systemd-networkd +systemctl enable systemd-resolved + +useradd -m eichehome +echo eichehome:testen | chpasswd + + +echo "eichehome ALL=(ALL) ALL" >> /etc/sudoers.d/eichehome + +printf "\e[1;32mDone: Type exit, umount -a and reboot.\n\e[0m" diff --git a/mod.sh b/mod.sh new file mode 100644 index 0000000..b0e9d2b --- /dev/null +++ b/mod.sh @@ -0,0 +1,24 @@ +sed -i 's/MODULES=()/MODULES=(amdgpu)/' /etc/mkinitcpio.conf +# sed -i 's/MODULES=()/MODULES=(nvidia)/' /etc/mkinitcpio.conf +# sed -i 's/MODULES=()/MODULES=(i915)/' /etc/mkinitcpio.conf + +mkinitcpio -p linux +# mkinitcpio -p linux-lts + +bootctl install # be aware of Problems by dualbooting + +# Bootloaderconfig +sed -i 's/#\(timeout\)\s[0-9]/\1 5/' /boot/loader/loader.conf +sed -i 's/#\(console\)/\1/' /boot/loader/loader.conf +sed -i 's/keep/max/' /boot/loader/loader.conf +sed -i 's/\(default\s\).*/\1arch.conf/' /boot/loader/loader.conf + +# Entry +echo "title Arch Linux" >> /boot/loader/entries/arch.conf +echo "linux /vmlinuz-linux" >> /boot/loader/entries/arch.conf +# AMD +echo "initrd /amd-ucode.img" >> /boot/loader/entries/arch.conf +# Intel +# echo "initrd /intel-ucode.img" >> /boot/loader/entries/arch.conf +echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf +echo 'options root="LABLE=arch" rw' >> /boot/loader/entries/arch.conf diff --git a/pre.sh b/pre.sh new file mode 100644 index 0000000..4bc2676 --- /dev/null +++ b/pre.sh @@ -0,0 +1,42 @@ +# setfont ter-132n +localectl set-keymap de-latin1 + +ip -c a +# iwctl +# rfkill unblock wifi +packman -Sy #check if we can reach the repos + +packman -S tamsyn-font +setfont Tamsyn10x20r + +timedatectl set-ntp true + +fdisk /dev/vda +# UEFI/GPT +# /dev/vda1 300M EFI +# /dev/vda2 4G SWAP +# /dev/vda3 20G / +# /dev/vda4 Rest /home +# BIOS/MBR + +mkfs.fat -F32 /dev/vda1 +mkswap /dev/vda2 +swapon /dev/vda2 +mkfs.ext4 /dev/vda3 -L arch # For reference by the Boot-entry +mkfs.ext4 /dev/vda4 + +mount /dev/vda3 /mnt +mkdir /mnt/{boot,home} +mount /dev/vda1 /mnt/boot +mount /dev/vda4 /mnt/home + +# Linux/AMD +pacstrap /mnt base linux linux-firmware vim amd-ucode git +# Linux/Intel +# pacstrap /mnt base linux linux-firmware vim intel-ucode git + +# pacstrap /mnt base linux linux-firmware vim / +# tamsyn-font +genfstab -U /mnt >> /mnt/etc/fstab + +arch-chroot /mnt