0

I've been playing with Linux for a while, and I'm wondering if the following is possible:

1: in the boot startup script, run commands to make a ramdisk as in this other post: How do I make a RAM disk?

2: move all of the files in the / directory on a regular drive into said folder.

3: mount that directory as / and boot from it.

Because RAM is volatile, I could set up a rsync session that runs at startup and copies files to that original / directory every minute or so and before shutdown. The real question is if this would work. In my case, i have plenty of RAM overhead with 56Gb. The reason I want this is that my desktop is actually a discontinued HP dl580 G5 server, and has very slow drives. if it doesn't work, I have a way where I've been booting from a regular drive and installing / on a USB 3 SSD, but this isn't ideal.

Matanya
  • 382

2 Answers2

1

Basically, no. You can't install the system to RAM, because, as you noted, it is volatile. You could theoretically make a ramdisk large enough to hold all of /, but it is meant to be temporary, and you still have to store it on disk, and have it read from disk at boot. The initial ramdisk is meant to be small and temporary, to speed up the boot process.

Also, you'd run out of RAM very fast. I'm sure you have way more disk available than RAM in such a machine. The machine also either has SAS or SATA, so it should be pretty fast as far as general write accesses go.

dobey
  • 41,650
0

I think I found a way to do this because it's been done before. I was just googling if anyone had done it before and I found this: http://dreamlayers.blogspot.com/2012/10/running-linux-from-ram.html

This looks like it works, but it's kind of hard to understand. If somebody could explain this better it would be great, especially the beginning setup. Thanks!

Matanya
  • 382