From 1f6d7f38299c6afab9f2a3dc0511f89ac9277af5 Mon Sep 17 00:00:00 2001 From: eichehome Date: Thu, 30 Mar 2023 13:10:51 +0200 Subject: [PATCH] moved to generated Bootentries --- base.sh | 84 ++++++++++++++++++++++++---------------------- configs/entry.conf | 8 +++++ 2 files changed, 51 insertions(+), 41 deletions(-) create mode 100644 configs/entry.conf diff --git a/base.sh b/base.sh index 3e7cf57..8047da0 100644 --- a/base.sh +++ b/base.sh @@ -183,13 +183,15 @@ entry_conf=$(find / -type f -name entry.conf | grep configs) for kernel_einzeln in $array_kernel_einzeln; do boot_entry_name="${kernel_einzeln//linux/arch}"; # Standart + echo "$boot_entry_name.conf" cp "$entry_conf" /boot/loader/entries/"$boot_entry_name".conf sed -i "s/#KERNEL#/$kernel_einzeln/" /boot/loader/entries/"$boot_entry_name".conf sed -i "s/#INITRAMFS#/$kernel_einzeln/" /boot/loader/entries/"$boot_entry_name".conf title="${boot_entry_name//arch/arch-linux}" sed -i "s/#TITLE#/$title/" /boot/loader/entries/"$boot_entry_name".conf # Fallback - cp "$entry_conf" /boot/loader/entries/"$boot_entry_name".conf + echo "$boot_entry_name-fallback.conf" + cp "$entry_conf" /boot/loader/entries/"$boot_entry_name"-fallback.conf sed -i "s/#KERNEL#/$kernel_einzeln/" /boot/loader/entries/"$boot_entry_name"-fallback.conf sed -i "s/#INITRAMFS#/$kernel_einzeln-fallback/" /boot/loader/entries/"$boot_entry_name"-fallback.conf title="${boot_entry_name//arch/arch-linux}-fallback" @@ -200,46 +202,46 @@ done; #KERNEL#linux-zen #INITRAMFS#linux-zen-fallback -if [[ $kernel == 1 || $kernel == 2 || $kernel == 3 || $kernel == 4 ]]; then - # Entry Arch - arch_conf=$(find / -type f -name arch.conf | grep configs) - cp "$arch_conf" /boot/loader/entries/ -fi - -if [[ $kernel == 2 || $kernel == 4 || $kernel == 5 ]]; then - # Entry Arch LTS - arch_lts_conf=$(find / -type f -name arch-lts.conf | grep configs) - cp "$arch_lts_conf" /boot/loader/entries/ -fi - -if [[ $kernel == 3 || $kernel == 4 || $kernel == 5 ]]; then - # Entry Arch Zen - arch_zen_conf=$(find / -type f -name arch-zen.conf | grep configs) - cp "$arch_zen_conf" /boot/loader/entries/ -fi - -if [[ $kernel == 1 || $kernel == 2 || $kernel == 3 || $kernel == 4 ]]; then - # Entry Arch Fallback - arch_fallback_conf=$(find / -type f -name arch-fallback.conf | grep configs) - cp "$arch_fallback_conf" /boot/loader/entries/ -fi - -if [[ $kernel == 2 || $kernel == 4 || $kernel == 5 ]]; then - # Entry Arch LTS Fallback - arch_lts_fallback_conf=$(find / -type f -name arch-lts-fallback.conf | grep configs) - cp "$arch_lts_fallback_conf" /boot/loader/entries/ -fi - -if [[ $kernel == 3 || $kernel == 4 || $kernel == 5 ]]; then - # Entry Arch Zen Fallback - arch_zen_fallback_conf=$(find / -type f -name arch-zen-fallback.conf | grep configs) - cp "$arch_zen_fallback_conf" /boot/loader/entries/ - if [[ $vendor == 1 ]]; then - sed -i 's/#AMD//' /boot/loader/entries/arch-zen-fallback.conf - elif [[ $vendor == 2 ]]; then - sed -i 's/#Intel//' /boot/loader/entries/arch-zen-fallback.conf - fi -fi +#if [[ $kernel == 1 || $kernel == 2 || $kernel == 3 || $kernel == 4 ]]; then +# # Entry Arch +# arch_conf=$(find / -type f -name arch.conf | grep configs) +# cp "$arch_conf" /boot/loader/entries/ +#fi +# +#if [[ $kernel == 2 || $kernel == 4 || $kernel == 5 ]]; then +# # Entry Arch LTS +# arch_lts_conf=$(find / -type f -name arch-lts.conf | grep configs) +# cp "$arch_lts_conf" /boot/loader/entries/ +#fi +# +#if [[ $kernel == 3 || $kernel == 4 || $kernel == 5 ]]; then +# # Entry Arch Zen +# arch_zen_conf=$(find / -type f -name arch-zen.conf | grep configs) +# cp "$arch_zen_conf" /boot/loader/entries/ +#fi +# +#if [[ $kernel == 1 || $kernel == 2 || $kernel == 3 || $kernel == 4 ]]; then +# # Entry Arch Fallback +# arch_fallback_conf=$(find / -type f -name arch-fallback.conf | grep configs) +# cp "$arch_fallback_conf" /boot/loader/entries/ +#fi +# +#if [[ $kernel == 2 || $kernel == 4 || $kernel == 5 ]]; then +# # Entry Arch LTS Fallback +# arch_lts_fallback_conf=$(find / -type f -name arch-lts-fallback.conf | grep configs) +# cp "$arch_lts_fallback_conf" /boot/loader/entries/ +#fi +# +#if [[ $kernel == 3 || $kernel == 4 || $kernel == 5 ]]; then +# # Entry Arch Zen Fallback +# arch_zen_fallback_conf=$(find / -type f -name arch-zen-fallback.conf | grep configs) +# cp "$arch_zen_fallback_conf" /boot/loader/entries/ +# if [[ $vendor == 1 ]]; then +# sed -i 's/#AMD//' /boot/loader/entries/arch-zen-fallback.conf +# elif [[ $vendor == 2 ]]; then +# sed -i 's/#Intel//' /boot/loader/entries/arch-zen-fallback.conf +# fi +#fi cryptroot_name=$(grep "#\s/dev/mapper" /etc/fstab | head -n 1 | sed 's/#\s\/dev\/mapper\/\(.*\)\s.*/\1/') cryptroot_device_name=$(grep "LABEL=EFI" /etc/fstab | sed 's/#\s\/dev\/\(.\{3\}\).*/\1/') diff --git a/configs/entry.conf b/configs/entry.conf new file mode 100644 index 0000000..25e9da1 --- /dev/null +++ b/configs/entry.conf @@ -0,0 +1,8 @@ +title #TITLE# +linux /vmlinuz-#KERNEL# +# AMD +#AMDinitrd /amd-ucode.img +# Intel +#Intelinitrd /intel-ucode.img +initrd /initramfs-#INITRAMFS#.img +options root=LABEL=arch rootflags=subvol=@ \ No newline at end of file