1

I'm looking to create a setup where an OS image is (automatically) downloaded over the network and then booted into. The obvious way would be to write it to disk, reconfigure grub (or whatever) and reboot, but I'm looking for a way to do this without any disk writes at all. The disk would only be used to read the fixed initial image, responsible for downloading the real image and everything after that would run purely from a RAMdisk.

After a real reboot (like a shutdown command or disconnected power), I would expect the device to boot back into the initial disk image, which would again start from scratch by downloading the real image, etc.

I've heard of netboot for diskless setups, but it seems not appropriate for my use case as I need a full Linux userland running for downloading the image (I want to have the option to download over WiFi, use gpg to verify signatures, etc. which is not feasible from bootloader).

I've also looked into kexec, but I'm not sure how it could be used to load a full bootable image.

1
  • kexec lets you load both a kernel and an initrd...so it does pretty much what a bootloader does. Seems like that is exactly what you're asking for? I don't know if it will work with a kernel/initrd loaded from a ramdisk; I guess the best thing to do is just try it. Commented Mar 17, 2024 at 0:33

1 Answer 1

0

Various Linux distros have supported this for years using doram, toram, copytoram and various other similarly looking keywords (bootloader options).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.