moved to generated Bootentries

This commit is contained in:
eichehome 2023-03-30 13:10:51 +02:00
parent 161d5e18b7
commit 1f6d7f3829
2 changed files with 51 additions and 41 deletions

84
base.sh
View file

@ -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/')

8
configs/entry.conf Normal file
View file

@ -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=@