fix
This commit is contained in:
parent
959bbfaf31
commit
ee744f2040
3 changed files with 8 additions and 19 deletions
|
@ -799,8 +799,8 @@ function systemdboot() {
|
||||||
|
|
||||||
#rootsub=$(btrfs subvolume list /mnt | awk 'NR<0 && NR>2 {print $2}')
|
#rootsub=$(btrfs subvolume list /mnt | awk 'NR<0 && NR>2 {print $2}')
|
||||||
if [ "${version}" == "manjaro" ]; then
|
if [ "${version}" == "manjaro" ]; then
|
||||||
kernel1="$(echo $(find /boot/ -name "initramfs*$(uname -m).img") | cut -d" " -f2)"
|
kernel1="$(echo $(find /boot/ -name "initramfs*.img") | cut -d" " -f4)"
|
||||||
linuz1="$(echo $(find /boot/ -name "vmlinuz*$(uname -m)") | cut -d" " -f2)"
|
linuz1="$(echo $(find /boot/ -name "vmlinuz*") | cut -d" " -f2)"
|
||||||
kernel="${kernel1#/*/}"
|
kernel="${kernel1#/*/}"
|
||||||
linuz="${linuz1#/*/}"
|
linuz="${linuz1#/*/}"
|
||||||
kernelback1="$(echo $(find /boot/ -name "initramfs*$(uname -m)-fallback.img") | cut -d" " -f2)"
|
kernelback1="$(echo $(find /boot/ -name "initramfs*$(uname -m)-fallback.img") | cut -d" " -f2)"
|
||||||
|
|
|
@ -44,10 +44,6 @@ arch=$(uname -m)
|
||||||
hostname="SpectreOS-${version}"
|
hostname="SpectreOS-${version}"
|
||||||
work_dir="${version}"
|
work_dir="${version}"
|
||||||
|
|
||||||
if [ "${version}" == "libre" ]; then
|
|
||||||
linuxparameter="-libre"
|
|
||||||
fi
|
|
||||||
|
|
||||||
function minimalinstallation() {
|
function minimalinstallation() {
|
||||||
cp mirrorlist* /etc/pacman.d/
|
cp mirrorlist* /etc/pacman.d/
|
||||||
|
|
||||||
|
@ -215,13 +211,8 @@ function BIOS() {
|
||||||
|
|
||||||
cp -R ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/* ${work_dir}/iso/${install_dir}/boot/syslinux/
|
cp -R ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/* ${work_dir}/iso/${install_dir}/boot/syslinux/
|
||||||
|
|
||||||
if [ "${version}" == "manjaro" ]; then
|
cp "$(echo $(find /boot/ -name "${work_dir}/${arch}/airootfs/boot/initramfs*.img") | cut -d" " -f4)" ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img
|
||||||
cp $(echo $(find ${work_dir}/${arch}/airootfs/boot/ -name "initramfs-${kernel}-$(uname -m).img") | cut -d" " -f1 ) ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img
|
cp "$(echo $(find /boot/ -name "${work_dir}/${arch}/airootfs/boot/vmlinuz-linux*") | cut -d" " -f2)" ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz
|
||||||
cp $(echo $(find ${work_dir}/${arch}/airootfs/boot/ -name "vmlinuz-${kernel}-$(uname -m)") | cut -d" " -f1 ) ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz
|
|
||||||
else
|
|
||||||
cp ${work_dir}/${arch}/airootfs/boot/initramfs-linux${linuxparameter}.img ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img
|
|
||||||
cp ${work_dir}/${arch}/airootfs/boot/vmlinuz-linux${linuxparameter} ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isolinux.bin ${work_dir}/iso/isolinux/
|
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/
|
cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isohdpfx.bin ${work_dir}/iso/isolinux/
|
||||||
|
|
10
snapshot.sh
10
snapshot.sh
|
@ -44,17 +44,15 @@ if [ "make" == "$1" ]; then
|
||||||
#stable-snapshot-boot
|
#stable-snapshot-boot
|
||||||
if [ -f "/boot/arch-uefi.conf.example" ] && [ "${rootsnapshot}" == "y" ]; then
|
if [ -f "/boot/arch-uefi.conf.example" ] && [ "${rootsnapshot}" == "y" ]; then
|
||||||
|
|
||||||
cp "$(echo $(find /boot/ -name "initramfs*$(uname -m).img") | cut -d" " -f2)" /boot/initramfs-linux-1.00-$(uname -m).img
|
cp "$(echo $(find /boot/ -name "initramfs*.img") | cut -d" " -f4)" /boot/initramfs-linux-1.00-$(uname -m).img
|
||||||
cp "$(echo $(find /boot/ -name "vmlinuz*$(uname -m)") | cut -d" " -f2)" /boot/vmlinuz-1.00-$(uname -m)
|
cp "$(echo $(find /boot/ -name "vmlinuz*") | cut -d" " -f2)" /boot/vmlinuz-1.00-$(uname -m)
|
||||||
|
|
||||||
kernel1="$(echo $(find /boot/ -name "initramfs*-1.00-$(uname -m).img") | cut -d" " -f2)"
|
kernel1="$(echo $(find /boot/ -name "initramfs*-1.00.img") | cut -d" " -f2)"
|
||||||
linuz1="$(find /boot/ -name "vmlinuz*-1.00-$(uname -m)")"
|
linuz1="$(find /boot/ -name "vmlinuz*-1.00-$(uname -m)")"
|
||||||
kernel="${kernel1#/*/}"
|
kernel="${kernel1#/*/}"
|
||||||
linuz="${linuz1#/*/}"
|
linuz="${linuz1#/*/}"
|
||||||
|
|
||||||
sed "s|%LINUZ%|${linuz}|g;
|
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
|
||||||
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
|
|
||||||
|
|
||||||
if [ -f /run/btrfs-root/__current/ROOT/SNAPSHOT ]; then
|
if [ -f /run/btrfs-root/__current/ROOT/SNAPSHOT ]; then
|
||||||
rm /run/btrfs-root/__current/ROOT/SNAPSHOT
|
rm /run/btrfs-root/__current/ROOT/SNAPSHOT
|
||||||
|
|
Loading…
Reference in a new issue