elemental-toolkit
elemental-toolkit copied to clipboard
elemental build-iso what about Syslinux bootloader alternative ?
Is your feature request related to a problem? Please describe.
As PR https://github.com/rancher-sandbox/cOS-toolkit/pull/1245 was merge, I saw that cos-toolkit build iso documentation was updated to use elemental build-iso
but with no more reference to Syslinux boot loader alternative to grub2. Does this mean that this lighter bootloader is left aside?
In my case, for a small basic abcd (alpine based cOS derivative) flavour, iso image file (generated using previous luet-makeiso
method) is twice sized with grub2 than Syslinux.
# ls -alht *.20220425*
-rwxr-xr-x 1 root root 83 Apr 25 18:49 cOS-0-abcd4cirrus-os-grub2.20220425.iso.sha256
-rw-r--r-- 1 qemu qemu 1009M Apr 25 18:49 cOS-0-abcd4cirrus-os-grub2.20220425.iso
-rwxr-xr-x 1 root root 83 Apr 25 18:09 cOS-0-abcd4cirrus-os-syslinux.20220425.iso.sha256
-rw-r--r-- 1 qemu qemu 522M Apr 25 18:09 cOS-0-abcd4cirrus-os-syslinux.20220425.iso
That said, I can understand that the cos-toolkit/elemental dev team aims to only support the more advanced bootloader than the minimalist one. But the size of the iso image is a point of attention for me because I plan to share a single unique live iso image file, with no installation step, for all cloned VMs or nodes on my cluster.
Describe the solution you'd like
Can you tell me if the future version of elemental will support the alternate Syslinux bootloader functionality like the previous luet-makeiso ?
Hi @j-landru altough not directly supported, it should be still possible building ISOS with syslinux, see https://github.com/Luet-lab/luet-makeiso/pull/4#issuecomment-1072644198 for an example.
But besides that it wouldn't explain such a growth of size in the final images. In c3os
alpine based images with grub are around ~550MB.
cc: @davidcassany maybe some temp folder gets into the final ISOs?
Thanks for reporting the issue. Please note that luet-makeiso
is not dropped, it can still be used it's just moved away form the Makefile iso's target. But you can certainly still build what you used to by calling the luet-makeiso and using the former manifest.yaml.
In relation to the image size the difference you are seeing can't be caused by the bootloader choice, there must be something else. I suspect you syslinux manifest does not include recovery/cos-img
but the grub bootloader one does, could it be the case? If so that explains the difference as including recovery/cos-img
adds an additional squashed rootfs image within the ISO filesystem, so it essentially duplicates its size.
In relation to the syslinux vs grub2 it is not forgotten, but we are aiming to provide proper support rather than a hackish solution. What you call syslinux is not only syslinux it is syslinux and systemd-boot (I wonder how this maps to an alpine flavor...). So by default luet-makeiso used to use systemd-boot on EFI. This setup in terms of size is tricky since systemd-boot requires including initrd and kernel within the EFI image, resulting in duplicated binaries in ISO filesystem and EFI filesystem. Moreover I believe (not 100% sure) the hybrid builds we are doing duplicate the whole EFI image, one at the end of the file and another one as part of the ISO filesystem, so in regards of image size EFI image has a great impact.
The problem of all this is that we aim to support hybrid images for BIOS and EFI firmwares and this setup for syslinux is not that obvious, here is where grub2 is the common bootloader that can handle everything (ISOs, disks and legacy vs EFI firmwares). The intention has been always to support syslinux but I fear adding EFI in the feature set makes it quite difficult to manage. This requires quite some time in trails and error to find a proper and generic enough setup for all this.
May I ask you which is the feature set you are after? Do you need EFI and/or legacy Bios? Were you using using the systemd-boot for EFI? Would it be enough for you having BIOS only images as a first step? Probably this is a low hanging fruit on our side.
Note that most of the work is related to providing the appropriate bootloader packages from packages/livecd
.
Thanks for your quick reaction
@mudler Yes your c3os project is my reference to try to build an abcd flavour. I need probably to look more deeply in your Dockerfile to do delete some temporary files.
@davidcassany
- Yes,PR https://github.com/rancher-sandbox/cOS-toolkit/pull/1245 , I know that
luet-makeiso
is not dropped and still usable, but withelemental
integration way, the latter tool will be the main supported and documented way and the former a secondary way maybe not supported in mid term. - The more reasonable, from my point of view is to support the main functional or universal boot loader and grub2 is probably the right one especially for hybrid image (BIOS / EFI). As I'll plan to reuse some old heteroclyte servers hybrid BIOS / EFI is a point of attention. So using grub2 instead of other bootloader is OK for me.
- May I ask you which is the feature set you are after? : I publish another more detailed feature request about live iso persistence, as I would like to use cOS as a common live demo distrib