mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
new kexec routine for testing added
This commit is contained in:
parent
4812f832b9
commit
35d3c30392
2 changed files with 21 additions and 1 deletions
|
@ -65,7 +65,8 @@ 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 -s -f /"${VMLINUZ}" --initrd="/initrd.img" --reuse-cmdline
|
echo " This will need some time ..."
|
||||||
|
_kexec
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate new images
|
# Generate new images
|
||||||
|
|
|
@ -141,6 +141,14 @@ _umount_w_dir() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_umount_usr() {
|
||||||
|
echo "Unmounting /usr.zram ..." > /dev/tty7
|
||||||
|
# umount all possible mountpoints
|
||||||
|
umount "/usr"
|
||||||
|
/usr.zram/bin/./umount /usr.zram
|
||||||
|
echo 1 > /sys/block/zram1/reset
|
||||||
|
}
|
||||||
|
|
||||||
_clean_archboot() {
|
_clean_archboot() {
|
||||||
# remove everything not necessary
|
# remove everything not necessary
|
||||||
rm -rf "/usr/lib/firmware"
|
rm -rf "/usr/lib/firmware"
|
||||||
|
@ -228,6 +236,17 @@ _create_initramfs() {
|
||||||
bsdtar --null -cf - --format=newc @- | zstd --rm -T0> /initrd.img
|
bsdtar --null -cf - --format=newc @- | zstd --rm -T0> /initrd.img
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_kexec () {
|
||||||
|
kexec -s -f /"${VMLINUZ}" --initrd="/initrd.img" --reuse-cmdline &
|
||||||
|
sleep 2
|
||||||
|
rm /{${VMLINUZ},initrd.img}
|
||||||
|
_umount_usr
|
||||||
|
while true; do
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in a new issue