From dee52e54b4f028ea8fb1499134fccc545db6e729 Mon Sep 17 00:00:00 2001 From: Boris Staletic Date: Thu, 28 Nov 2024 22:10:46 +0100 Subject: [PATCH] Add support for BIOS/extlinux setups --- ecleankernel/__main__.py | 3 ++- ecleankernel/bootloader/extlinux.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 ecleankernel/bootloader/extlinux.py diff --git a/ecleankernel/__main__.py b/ecleankernel/__main__.py index addfaa5..a32a65d 100644 --- a/ecleankernel/__main__.py +++ b/ecleankernel/__main__.py @@ -22,6 +22,7 @@ from ecleankernel.bootloader.grub import GRUB from ecleankernel.bootloader.grub2 import GRUB2 from ecleankernel.bootloader.lilo import LILO +from ecleankernel.bootloader.extlinux import EXTLINUX from ecleankernel.bootloader.yaboot import Yaboot from ecleankernel.bootloader.symlinks import Symlinks from ecleankernel.layout.blspec import BlSpecLayout @@ -63,7 +64,7 @@ def friendly_desc(self) -> str: def main(argv: typing.List[str]) -> int: kernel_parts = [x.value for x in KernelFileType.__members__.values()] bootloaders: typing.List[typing.Type[Bootloader]] = [ - LILO, GRUB2, GRUB, Yaboot, Symlinks] + LILO, GRUB2, GRUB, EXTLINUX, Yaboot, Symlinks] layouts: typing.List[typing.Type[Layout]] = [ BlSpecLayout, StdLayout] sorts = [MTimeSort, VersionSort] diff --git a/ecleankernel/bootloader/extlinux.py b/ecleankernel/bootloader/extlinux.py new file mode 100644 index 0000000..2aa4792 --- /dev/null +++ b/ecleankernel/bootloader/extlinux.py @@ -0,0 +1,11 @@ +# (c) 2024 Boris Staletic +# SPDX-License-Identifier: GPL-2.0-or-later + +from ecleankernel.bootloader.lilo import LILO + + +class EXTLINUX(LILO): + name = 'extlinux' + kernel_re = r'^\s*(:?LINUX|KERNEL)\s+(?P.+)\s*$' + def_path = ('/boot/extlinux/extlinux.conf', + '/boot/syslinux/syslinux.cfg')