Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openbsd71 stable #9

Closed
wants to merge 2 commits into from
Closed

Openbsd71 stable #9

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented May 28, 2022

similar to #3 but adds 7.1 stable

@jacob-carlborg
Copy link
Contributor

jacob-carlborg commented May 28, 2022

I've run the build three times, it fails to SSH to the VM and cannot provision it. Have you built the image locally?

@ghost
Copy link
Author

ghost commented May 28, 2022

i cant figure out how to run the build on fedora. the cocoa display type isnt valid and if i change it to gtk then i get an error about missing bios in the resources dir. the readme wasnt clear on prereqs or other assumptions needed to run it.

can i get some help with this please? 6.9 isnt supported upstream anymore.

@jacob-carlborg
Copy link
Contributor

the cocoa display type isnt valid and if i change it to gtk

I've updated the readme to mention that the display variable needs to be overridden on non-macOS platforms.

then i get an error about missing bios in the resources dir

On Fedora, you need to install edk2-ovmf package. Then copy the installed OVMF.fd file (wherever it's located) to resources/ovmf.fd. I've updated the readme for this as well [1].

[1] https://github.com/cross-platform-actions/openbsd-builder/#uefi-firmware

@jacob-carlborg
Copy link
Contributor

I tried running this locally and the problem is that the dhclient command is not available, which is used before starting the installation:

"dhclient em0<enter><wait>",
. I'll see if I can find an alternative, or if you're more familiar with OpenBSD and know of another way.

@ghost
Copy link
Author

ghost commented May 29, 2022

it look to also fail on S prior to dhclient, and ftp afterwards. i tried with the 6.9 miniroot.img and i dont think its openbsd specific. maybe a change in the bios or something used by packer and its not actually loading the img before trying to do anything. but i dont know much about packer. as far as i can tell its stuck in the efi shell, not interacting with the os boot process at all, which may be why no commands work.

i tried to switch to using an iso instead (arm64 doesnt have an iso) and this also didnt work for me. i also checked a manual install vm and /sbin/dhclient does exist.

@jacob-carlborg
Copy link
Contributor

it look to also fail on S prior to dhclient

Not for me.

i tried with the 6.9 miniroot.img and i dont think its openbsd specific. maybe a change in the bios or something used by packer and its not actually loading the img before trying to do anything. but i dont know much about packer. as far as i can tell its stuck in the efi shell, not interacting with the os boot process at all, which may be why no commands work.

Oh, perhaps you have a newer version of the UEFI firmware, or something like that.

i also checked a manual install vm and /sbin/dhclient does exist.

No, not in the shell which is available before installing:

Screen Shot 2022-05-30 at 07 33 24

I found out that these two commands work instead of dhclient:

"ifconfig em0 group dhcp<enter><wait>",
"ifconfig em0 inet autoconf<enter><wait>",

But these commands don't work for 6.9, so Packer need to somehow look at the current version and pick the right commands. Also after installing using these two commands it fails to SSH to the VM to do the final provisioning. I found this other Packer configuration file which installs OpenBSD 7.x [1], which might be of help.

[1] https://github.com/lavabit/robox/blob/dca342014f8bfd2d4e710eeafe7ebbe1f6163d70/generic-libvirt.json#L5491

@ghost
Copy link
Author

ghost commented May 30, 2022

given openbsd doesnt really support anything but the newest release is it fine to just drop the old versions and keep things current here? might make troubleshooting easier keeping everything updated

uname -r should get you the version (6.9, 7.1, etc) and could be used for a conditional.

@jacob-carlborg
Copy link
Contributor

I've tried building the image locally and installing OpenBSD works, but when it reboots it cannot boot, it hangs here:
Screen Shot 2022-06-03 at 20 40 46

@jacob-carlborg
Copy link
Contributor

This is now fixed: https://github.com/cross-platform-actions/openbsd-builder/releases/tag/v0.3.0. I'll update the GitHub action shortly.

@ghost
Copy link
Author

ghost commented Jun 9, 2022

what ended up being the fix for this? seems like there was a similar commit but not sure how it worked different.

@ghost ghost deleted the openbsd71-stable branch June 9, 2022 13:27
@jacob-carlborg
Copy link
Contributor

what ended up being the fix for this? seems like there was a similar commit but not sure how it worked different.

@portno12 right, forgot to mention that here. I split up the changes across multiple commits. The main thing that solved the problem was to update to a later version of the UEFI firmware: 6670ab9. When the firmware was updated it also required to change the disk devices: 26a9177. To support both OpenBSD 7.x and 6.x, I extracted the DHCP boot commands to a variable: d5de77e.

@jacob-carlborg
Copy link
Contributor

I apologize for the delay, but I created a new release of the GitHub action now: https://github.com/cross-platform-actions/action/releases/tag/v0.6.0. You need to update to 0.6.0 to use OpenBSD 7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant