remove _kexec function, add kexec call to update-installer.sh

This commit is contained in:
Tobias Powalowski 2022-05-17 22:57:23 +02:00
parent bf8118457b
commit 512ce699bc
2 changed files with 1 additions and 25 deletions

View file

@ -65,7 +65,7 @@ if [[ "${_L_COMPLETE}" == "1" || "${_L_INSTALL_COMPLETE}" == "1" ]]; then
# unload virtio-net to avoid none functional network device on aarch64 # unload virtio-net to avoid none functional network device on aarch64
grep -qw virtio_net /proc/modules && rmmod virtio_net grep -qw virtio_net /proc/modules && rmmod virtio_net
echo -e "\033[1mStep 9/9:\033[0m Loading files through kexec into kernel now ..." echo -e "\033[1mStep 9/9:\033[0m Loading files through kexec into kernel now ..."
_kexec kexec -s -f /"${VMLINUZ}" --initrd="/initrd.img" --reuse-cmdline
fi fi
# Generate new images # Generate new images

View file

@ -228,30 +228,6 @@ _create_initramfs() {
bsdtar --null -cf - --format=newc @- | zstd --rm -T0> /initrd.img bsdtar --null -cf - --format=newc @- | zstd --rm -T0> /initrd.img
} }
_kexec() {
# load kernel and initrds into running kernel in background mode!
kexec -s -f /"${VMLINUZ}" --initrd="/initrd.img" --reuse-cmdline
# wait 2 seconds for getting a complete initramfs
# remove kernel and initrd to save RAM for kexec in background
#sleep 2
#rm /{initrd.img,${VMLINUZ}}
#while pgrep -x kexec >/dev/null 2>&1; do
# sleep 1
#done
#echo -e "\033[1mFinished:\033[0m Rebooting in a few seconds ..."
# don't show active prompt wait for kexec to be launched
#while true; do
# if [[ -e "/sys/firmware/efi" ]]; then
# UEFI kexec call
# systemctl kexec 2>/dev/null
# else
# # BIOS kexec call
# kexec -e 2>/dev/null
# fi
# sleep 1
# done
}
_cleanup_install() { _cleanup_install() {
rm -rf /usr/share/{man,info,doc,gtk-doc,ibus,perl5} rm -rf /usr/share/{man,info,doc,gtk-doc,ibus,perl5}
rm -rf /usr/include rm -rf /usr/include