Live data from Hacker News

Ramroot – Run Arch Linux Entirely from RAM (2017)

ostechnix.com

71–80 of 83 posts

Re: Ramroot – Run Arch Linux Entirely from RAM (2017)

#71

Why would this be useful?

Many reasons, but the ones that come to mind are:

- Testing - quickly deploy a version of an OS and software to a fleet, then reboot into a pristine state or new state.

- Lab cost reduction. No hard drives in most of the fleet. Less power used.

- Consistent version across many test servers. People change things, reboot or power cycle and you are back into the same state.

I've used something like this in production before using NFS diskless. That was a bit messy. For labs, testing, it is great.

Re: Ramroot – Run Arch Linux Entirely from RAM (2017)

#72

It's worth mentioning Tiny Core Linux[1] which runs entirely from RAM as well! It's a wonderful little destro with a small footprint. I boot TCL off of a USB, load it entirely into RAM, and am able to use it as my daily driver. [1]: tinycorelinux.net

I always keep TCL around as an emergency boot environment, Just In Case™.

Re: Ramroot – Run Arch Linux Entirely from RAM (2017)

#74

Earlier quoted context omitted.

One of the big advantages is that you do not need to install file systems on your storage for single purpose servers, which allows your application to run on top of the raw block devices. Databases and similar run much better in this configuration (assuming they support raw block devices), especially if you are running on top of a hypervisor.

Do you know of or could list which databases support raw block devices?

Maybe sqlite? :P

  sqlite3 /dev/sda
(Don't try to hold me responsible if you run that with root)

Re: Ramroot – Run Arch Linux Entirely from RAM (2017)

#76

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 roll…

> 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?

Re: Ramroot – Run Arch Linux Entirely from RAM (2017)

#77

Earlier quoted context omitted.

Do you know of or could list which databases support raw block devices?

Most of your classic closed source RDBMS (e.g. Oracle) had this as an option, no idea if they still do. Some purpose-built cloud databases operate this way because it makes perfect sense in that environment. Many domain specialized databases kernels (e.g. for real-time sensor data models) support or require this. It isn't something I recall seeing in open source but that is probably because it only works if you are d…

Yes, because a database really is just a filesystem. And a filesystem is just a (cranky) database. A database that uses files is like networking through a NAT.

Re: Ramroot – Run Arch Linux Entirely from RAM (2017)

#78
Author here. Awesome to see some interest in my project.

I'm currently working on the next version in my spare time (you'll see it in the dev branch). Improvements include: configuration now done via /etc/ramroot.conf, ability to specify actions taken for other partitions, ability to copy files to any location only when booting from RAM (allowing custom configs and whatnot to be used when in the live environment), new install hook that includes binaries and modules rather than adding them to /etc/mkinitcpio.conf, sudo will no longer be a required package, custom memory requirement settings, and more...

Also, I have gotten this to work on Debian, Ubuntu, and Kali with minor modifications. I plan to include a makefile for installing to these distros but don't plan on packaging for them at this time.

https://github.com/arcmags/ramroot

Re: Ramroot – Run Arch Linux Entirely from RAM (2017)

#79

Surprised no one here has mentioned mfsBSD. It's an unofficial FreeBSD answer to this problem. Works very well for some maintenance tasks, like ensuring a new install's disks are clear of partitions/zpools. I have even booted it's ISO via IPMI over the internet with OpenVPN. https://mfsbsd.vx.sk/

Nowadays, there's "mfslinux" [0] (based on OpenWRT) as well (also by Martin). [0]: https://github.com/mmatuska/mfslinux

Thank you. Wasn't aware of this. Will certainly try it out.

Re: Ramroot – Run Arch Linux Entirely from RAM (2017)

#80

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 roll…

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.

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.
Post reply on HN