4

I've learned from this post that it is possible to boot a live usb without persistence entirely into ram. This is done by adding the toram boot parameter as explained in that post.

If we instead have a live usb with persistence enabled (i.e. through a casper read-write overlay filesystem on the usb or the like), is it still possible to fully boot into ram, allowing me to remove the usb drive? It seems that adding the toram parameter only makes the read-only filesystem be copied to ram, but not the persistence overlay filesystem, resulting in I/O errors when removing the usb drive.

chtenb
  • 225
  • I think you are right. I don't know any method to boot Ubuntu's system for persistence (casper-rw file or partition) such that it will be put to RAM during/after the boot process so that you can remove the drive. I can see the advantage, but there would also be a disadvantage: What you do with the drive removed would not persist (unless you re-connect the drive and synchronize). It would be possible, but I have not read about anybody who has made such a system with Ubuntu. There are other linux distros, for example Porteus, that might implement what you want or something similar. – sudodus Nov 05 '17 at 14:13
  • You may be interested in this link (it is a little old, but maybe still useful if you have time to make and tweak a system), https://ubuntuforums.org/showthread.php?t=1594694 – sudodus Jan 15 '18 at 08:44
  • @pomsky Please. I already explained in the OP how my question is different. – chtenb Jan 16 '18 at 07:58
  • Please tell us why you want a persistent live system 'fully to RAM'. There may be alternatives to achieve what you want. For example, would it be an alternative to have the file/partition for persistence in another drive, for example in an internal drive, not in the same drive as the booted system? Or would you want a custom iso file with some extra program package installed ? – sudodus Jan 16 '18 at 14:25
  • Yeah, using persistence you would be able to extend (and update/upgrade) the system. – chtenb Jan 16 '18 at 14:58
  • Yes, but why is it important to be able to remove the disk (with the persistent live system)? Would it be an option to split the system in the basic live system (which can be put to RAM) in one drive (for example a USB pendrive or memory card) and the file/partition for persistence (which is not so easy to put to RAM) in another drive (internal or external)? – sudodus Jan 16 '18 at 17:33
  • 1
    "Yes, but why is it important to be able to remove the disk (with the persistent live system)?" Mostly for performance actually. I find that my system stalls periodically when doing I/O to the drive. – chtenb Jan 16 '18 at 19:56
  • If you have the file or partition for persistence (named/labeled 'casper-rw') in an SSD (internal or via USB 3 or eSATA), it will be accessed rapidly. A fast USB 3 pendrive is also a good alternative (fairly fast). See this link, https://help.ubuntu.com/community/Installation/FromUSBStick#Notes_about_speed and links from it. – sudodus Jan 16 '18 at 20:00
  • this is an old thread, but just out of curiosity, isn't it possible to just unmount the persistence mount point? – pzkpfw Feb 04 '24 at 22:07

2 Answers2

3

No, that's not possible. The persistent file system (overlay) is supposed to be writeable which would fail once you remove the underlying storage medium.

If you only want to use it in read-only mode, it's theoretically possible but I doubt that anybody considered this a relevant enough use case to warrant a simple setting switch. Some assembly required.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • "The persistent file system (overlay) is supposed to be writeable which would fail once you remove the underlying storage medium." A writeable ramdisk could be created perhaps? – chtenb Jan 16 '18 at 14:15
  • @ChieltenBrinke: By extension, yes. It's possible to copy the overlay filesystem into RAM, mount it over the original filesystem in read-only mode and then put another writeable in-memory overlay filesystem on top of it. – David Foerster Jan 16 '18 at 16:02
0

You might be interested in "Bionic Dog" or "upupBionicBeaver".
more info here
It is a fork of DebianDog, but based on Ubuntu structure.
All Ubuntu commands are valid. Ubuntu repositories accessible. Great community.
It has option to boot totally in RAM.

Vineet
  • 1,025
  • 3
  • 12
  • 23