RAMDISK OS? Installing Windows 10 on a ramdisk

50,751

Solution 1

Your idea (as cool as it is) unfortunately won't work in practice:

  1. The RAM disk would be wiped whenever you turn your PC off, reboot it, or if you lose power.

  2. 16 GB is not enough RAM. Don't forget you need to keep some RAM aside to use as, you know, regular RAM. So at best you might be able to do a 12 GB RAM disk. Well, 12 GB doesn't meet Windows 10's minimum free hard drive space requirement.

  3. Software-based RAM disks actually run on top of an already installed operating system. What you'd need is a way to create a RAM disk at a hardware level, so that Windows actually thinks it's talking to a real IDE/SATA/SCSI hard drive. That would require purchasing a special RAM disk card (for example, this). Incidentally, this would also solve problems 1 and 2, but the cost is insane.

So yeah, you need an SSD ;-)

Solution 2

Yes you can and 16G RAM are more than enough

  • Shrink the size of any windows iso using tools like ntlite or winreducer
  • Feed the output wim in to NtSetup
  • Boot the output VHD and configure your Windows - add firadisk driver
  • Mount the VHD from your normal OS and capture it with wimlib
  • Apply the output wim to a new VHD using the compact=lzx switch
  • Use grub4dos to map that VHD in RAM and boot it

That's a rough sketch of the procedure, it's a lot more complicated than it sounds but it can be done. I'm using a 1.2G Windows 10 VHD booted from RAM right now. Windows 10 support LZX compression on the fly. Windows 7 too but with the help of wofadk.sys.

If you're still interested ask for details.

Solution 3

Is it possible to put the entire operating system on a ram disk?

From some googling for "Windows bootable ramdisk" there are apparently ways to do it. I haven't tested them myself though.

You could also use a virtualisation platform to run a windows VM with a ramdrive as a backing store.

If I have 16 GB of RAM and it is an Intel Xeon.

16GB really isn't very much once you start talking installing software on ramdisks.

I don't have an SSD and my hard drive is killing my boot time. So can I just allocate some of my ram to work as if it were an SSD and install windows and vital software on it, to gain super fast speed.

The big problem here is that ramdisks are volatile. So even if you can get windows to run from a ramdrive and even if you have enough memory to run something that's not a crazy stripped down install, every time you do a cold boot you would have to re-copy stuff from your hard drive to the ram drive. If your goal is to reduce boot times that renders ramdrives fairly pointless.

Or is it more trouble then its worth and would be better off just buying an SSD?

Yes you would be much better off just buying a SSD.

Solution 4

After booting, copy a directory to the ramdisk and use symbolic links to make that transparent to the OS.

But really, the OS already caches the disk using available ram.

No matter what, it won't help boot time, since the files are not copied to ram until after it boots, and you'll spend more time copying them.

The "live CD" of Linux systems often work using a ramdisk. But you wait for the compressed image to be read into ram, slowing boot time.

Compression...hmmm... if you have a fast Xeon but a slow disk, you could compress the drive and have less data to read from the disk.

Win10 should have fast-boot image caching though, so between that and defragmenting the disk your boot speed should be OK.

How slow is the boot speed you're complaining about?

Solution 5

You can use grub to create a ramdisk then load a vhd image into it and boot it.
Then you can save the image to disk before shutdown saving your work. It does indeed work with windows 10 and does have a point over sshd because it reduces the write cycles to the drive, and ram is much faster than sshd. Minimum size you can make windows 10 up and running is 3.9 g stripping everything out you do not need.

Share:
50,751

Related videos on Youtube

James Smith
Author by

James Smith

Updated on September 18, 2022

Comments

  • James Smith
    James Smith over 1 year

    Is it possible to put the entire operating system on a ram disk? If I have 16 GB of RAM and it is an Intel Xeon. I don't have an SSD and my hard drive is killing my boot time. So can I just allocate some of my ram to work as if it were an SSD and install windows and vital software on it, to gain super fast speed. Or is it more trouble then its worth and would be better off just buying an SSD?

    • misha256
      misha256 over 8 years
      Right... and what will you do when the power goes out or you need to turn the PC off?
    • Keltari
      Keltari over 8 years
      They did make hardware ramdisks, but they generally arent worthwhile
    • misha256
      misha256 over 8 years
      @Keltari Too true, they did make them, and then SSDs crashed the party. Folks who want even more performance than a single SSD can muster, simply RAID-up multiple SSDs at still far less cost than a hardware RAMDISK. There may still be esoteric scenarios where RAMDISKs make sense today. But the cost... the cost is just insane.
    • gmatht
      gmatht over 8 years
      SSD is the way to go. However if you want a quick play with an OS on a ramdisk, you could use the toram option that many Linux Boot CDs (e.g. Ubuntu and DSL) support. This could confirm that e.g. toram doesn't speed up boot (it would probably feel fast after boot though).
    • Ruslan
      Ruslan over 8 years
      @gmatht it doesn't speed up boot just because it needs to load "toram" from initial drive.
    • MSalters
      MSalters over 8 years
      Remember that the file cache already copies the components which you actually use into RAM. Your Ram Disk idea would also copy unneeded parts into RAM, and duplicate the parts which are in use (as the Windows file cache in RAM would still cache the Ram Disk). So you'd end up with approximately 16 GB of Windows components in RAM which are either unused or duplicated, and need 32 GB in total. And that's on top of misha256's comment about power loss.
    • gmatht
      gmatht over 8 years
      @Ruslan exactly. In principle it could be faster because it would load data sequentially, but just letting the filecache do its job is better in practive. In windows SuperFetch should actively preload the stuff you need anyway. The toram option is mostly useful if you want to remove the CD.
    • qasdfdsaq
      qasdfdsaq over 8 years
      It is more trouble then its worth and you would be better off just buying an SSD. However, with the advent of memristors and hybrid (persistent) RAM, this question may not seem quite so absurd 5 years from now.
    • Rolf
      Rolf about 6 years
      Linux does that!
    • Sir Adelaide
      Sir Adelaide about 5 years
      Maybe the solution is to not boot. Just use sleep and you'll never see the boot screen.
  • user253751
    user253751 over 8 years
    Clearly this is why Windows sucks - I bet Linux could run off a ramdisk! (/s, partially)
  • Miguel Fernando Macías Macías
    Miguel Fernando Macías Macías over 8 years
    I'd imagine there might also be some problems with Windows rebooting during installation. That's if you get that far.
  • hmp
    hmp over 8 years
    I remember people copying Windows 95 to a ramdisk during the boot process. I guess it was possible because it booted on top of MS-DOS back then.
  • Mark
    Mark over 8 years
    @user20574, been there, done that. Netboot to an initrd, create a tmpfs, copy /usr there and finish booting. It's a neat trick, but you're better off mounting a network filesystem and just letting the disk-cache subsystem manage things.
  • MSalters
    MSalters over 8 years
    @user20574: You kid, but that's actually how Linux boots normally! The particular piece of code is known as initrd - "Initial Ram Disk". This bit solves the chicken-and-egg problem of loading the drivers to speak to all kind of disk controllers. You don't need drivers to talk to RAM. And the contents of the Ram Disk are loaded alongside the kernel itself. Yes, this is warped - loading files from that Ram Disk copies data from RAM to RAM - but it's a convenient hack and fast enough in practice. (until systemd, initrd wasn't the bottleneck anyway)
  • CodeMouse92
    CodeMouse92 over 8 years
    FWIW, Puppy Linux is an OS that boots from a flash drive and runs entirely on RAM.
  • James Smith
    James Smith over 8 years
    I ended up buying the WD Black 2 which is a 1 terabyte Solid state.
  • James Smith
    James Smith over 8 years
    @JasonMc92 I feel Puppy Linux was more designed for older computers or just for people wanting to be able to carry a portable OS with them. I wouldn't want to boot from a flash drive everytime I turn my computer on because the read speeds of my flash drive would limit my start up time. Also I really prefer windows. I ended buying a SSD though.
  • James Smith
    James Smith over 8 years
    I found out that my boot time was slow because my hard drive was wearing out. I ended up buying an SSD and it worked wonders. I guess my hard drive was really limiting my computers performance. Now everything is insanely fast. I installed windows and all my crtitical software directly on the SSD
  • stiv
    stiv over 7 years
    Windows has VHD to make tricks like that.
  • Jamie Hanrahan
    Jamie Hanrahan about 7 years
    @MSalters "You don't need drivers to talk to RAM. " Not if you're treating the RAM as RAM, no. But if you want to treat a chunk of RAM as a disk, yes you do need a driver, one that looks like a disk driver at its upper edge.
  • themihai
    themihai over 6 years
    @JamesSmith Linux is just a more efficient OS and is designed to work on all kind of computers new and old even super computers. Windows is just a pile of sh*** efficiency wise. And yeah, you can run linux on RAM just fine.
  • Rolf
    Rolf about 6 years
    How do you get Windows 10 down to 3.9g? I really want to know.
  • masterxilo
    masterxilo over 5 years
    "every time you do a cold boot you would have to re-copy stuff from your hard drive to the ram drive. If your goal is to reduce boot times that renders ramdrives fairly pointless." A ram disk has 0 seek time, so even when you copy everything at one go sequentially first the ramdisk might then be faster at providing the random files that are actually needed. Depends on how much time is lost seeking versus how much of the data is accessed during boot...
  • phuclv
    phuclv about 5 years
    @user20574 there are tons of boot disks in the past like Hiren's where win PE or win XP is booted from a RAM disk
  • dim
    dim about 5 years
    This is obsolete. There's wimboot now reboot.pro/topic/…