doomedraven / Tools

Combination of different utilities, have fun!
MIT License
202 stars 96 forks source link

Kernel panic after running kvm-qemu.sh #102

Closed hawk4n6 closed 3 years ago

hawk4n6 commented 3 years ago

Current script version (81d18a5c43f91c10b6c444983474a37bd1b2349a) causes an real strange error:

During execution of kvm-qemu.sh something failed into the system. No program can be found anymore, no further action is possible, no programs can be started. I can't do anything except Reset or Power-Off the computer. When rebooting a Kernel Panic occurs. Neither rescue mode nor an older Kernel version can be started.

This happens twice at two different computers in an fresh Ubuntu 20.04 amd64 LTS installation with all available updates installed. I used the current kvm-qemu.sh script from GitHub.

This seems to happen during function install_apparmor, which was added with the last commit. I don't have any hint what went wrong. I'll repeat the installation with stdout/stderr logging.

doomedraven commented 3 years ago

Hello, that is probably due to checkinstall, see https://github.com/doomedraven/Tools/issues/88 I had the same issue this weekend, but that was the first time that it happens to me, so soon I will push a version without checkinstall

hawk4n6 commented 3 years ago

Hello, below part of the log file to see where the error happens. The problem occurs when executing line 240:

USE_SYSTEM=1 checkinstall -D --pkgname=apparmor-parser --default --install=no

The first few make commands does work, then the first "command not found" (-> bison) error is reported. Then many "not found" errors are printed and the scripts is stopped. Terminal doesn't recognize any command - Reset required.


make install_manpages DESTDIR=/
make[2]: Verzeichnis „/tmp/libvirt-python-7.7.0/apparmor-2.13.6/parser“ wird betreten
install -d ///usr/share/man/man5 ; install -m 644 apparmor.d.5 subdomain.conf.5 ///usr/share/man/man5;   install -d ///usr/share/man/man7 ; install -m 644 a
pparmor.7 ///usr/share/man/man7;   install -d ///usr/share/man/man8 ; install -m 644 apparmor_parser.8 aa-teardown.8 ///usr/share/man/man8; 
make[2]: Verzeichnis „/tmp/libvirt-python-7.7.0/apparmor-2.13.6/parser“ wird verlassen
make[1]: Verzeichnis „/tmp/libvirt-python-7.7.0/apparmor-2.13.6/parser“ wird verlassen
make install-arch
make[1]: Verzeichnis „/tmp/libvirt-python-7.7.0/apparmor-2.13.6/parser“ wird betreten
bison -d -o parser_yacc.c parser_yacc.y
make[1]: bison: Command not found
make[1]: *** [Makefile:200: parser_yacc.h] Fehler 127
make[1]: Verzeichnis „/tmp/libvirt-python-7.7.0/apparmor-2.13.6/parser“ wird verlassen
make: *** [Makefile:378: install] Fehler 2

**** Installation fehlgeschlagen. Breche Paket-Erzeugung ab.

Stelle überschriebene Dateien wieder her.../usr/bin/checkinstall: Zeile 95: /usr/bin/gettext: Datei oder Verzeichnis nicht gefunden

/usr/bin/checkinstall: Zeile 102: /usr/bin/gettext: Datei oder Verzeichnis nicht gefunden```
doomedraven commented 3 years ago

thanks for find what exactly generates this problem, this part of code was working just fine as we tested that you can see conversation here https://github.com/doomedraven/Tools/issues/100, so is checkinstall as i though breaks the OS due to error, im gonna disable that right now and once i will have a bit more time to test this i will push a checkinstall free version, the idea is to use something like in that PR that i show you

mkdir -p /tmp/apparmor-"$APPARMOR_VERSION"_builded/DEBIAN
    echo -e "Package: apparmor-parser\nVersion: $APPARMOR_VERSION\nArchitecture: $ARCH\nMaintainer: $MAINTAINER\nDescription: Custom antivm qemu" > /tmp/apparmor-"$APPARMOR_VERSION"_builded/DEBIAN/control
    make -j"$(nproc)" install DESTDIR=/tmp/apparmor-"$APPARMOR_VERSION"_builded
    dpkg-deb --build --root-owner-group /tmp/apparmor-"$APPARMOR_VERSION"_builded
    apt -y -o Dpkg::Options::="--force-overwrite" install /tmp/apparmor-"$APPARMOR_VERSION"_builded.deb

im gonna disable that func right now in code

doomedraven commented 3 years ago

if you want to test i have tested, no issues anymore, no more love to checkinstall from me https://github.com/doomedraven/Tools/blob/master/Virtualization/kvm-qemu.sh

hawk4n6 commented 3 years ago

Hello, yes, fixed, script is running again without errors. Thanks for fixing!

doomedraven commented 3 years ago

thank you for feedback, let me know if you find any other issue, glad that we finally removed checkinstall