Score:0

How to do a fresh install on every boot

st flag

I want my servers to come up cleanly on each boot rather than having state which persists across boots. Short of PXE-booting, is there any way to do this? In particular, I’m curious if live-CDs do something similar (writes don’t persist—perhaps they use an in-memory filesystem)?

guiverc avatar
cn flag
Be aware that *daily* liveCDs are re-built *daily* for testing purposes; ie. there is no need to perform updates as they'll get caught during the next build of the *daily* image (be it *focal* or what will become 20.04.4, *jammy* etc; also note: *daily* is a term that more accurately refers to interval in my opinion; as dailies can be built multiple times per day; or once a week depending on issues or time in the *development* cycle). If you use a *stable* or static released daily then your boot will not have security fixes applied.
N0rbert avatar
zw flag
It is [LTSP](https://ltsp.org/), do not invent it by yourself.
st flag
@N0rbert LTSP seems to depend on PXE, which isn’t something I want to bite off right now (I don’t think my router supports it and I’d like to not have to learn DD-WRT at the moment).
N0rbert avatar
zw flag
PXE does not need special router. You setup LTSP server and PXE boot in client devices.
st flag
I need to read up more then. Everything I read suggested I at least needed to be able to twiddle DHCP settings (presumably to tell clients where to find the PXE server).
Score:2
ng flag

"I’m curious if live-CDs do something similar"

Yes that's exactly what they do. The live session is loaded into RAM and changes do not persist after a reboot.

You can accomplish what you are asking with a liveCD, but you can also use a USB flash drive with installation media. Just choose the "Try Ubuntu" option.

us flag
In my experience the Live ISO for Ubuntu *Server* always forces you to install the system (at least in more recent Ubuntu versions) without letting you try out the OS (like the Desktop version). Am I missing something?
Score:0
cn flag

Here's something I have used in the past: The overlayroot package in the Ubuntu repositories.

Description: use an overlayfs on top of a read-only root filesystem This package adds functionality to an initramfs built by initramfs-tools. When installed and configured, the initramfs will mount an overlayfs filesystem on top of a read-only root volume. . The changes can be written to a in-memory temporary filesystem, a filesystem on an existing block device, or a dmcrypt encrypted block device.

In other words,

  • The booted system (/) is read-only, like a LiveUSB's "Try Ubuntu" environment. Changes can be made, but those changes are on the overlayfs, and do not persist across a reboot.

  • For editable data, store the data on a different partition. A different partition can be mounted read/write, so those changes do persist across reboots.

  • When time comes to tweak or update the system, a GRUB command will mount the system read-write. You set up your system exactly way you want it to boot every time, then just turn overlayroot back on and reboot.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.