heads icon indicating copy to clipboard operation
heads copied to clipboard

openbsd and heads

Open ghost opened this issue 4 years ago • 30 comments

EDIT: Can Heads kexec into BSD?


original: ping @tlaurion Has anyone every gotten OpenBSD with FDE to work with heads?

ghost avatar Mar 17 '20 13:03 ghost

@0rb677 look in closed issues. I think someone did?

tlaurion avatar Mar 17 '20 13:03 tlaurion

Current blocker is newer cryptsetup to support newer LUKS2 format, else I think kexec is able to boot kernel and initrd while really unsure.

Edit: really not sure!. No issue in the past sorry for having been misleading on this. It was an issue you opened and closed it because you were able to boot guix finally.

tlaurion avatar Mar 17 '20 13:03 tlaurion

@tlaurion how to force boot full encryption disk with heads? i need modify /etc/config ? thats all? heads can't boot FDE /w boot

sda                         disk
|__sda1                  part
|______cryptroot    /

ghost avatar Apr 19 '20 16:04 ghost

Full disk encryption does not fit into the concept of heads.

You choose either one of these two. Changes of files in /boot are detected by heads though, so the only disadvantage of choosing heads instead of full disk encryption is minor information leakage (what kernel is in use or similiar).

alex-nitrokey avatar Apr 21 '20 09:04 alex-nitrokey

Thanks @alex-nitrokey :)

ghost avatar May 03 '20 12:05 ghost

This actually interests me as well. I hope this will be possible in the future too. I am no huge hurry, but it would be cool to see in the future when I get my Nitropad.

FrostKnight avatar Mar 02 '21 16:03 FrostKnight

@FrostKnight @0rb677 : OpenBSD kexec'ing from Linux possible? Answer is no.

You could have it under QubesOS though.

tlaurion avatar Mar 02 '21 17:03 tlaurion

If that answers whys not, please close the issue.

tlaurion avatar Mar 02 '21 18:03 tlaurion

I don't completely understand, but then I don't really know what kexec means... maybe I should look it up. That being said, Hyperbola plans to move to HyperbolaBSD which will be based on OpenBSD but have many changes to it that are more libre. Is there anything that the Hyperbola devs could do that would make it possible to use heads to boot HyperbolaBSD?

FrostKnight avatar Mar 02 '21 20:03 FrostKnight

kexec is a tool to start/change into another linux kernel, thus not for windows, not for BSD or any other non-linux system. This is nothing that is going to be changed by BSD developers and probably nobody else (at least any time soon).

techge avatar Mar 03 '21 08:03 techge

Well... not what one expects if they are talking about "booting into Windows", but nice anyway... in a way...

techge avatar Mar 03 '21 08:03 techge

Okay, but are you aware that Hyperbola devs currently have a linux version and are switching to a bsd version derivative in say 2024 or something like that... They did that because they see a better future for security/privacy in making a liberated hard fork of OpenBSD. They used to work on Parabola GNU/Linux-Libre then they made their own linux forked version of arch with debian patches for stability and in the future they plan to do an OpenBSD hard fork... I tell you all this, because I am not sure your aware, that they are not like the devs at normal bsd derivatives.

Unless you mean this is completely impossible to do, in which case, I will shut up if you want.

Although, it might not a pressing issue in the near future, and maybe at some point I will have acquired newer hardware that won't be intel anyways. So,I apologize for wasting your time.

FrostKnight avatar Mar 03 '21 23:03 FrostKnight

@FrostKnight searched around, and personally hve no idea how linux could kexec into a bsd kernel.

tlaurion avatar Mar 16 '21 04:03 tlaurion

I mean, I wouldnt know either, but it could be possible if the person developing the bsd, has less bsd mentality and more of say a fusion type thought process.
Curious, but is the thing that is blocking this idea on the end of heads, or the end of BSD or both? Not expecting you guys to do anything, besides hopefully reply.

I just wondered if this is something that could be fixed if the BSD developer decided to change things ever so slightly.

You said this was the issue way back, https://github.com/osresearch/heads/issues/697#issuecomment-600069051

I wondered, if that is easy to fix or if its something that is much harder then I realize.

Aka, if its a gpl rejection issue, or something more problematic.

Hyperbola devs don't have a problem with GPL or other copyleft licenses. :)

Thanks for checking around though. I appreciate it.

FrostKnight avatar Mar 16 '21 18:03 FrostKnight

FrostKing: Sounds like the issue is that Heads is not just a bootloader. It's not a drop-in substitute for BIOS/MBR or UEFI/GPT that another OS would expect to see. It provides a Linux-specific set of drivers and is, in fact, Linux.

On Tue, Mar 16, 2021 at 1:39 PM FrostKnight @.***> wrote:

I mean, I wouldnt know either, but it could be possible if the person developing the bsd, has less bsd mentality and more of say a fusion type thought process. Curious, but is the thing that is blocking this idea on the end of heads, or the end of BSD or both? Not expecting you guys to do anything, besides hopefully reply.

I just wondered if this is something that could be fixed if the BSD developer decided to change things ever so slightly.

You said this was the issue way back, #697 (comment) https://github.com/osresearch/heads/issues/697#issuecomment-600069051

I wondered, if that is easy to fix or if its something that is much harder then I realize.

Aka, if its a gpl rejection issue, or something more problematic.

Hyperbola devs don't have a problem with GPL or other copyleft licenses. :)

Thanks for checking around though. I appreciate it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/osresearch/heads/issues/697#issuecomment-800512402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2LGPMVQLDDJE474RS6YK3TD6QURANCNFSM4LNM3VOA .

LiamDGray avatar Mar 16 '21 19:03 LiamDGray

@FrostKnight If kexec was modified in a way that all memory space is replaced by a BSD kernel, returning into real mode, I do not see why it couldn't be possible.

Kexec is made to put kernel into new address space and switch control to it. That kernel is expected to depend onto its initrd drivers and such to make the switch, which doesn't seem to have been fine between OSes. That would be a kexec project, on which if working, could be integrated into heads. As said previously, I'm not aware of any work happening to switch from a Linux kernel into BSD.

tlaurion avatar Mar 16 '21 21:03 tlaurion

Hmm, interesting, is there a kexec repo that I could talk to regarding this somewhere down the road?

I guess I will check...

FrostKnight avatar Mar 16 '21 23:03 FrostKnight

Is this related to what you mean? https://github.com/kexecboot/kexecboot

FrostKnight avatar Mar 17 '21 00:03 FrostKnight

@FrostKnight: Pretty sure they mean this: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel

kexec is part of the Linux kernel. When they say Heads is Linux, they are not kidding.

On Tue, Mar 16, 2021 at 7:04 PM FrostKnight @.***> wrote:

Is this related to what you mean? https://github.com/kexecboot/kexecboot

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/osresearch/heads/issues/697#issuecomment-800693754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2LGPNW4AJOGPMZTJZHFRDTD7WZ5ANCNFSM4LNM3VOA .

LiamDGray avatar Mar 17 '21 03:03 LiamDGray

Lol, if that's the case, then nothing will change for a very, very long time if at all even. :(

Oh well, thanks for letting me know the actual truth in detail. Appreciated that I now understand the actual problem.

I very much doubt Torvaldo is the kind of person you can get to convince that making it possible to boot anything besides linux is possible. I might be wrong, but it seems very unlikely. Smh... :P ---> Me

Oh well... I will just wait for the foreseeable future to see what shows up/If I even will care by 2025. ARM and RISC-V are growing in popularity, who knows if one of those won't catch my interest by the time this laptop is no longer used for Hyperbola. And that aside, there is also osboot if I am that desperate to use HyperbolaBSD. ;)

FrostKnight avatar Mar 17 '21 03:03 FrostKnight

@FrostKnight @LiamDGray

kexec is a tool aimed at replacing a live kernel with another, permitting to 'reboot' machines without hitting the reset button.

BSD and Linux have their kexec functions inside both of their kernel implementations.

The problem here is that those kernels are not made to be interchangeable without a lot of research and development. From my understanding, from both within the kernel kexec implementation and from the toolset that calls the loading of replacement kernel, in both space, while not having searched deeply the subject myself.

Never said it was impossible. See prior comment here.

There are projects for kexec loading BSD kernels from within BSD. The interest here being to boot BSD from Linux as of now. This is not existing. As usual if kernel people of both universes were talking on kexec space, magic could happen. Its an interesting concept, where BSD people wanting to use Heads to boot inside of BSD without using QubesOS is not CURRENTLY possible without development from those communities.

Hope this is clearer.

tlaurion avatar Mar 17 '21 21:03 tlaurion

Yeah, it is more clear, I will ask my Hyperbola buddies, much later, like 2023 or something if they can get involved in this. For now though, I don't see a big need. If that makes sense. Given that, Hyperbola's linux version will be supported till 2025 and its BSD version won't be as good as I want it to be till 2025+

Glad to know it isn't impossible though. I wonder where I can find such projects...

Either way, I will ponder this issue later.

Thanks for the info though!

FrostKnight avatar Mar 25 '21 20:03 FrostKnight

Petitboot does it?

"Petitboot is an operating system bootloader based on Linux kexec. It can load any operating system image that supports the Linux kexec re-boot mechanism like Linux and FreeBSD. "

tlaurion avatar Sep 24 '21 15:09 tlaurion

I guess I will wait and see... for now.

FrostKnight avatar Sep 25 '21 00:09 FrostKnight

It is possible to kexec to BSD from Linux.

tlaurion avatar Oct 08 '21 22:10 tlaurion

So it is possible to kexec to OpenBSD from heads?

FrostKnight avatar Oct 08 '21 22:10 FrostKnight

@FrostKnight it SHOULD be possible. question is how.

tlaurion avatar Oct 09 '21 20:10 tlaurion

I wish I knew heh... I am not experienced enough with OpenBSD to do this, but I will be nearby in case, someone knows how, etc...

FrostKnight avatar Oct 09 '21 21:10 FrostKnight