Running entirely from RAM been done on various distros such as Slax, DamnSmallLinux, and newer Ubuntu versions, and since I have 8GB it seems reasonable that I could run many distros entirely from RAM (as long as I select one that has the ability).
I would like to do this with
OpenELEC (or any distro), and with a further complication: I'm a
.NET developer, work and primarily use Windows, which means NTFS and FAT32 are my preferred file systems. Until the day comes if and when Windows can natively read/write ext partitions, this won't change. Ext2fck won't even install in Windows 8, so there's no convincing me of the 'merits' of having drives and partitions in an unreadable format to my daily operation.
There's also things like
extlinux and the like that can load
.iso files into RAM and effectively bootload them. To add icing on the cake, Windows' bootloader will allow me to add these as options in the native Windows boot menu, which I have done for UBCD 5.11, and will even work for virtual file systems like
So, here's my dream:
I want to combine all three into one. I want to take an installed ext2/ext3/ext4 partition, in this case an install of OpenELEC, compress it into an .iso, and create an entry in my boot menu that will either do this directly, or pass it to syslinux or the like that will do the following:
Extract the .iso completely into RAM as an ext2/3/4 partition and boot into that OS in RAM. I'll then mount my NTFS hard drive for the /STORAGE portion of the OpenELEC install with ntfs-3g.
Then, as a bonus, on exit I'd have the system recompress itself to an .iso, and if successful replace the initial .iso thereby persisting my changes across boots (provided the shutdown was successful). It wouldn't have to copy itself from memory, either: it could copy any files/changes it wanted to track (if some were not available) back onto the drive it booted from, if present, then compress that back into an .iso.
Slax, DSL and Ubuntu can boot to RAM and persist changes, so I know it's possible if your OS supports it. I'm wondering if this can be made into a 'works for any distro you want'. Slax saves your changes in an ext directory /slax/changes if it's on an ext partition, or as changes.dat otherwise (for NTFS/FAT32). This solution could work too, I suppose, but would probably require more interaction with the hosted OS to coordinate this than using the .iso.
So, how close can I get?
Are there easy solutions for this already out there? Would I have to write a custom 'SYSLINUX'/'ISOLINUX'/'EXTLINUX'/'VMLINUX? What would be required to make this happen, and if it's possible already how do I get started?