I want to dual boot Ubuntu and have it run in RAM. I have used Puppy Linux from live USB stick which ran completely in RAM, but a lot of things didn't work and so I decided to just go with a full system. With Puppy Linux, literally EVERYTHING was in RAM, but now that I want a full Ubuntu install, I only want the Ubuntu system (system files) and not all documents and files (like documents I create, save or download) in RAM. I'd like to get as much speed as possible from Ubuntu, and don't need folders such as documents, downloads, etc. loaded into RAM. I am not technical enough to create a custom Ubuntu image as some have suggested. Is there a way to achieve this?

  • Would running from an SSD be an acceptable solution or do you specifically need it to run in RAM? Apr 1, 2016 at 14:42
  • 2
    What problem are you trying to solve by having the system run entirely in RAM? Also, can you perhaps edit your question to clarify the distinction between "the Ubuntu system" and "all documents and files"? Thanks.
    – user
    Apr 1, 2016 at 15:12
  • You want a full Ubuntu install but at the same time you want it to run from the RAM. This is technically not possible since RAM data is erased everytime you power off.. If you run a live Ubuntu disk, that is a different matter but there is actually no way to do this if you want to perform a full install. Also, as @Michael Kjörling said, it would be useful if you clarified what you mean by "All documents and files". The best thing you can do is run Ubuntu on an SSD, which is pretty fast. Apr 1, 2016 at 15:24
  • I have no idea how to answer this question, but I'm struggling to believe that only the initial kernel can boot out of a ramdisk. While the ramdisk wold need to be stored on a drive somewhere, it seems like ti should be possible to boot a fully functional (albeit immutable) system that runs from a ramdisk.
    – Kirk
    Apr 1, 2016 at 15:45
  • 1
    Your request of "to boot and run in RAM" is not clear. The kernel (once loaded during boot) is always in RAM (except for loadable modules). Do you mean that the root filesystem should also be in RAM? The modern version of ramdisk is ramfs and tmpfs, which can be used for a RAM-resident rootfs aka initramfs. Distros publish such versions as LiveCDs.
    – sawdust
    Apr 1, 2016 at 18:26

2 Answers 2


You could run a Live Ubuntu, which can be made to boot from a USB stick or a hard disk partition, and use a persistent storage partition for your documents. Ubuntu comes with a "Startup Disk Creator" that makes this fairly easy.

This will make the documents you safe to the persistent storage partition survive a reboot, but it will reset the whole rest of your system every time you reboot. So, you can't install updates or new programs and have them survive a reboot.

This strikes me as extremely cumbersome.

However, if that's the way you want to go, you can also customize such a live system, but you'll have to know quite a lot about how Ubuntu works, how it boots, how initial ram drives work etc. Ubuntu has a help page about customizing it's Live environment (see https://help.ubuntu.com/community/LiveCDCustomization). I did this a few years ago for a group of students and even though it worked nicely, I decided it was too much work to repeat the experiment.

It would be interesting to know why you need such a strange setup.

If you're worried about the speed of running a linux system from a hard drive, don't be. Nowadays you can even run Linux over a local network link and never notice your not working on your own machine. You can even run GUI applications over an internet connection (though there the lag is noticeable).

There are a few alternatives you might consider if you're asking out of privacy needs:

A standard Ubuntu Installation comes with a "Guest User" functionality that keeps a guest's home folder in memory, so whenever you log in as a guest user, once you reboot, all the changes he made are lost.

You can encrypt either your home directory or your whole system partition. In fact, you could set it up so your system boots from an USB drive you keep on your keychain and keeps its root file system encrypted on your hard drive.

  • I haven't attempted this in Ubuntu, but some distros now come with tools to make this easy. One example is MX Linux, which has a built-in tool to take your distro as you've customized it to your taste, including application software, and turn it into a live USB with persistence, with just a few mouse clicks. You might be able to install the utility in Ubuntu, you'd need to explore that, but MX is an awesome distro in its own right, with a user experience much like Ubuntu.
    – fixer1234
    Jul 10, 2019 at 6:33
  • never notice your not working on your own machine the reason one would want to boot into RAM is to gain performance, not to not notice it being different from a hard. This article claims that system can boot in 3 seconds, I believe that to be about right time to copy a 400 MiB tar archive into tmpfs and unpack it and something that worths striving for.
    – Klesun
    Jun 5, 2020 at 17:45

Not withstanding the Live CD answers; you may be looking for this:


Called "RAM_booster", I found it while looking for something similar. The author is no longer supporting this, but it's been said on forums to work up to Ubuntu 16.04.

The link to the GitHub repo is: https://github.com/terminator14/RAM_booster

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.