Comment on How to Run Custom Linux Images on Oracle Free Tier
InnerScientist@lemmy.world 1 day ago
Can’t you just kexec and be on your way?
Comment on How to Run Custom Linux Images on Oracle Free Tier
InnerScientist@lemmy.world 1 day ago
Can’t you just kexec and be on your way?
starkzarn@infosec.pub 1 day ago
I am not well versed with
kexecbut I always understood it to be a kernel reboot without power cycling the “metal.” Please enlighten us with an example! I don’t see how you’d replace the entire userspace (and possibly filesystem) with simply kexec.InnerScientist@lemmy.world 1 day ago
Kexec can be used to load a new kernel and “reboot” quickly, it can also be used to load a new kernel, an initrd and never touch the disk. Such a system lives completely in ram and allows you to modify the disk in any way you want without breaking you running Linux (which is in ram)
Any distro that has a network boot installer that can be passed to kexec can be installed this way, any that don’t can still kexec any Linux distro and then install any other distro by passing the disk to a VM and installing linux through that.
You can also kexec the netboot.xyz image and get any distro supported there.
starkzarn@infosec.pub 1 day ago
The “gotcha” with Oracle free tier is that you can’t install from arbitrary media, so the typical netboot.xyz or any iPXE workflow is out. No console access, no pre-bootloader access, nothing.
I’ve been fiddling with kexec, but it doesn’t seem like a supported method of loading the lkrn file from netboot…
This is super interesting to me, so by all means, if you have the kung-fu to show how this works I would happily read through that!
InnerScientist@lemmy.world 1 day ago
Yeah I tried just now and it diesn’t seem to be working (anymore?) could’ve sworn that worked.
You can still kexec the installiers directly, I followed the netboot.xyz scripts and got the links they use. Here’s Debian as an example:
From the scripts: deb.debian.org/debian/dists/…/netboot/ looking at the boot config debian-installer/amd64/grub/grub.cfg
so we need to download those two files and take the netboot.xyz cmdline arguments then
and it boots.
also here’s an example for the nixos netboot commands, more on that in the nixos manual: