top | item 20234353

(no title)

puppetmaster | 6 years ago

Many OS out there take advantage of RAM Disks. Alpine Linux for instance allows you to boot your root device on ram as a default. SmartOS runs a boot image completely on RAM, and keeps your storage free for a few configs and VMS.

Virtually all network booted computers run their OSs from RAM. If you have never pxe booted a machine, it is a beautiful experience once you overcome a few challenges: easy upgrades and rollbacks, being able to use a machine with different contexts/platforms by just rebooting, and having your servers cleaned up just by cycling (assuming you don't have local storage)

If you enjoy the idea of RAM root devices, please try pxe/ipxe to boot your computer from a network. Also, if you have a sufficiently fast network... it is probably faster than booting from disk!

EDIT: I missed the word "all" on the second paragraph, and another typo... sorry!

discuss

order

hazeii|6 years ago

Couldn't agree more, I've got at least a couple of dozen computers (from workstations and thin clients through 486s and Pi's) at home and only the main server and its backup have persistent storage.

Especially useful for Windows; it is rather slower diskless (compared to BSD/linux) but it makes Windows instances disposable.

Takes a bit of effort (more these days, FUVM systemd) but having a RAMdisk + diskless RO /usr is a great way of having computers everywhere all singing the same song.

wayoutthere|6 years ago

Ditto the love for PXE — booting from a SAN appliance stocked with a few dozen fast SSDs is amazing. When I was doing big VMWare deployments, I had a PXE bootstrap setup that helped me build an entire 40-node cluster from bare metal in an hour.

Even in the event you have to use some secure zone crap, it’s pretty trivial to build since all PXE requires are dhcpd and tfptd — which are often available by default on nearly any *nix variant.

cwt137|6 years ago

PXE boot FTW! I use to work on a project that used LTSP to make a couple dozen thin clients. The thin clients were slow, but the OS was fast. This isn't entirely the OS in RAM as a big chunk of the file system was mounted over the network, but most of the OS was in RAM.

jandrese|6 years ago

Sadly PXE boot of a modern Linux OS is easier said than done. Gone are the days of just handing out the kernel over tftp and providing a NFS root. SystemD gets super cranky and you can't even boot the thing without setting some undocumented flags.

hpcjoe|6 years ago

A little tooting of my own horn here, but nyble[1] allows you to build a ramdisk bootable image and kernel, that you can serve trivially with any http server and iPXE. A related project, tiburon[2] allows you to make this JSON db controlled. Still working on documenting them in greater depth, but you can see an example of what nyble can do[3].

[1] https://github.com/joelandman/nyble

[2] https://github.com/joelandman/tiburon

[3] https://scalability.org/2019/05/nyble-ftw-installing-my-ramb...

marmaduke|6 years ago

What? I just did this today with Ubuntu 18, using dnsmasq and a nfsroot based on a virt-builder image. It runs fine..

ryanmjacobs|6 years ago

I highly recommend using pixiecore as an iPXE server -- your remote machines only need to have PXE enabled. Previously, it was a pain in the ass to install the TFTP server and get a DHCP server capable of not binding to every request (and only PXE requests like the standard allows). pixiecore does everything for you in like 10 seconds: https://github.com/danderson/netboot/tree/master/pixiecore. We're using it on-premise to spin up a server rack into stateless Kubernetes nodes. None of the blades have a hard-drive/ssd :)

naner|6 years ago

PXE booting Linux live media is fairly straight-forward. Grub/syslinux syntax translates pretty easily to iPxe (which is simply a different type of bootloader). You just provide a kernel,a ramdisk, and whatever kernel arguments you need. If you're trying to roll your own ramdisk environment from scratch you may run into trouble but in general network booting Linux isn't any trickier than making a bootable iso.

gmueckl|6 years ago

How did the systemd cabal manage to mess that up? I ditched that thing a while ago for good reasons, so I don't keep track anymore.

mehrdadn|6 years ago

> Also, if you have a sufficiently fast network... it is probably faster than booting from disk!

Is this also true on Windows, with all the hardware initialization it has to do on boot when it finds new hardware?

dekhn|6 years ago

i ran a cluster of 6 nodes in 2001 with (before PXE) network book and NFS root. it was awesome.

agumonkey|6 years ago

Never having finished Home pxe setup is a great sadness of mine.

puppetmaster|6 years ago

Turn that sadness into joy! Even an RPI can host your TFTP and your boot files... Today!

http://ipxe.org/start has all the info you'll need.