summaryrefslogtreecommitdiffstats
path: root/src/utils/bios.py
Commit message (Collapse)AuthorAgeFilesLines
* src: update license headerOpenGnSys Support Team2024-11-281-1/+1
|
* grub: move get_grub_boot_params() into grub.pyAlejandro Sirgo Rica2024-10-221-16/+0
| | | | | Move get_grub_boot_params() into the file related to all the grub configuration.
* bios: fix use of undefined initrd_dir variable in get_vmlinuz_pathAlejandro Sirgo Rica2024-10-211-1/+1
| | | | | Use the intended linuz_dir instead of initrd_dir in the function get_vmlinuz_path.
* bios.py: fix typo in GRUB_CMDLINE_LINUX_DEFAULT stringAlejandro Sirgo Rica2024-10-091-1/+1
| | | | | Check against GRUB_CMDLINE_LINUX_DEFAULT instead of GRUB_CMDLINE_LINUE_DEFAULT.
* 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.