On Wed, Sep 18, 2024, 2:47 PM ron minnich <rminnich@gmail.com> wrote:
I noticed there are kexec talks this year at Linux Plumbers. Kexec, kernel boots kernel, has had a 25 year gestation in Linux, but it looks like it's finally coming together, driven by need.

Yes. LinuxBoot is fun... trick can be to slim the kernel + inird down enough to fit in the NOR flash so it can be the second stage payload rather than UEFI... i hacked FreeBSD's boot loader to be a Linux binary and use kexec.

Thereby hangs a tale.

in 1977, I was working at udel with Ed Szurkowski, the first sysadmin of the Unix systems we got in 1976 (first machine was an 11/70). Ed was a gifted engineer and did all kinds of neat work on v6. He later went to the Labs once he got his PhD and I lost track of him.

Ed got tired of watching the bootstrap slowness, and wrote a system call that did the following:
1. load kernel in memory from system call argument
2. put special signature in low memory telling bootstrap "look in memory"
3. reboot via reset.

Now, this works, because back then, ROM boot code did not zero memory. Memory was unchanged across reset. So the bootstrap could find the magic bits and start the kernel.

I've lost the code, I carried the listings for decades but finally dumped them. A shame.

I saw similar code that would jump to location 0 to do the reset...  it formed the basis of an interview question i used for two decades.. 

But I'm wondering: is Ed's work in 1977 the first "kernel boots kernel" or was there something before?

I've seen references to older mainframe systems doing that, but my quick searches can't find a references to this, apart from the Chain command in BASIC.

Warner