summaryrefslogtreecommitdiffstats
path: root/src/utils/bios.py
Commit message (Collapse)AuthorAgeFilesLines
* src: log backtrace in unhandled error casesAlejandro Sirgo Rica2024-04-031-2/+3
| | | | | | | | | | | | | | | | | | | Log an error message in known error cases and log a backtrace otherwise. Define a new error type OgError to be used in all the 'raise' blocks to define the error message to log. The exception propagates until it reaches send_internal_server_error() where the exception type is checked. If the type is OgError we log the exception message. Logs the backtrace for other types. The initial error implementation printed a backtrace everytime an error ocurred. The next iteration changed it to only print a backtrace in a very particular case but ended up omiting too much information such as syntax errors or unknown error context. The actual implementation only logs the cases we already cover in the codebase and logs a bracktrace in the others, enabling a better debugging experience.
* utils: fix string not being defined as f-strings when they shouldAlejandro Sirgo Rica2024-03-211-2/+2
| | | | | Add the string prefix f'' to string instances formated as f-string but not properly constructed to expand the inline variables.
* utils: implement BIOS boot for LinuxAlejandro Sirgo Rica2024-03-211-0/+53
Create a bios.py file to hold all the BIOS specific functions. Implement the _boot_bios_linux in Python. The new boot process tries to find the vmlinuz and initrd binaries at the desired partition. Then it tries to load them with kexec with the proper Grub boot params. One step closer to the removal of the boot legacy script.