Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

util/build-img.sh: use system syslinux binaries #1076

Merged
merged 3 commits into from
Jan 31, 2021
Merged

Conversation

fhs
Copy link

@fhs fhs commented Jan 24, 2021

Guestfish uses the extlinux command installed on the system and the
version of syslinux install on the system may be different from the one
that comes with Harvey. If we mix syslinux versions, boot can fail. For
example, I was getting this when booting from an image created on an
ArchLinux system:

Undef symbol FAIL: x86_init_fpu
Failed to load libcom32.c32
Failed to load COM32 file vesamenu.c32

Help #1072

Signed-off-by: Fazlul Shahriar fshahriar@gmail.com

Guestfish uses the extlinux command installed on the system and the
version of syslinux install on the system may be different from the one
that comes with Harvey. If we mix syslinux versions, boot can fail. For
example, I was getting this when booting from an image created on an
ArchLinux system:
```
Undef symbol FAIL: x86_init_fpu
Failed to load libcom32.c32
Failed to load COM32 file vesamenu.c32
```

Help Harvey-OS#1072

Signed-off-by: Fazlul Shahriar <fshahriar@gmail.com>
# Syslinux should already be installed on the system since it's a
# dependency of guestfish. We want to use the system syslinux binaries
# which match the extlinux command below.
SRC_SYSLINUX=/usr/lib/syslinux/bios
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather we bring the file into harvey. The reason is that this path is not at at all standard across distros. Would that be ok with you? These files change rarely if ever.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with that. Any idea where the existing syslinux files were obtained from? I need the extlinux binary that matches mbr and other syslinux files already in harvey. Otherwise, I could just updated all syslinux files to the latest version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well update all with the latest

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought guestfish searches for extlinux in $PATH. I was wrong. It creates a VM image from the host system and runs everything from within qemu. So, modifying $PATH to include harvey's extlinux will not prevent guestfish from picking up the system extlinux. I don't see any easy workaround for this.

We can run extlinux externally after mounting the filesystem using qemu-nbd but that'd require root access and kind of defeats the purpose of using guestfish. Maybe we can just check for some common places linux distros keep the syslinux *.c32 files?

Ultimately we want to provide downloadable boot images to users who want to try out harvey, so this script will be run by only few people.

Copy link
Contributor

@rminnich rminnich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're still good with this let's go. I did not mean to slow it down.

@fhs
Copy link
Author

fhs commented Jan 31, 2021

At least the CI builds the image now. I'll go with this for now and improve it as things come up.

@fhs fhs merged commit 29c3281 into Harvey-OS:main Jan 31, 2021
@fhs fhs deleted the build-img branch January 31, 2021 21:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants