04-11-2020, 01:04 PM
(04-11-2020, 09:37 AM)ab1jx Wrote: Well, a Raspberry doesn't have kexec, i can tell you that. I need to fire up my PBP and look for it. A Raspberry 3B is my everyday machine lately. Nope, on the PBP I can't find kexec, by apropos or locate, or in Synaptic. Should I try github?
kexec(8) is a wrapper around the kexec kernel functions kexec_load (2) and kexec_file_load (2). You already found the man-pages on your machines. As you stated you want to write a C program then that's all you need. That is a great learning experience. kexec (8) is a simple command-line tool saving you a lot of time, though. On debian kexec (8) is part of the kexec-tools package. I don't know about github, but assume you will find the project website, or at least the source code, somewhere in the Internet as well
~$ apt-file search /sbin/kexec
kexec-tools: /sbin/kexec
The possibilities are endless: instead of re-implementing kboot, you can also try to make it or petiteboot work on your machine. You can also check out manawyrm's mysterious twitter link and learn about tsys's bootloader.
(04-11-2020, 09:37 AM)ab1jx Wrote: But really, you could boot from the standard eMMC then run whatever scripts to boot a partition on the SSD. (seems like)
Yes, if you mean with script a call to kexec (8).