Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Where exactly are they saved? In memory? Is there any way to recover them once you log out and shut down the PC?
I'm not trying to recover anything, I'm just genuinely curious.
generally they are saved in memory (and therefore lost after shutdown), however I know that some LiveCD's have the option of storing them on a flash drive, or the hard-drive, though that would probably require extra configuration. It is also possible to use a Live-USB flash drive, which can save files to the flash drive.
Depends on a few things but yes the answer is they usually lost, but not always. Most live cd's cheat the system. The makers of them found a way to use both the cd and some part of your ram to act like a hard drive. It seems to let you save files but since it is ram it gets lost.
This assumes you have a distro that doesn't have a save or scratch disk. Some distro's offer you a way to save those files to hard drive or usb or floppy or even on the cd you booted to.
The files could be on the swap file or partition in some cases also. That area is possible to access if you have it on a hard drive or even flash drive.
Normally, you would NOT save anything to the CD---once the iso is burned to it, it's read-only.
A Live Linux session uses a "ramdisk"---a section of RAM that appears to the system like a normal read-write disk. At least part of the "root" filesystem is put on this ramdisk. Once you are running, you can mount a flash drive or external USB or SATA drive, and save files there.
Normally, you would NOT save anything to the CD---once the iso is burned to it, it's read-only.
In fact, there are (were?) some live-CDs that could write to a RW or a multisession CD.
Quote:
A Live Linux session uses a "ramdisk"---a section of RAM that appears to the system like a normal read-write disk. At least part of the "root" filesystem is put on this ramdisk.
To make this a bit more complete, usually it is not a static RAM-disk but a tmpfs that is mounted on top of the root filesystem (which nowadays usually resides in a SquashFS container on the CD) using AUFS or OverlayFS. All changes (new files, changes in files, the deletion of files and changes in the meta-data) are saved on the tmpfs, totally transparent for the user.
Quote:
Once you are running, you can mount a flash drive or external USB or SATA drive, and save files there.
Some distros, like Puppy or the ones that support persistence can do this on the fly without user interaction.
Either it's saved to tmpfs (RAM), which means it's lost when you power off, or it's saved to persistent storage either on a multi-session CD-RW or a USB drive.
Another perspective: If you want to save files, then install Linux. Live CDs are for tryout, system troubleshooting/repair, etc.
Another use for live cd's which would warrant data persistence is to have a portable system which can be accessed using multiple hardware systems. That way the user could be sure that the applications they needed were available. I admit that such a use case would probably be rare, but I can see someone wanting to do that. Although I would recommend a Live-USB in that case.
Another use for live cd's which would warrant data persistence is to have a portable system which can be accessed using multiple hardware systems. That way the user could be sure that the applications they needed were available. I admit that such a use case would probably be rare, but I can see someone wanting to do that. Although I would recommend a Live-USB in that case.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,647
Rep:
Use a USB drive! Mount it with your Live CD and save anything you want to it. Isn't that how you'd recover all the pictures, music, videos, etc, on a BSOD Windows system? I've done it a few times and amazed the Windows user who thought they'd lost all their valuable stuff after some High Street PC companies were unable to recover it.
This is a very generic question posed by the OP. We really can say the exact answer. Can we know the live cd?
Any of a few ways could allow one to save data off either by direction or by accident. I'd think that only a secure by design would block any of the accidental means. The very best security live cd would prevent any sort of mount.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,647
Rep:
@jefro
Quote:
The very best security live cd would prevent any sort of mount.
Surely the purpose of a Live CD is a) as a taster for the particular distribution and b) as a recovery tool, hence it should allow external devices, i.e. USB drives, DVD burners, etc, to be mounted? A Live CD which didn't allow you to do anything usefull is pretty pointless otherwise.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.