From 1908139dfde7668564ca19bd2d25a1755210c1f6 Mon Sep 17 00:00:00 2001 From: simono41 Date: Thu, 30 Aug 2018 00:12:58 +0200 Subject: [PATCH] fix --- arch-install | 6 +++--- make_mksquashfs-auto.sh | 4 ++-- snapshot.sh | 10 ++++------ update-bootloader | 6 +++--- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/arch-install b/arch-install index 17c5588..e28a882 100755 --- a/arch-install +++ b/arch-install @@ -799,11 +799,11 @@ function systemdboot() { #rootsub=$(btrfs subvolume list /mnt | awk 'NR<0 && NR>2 {print $2}') if [ "${version}" == "manjaro" ]; then - kernel1="$(echo $(find /boot/ -name "initramfs*.img") | cut -d" " -f2)" - linuz1="$(echo $(find /boot/ -name "vmlinuz*") | cut -d" " -f2)" + kernel1="$(echo $(find /boot/ -name "initramfs*.img") | cut -d" " -f1)" + linuz1="$(echo $(find /boot/ -name "vmlinuz*") | cut -d" " -f1)" kernel="${kernel1#/*/}" linuz="${linuz1#/*/}" - kernelback1="$(echo $(find /boot/ -name "initramfs*$(uname -m)-fallback.img") | cut -d" " -f2)" + kernelback1="$(echo $(find /boot/ -name "initramfs*-fallback.img") | cut -d" " -f1)" kernelback="${kernelback1#/*/}" else kernel="initramfs-linux.img" diff --git a/make_mksquashfs-auto.sh b/make_mksquashfs-auto.sh index 599dadd..4cb165a 100755 --- a/make_mksquashfs-auto.sh +++ b/make_mksquashfs-auto.sh @@ -211,8 +211,8 @@ function BIOS() { cp -R ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/* ${work_dir}/iso/${install_dir}/boot/syslinux/ - cp "$(echo $(find ${work_dir}/${arch}/airootfs/boot/ -name "initramfs*.img") | cut -d" " -f2)" ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img - cp "$(echo $(find ${work_dir}/${arch}/airootfs/boot/ -name "vmlinuz-linux*") | cut -d" " -f2)" ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz + cp "$(echo $(find ${work_dir}/${arch}/airootfs/boot/ -name "initramfs*.img") | cut -d" " -f1)" ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img + cp "$(echo $(find ${work_dir}/${arch}/airootfs/boot/ -name "vmlinuz*") | cut -d" " -f1)" ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isolinux.bin ${work_dir}/iso/isolinux/ cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isohdpfx.bin ${work_dir}/iso/isolinux/ diff --git a/snapshot.sh b/snapshot.sh index 651a538..8c92e76 100755 --- a/snapshot.sh +++ b/snapshot.sh @@ -44,13 +44,11 @@ if [ "make" == "$1" ]; then #stable-snapshot-boot if [ -f "/boot/arch-uefi.conf.example" ] && [ "${rootsnapshot}" == "y" ]; then - cp "$(echo $(find /boot/ -name "initramfs*.img") | cut -d" " -f2)" /boot/initramfs-linux-1.00-$(uname -m).img - cp "$(echo $(find /boot/ -name "vmlinuz*") | cut -d" " -f2)" /boot/vmlinuz-1.00-$(uname -m) + cp "$(echo $(find /boot/ -name "initramfs*.img") | cut -d" " -f1)" /boot/initramfs-stable.img + cp "$(echo $(find /boot/ -name "vmlinuz*") | cut -d" " -f1)" /boot/vmlinuz-stable - kernel1="$(echo $(find /boot/ -name "initramfs*-1.00.img") | cut -d" " -f2)" - linuz1="$(find /boot/ -name "vmlinuz*-1.00-$(uname -m)")" - kernel="${kernel1#/*/}" - linuz="${linuz1#/*/}" + kernel="/initramfs-stable.img" + linuz="/vmlinuz-stable" sed "s|%LINUZ%|${linuz}|g;s|%KERNEL%|${kernel}|g;s|rootflags=subvol=__current/ROOT|rootflags=subvol=__snapshot/ROOT@`head -n 1 /run/btrfs-root/__current/ROOT/SNAPSHOT`|g" /boot/arch-uefi.conf.example > /boot/loader/entries/arch-uefi-stable.conf diff --git a/update-bootloader b/update-bootloader index dfd8178..4553e77 100755 --- a/update-bootloader +++ b/update-bootloader @@ -10,12 +10,12 @@ fi echo "Als root Angemeldet" -kernel1="$(echo $(find /boot/ -name "initramfs*$(uname -m).img") | cut -d" " -f2)" -linuz1="$(echo $(find /boot/ -name "vmlinuz*$(uname -m)") | cut -d" " -f2)" +kernel1="$(echo $(find /boot/ -name "initramfs*.img") | cut -d" " -f1)" +linuz1="$(echo $(find /boot/ -name "vmlinuz*") | cut -d" " -f1)" kernel="${kernel1#/*/}" linuz="${linuz1#/*/}" -kernelback1="$(echo $(find /boot/ -name "initramfs*$(uname -m)-fallback.img") | cut -d" " -f2)" +kernelback1="$(echo $(find /boot/ -name "initramfs*-fallback.img") | cut -d" " -f1)" kernelback="${kernelback1#/*/}"