LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-18-2020, 04:30 PM   #1
ACRIzona
Member
 
Registered: Dec 2007
Location: Phoenix
Distribution: iMAC(64) Mint & Q4os
Posts: 82

Rep: Reputation: Disabled
Question How do they do 'persistence' ? Linux on USB, /home on another device.


I know what it does,,, but how does it work ?

Example: I down-loaded the latest 'DistroYer.ISO' and made a bootable-USB. It will boot in 'demo' mode, and I can attach my WiFi, change the wallpaper, download & install my favorite editor, etc, Great !

If I decide to install it, all the tinkering I just did, is gone.

Now: Repeat the same process using PUPPY.ISO. (as example)
After we are done tinkering, we shutdown. Puppy will request a 'save-file' to store all of our tinkering for the next boot, then in a moment, powers OFF.

Next: Boot it again, and all tinkering is in place, just as we left it.
Perfect ! Looks too easy, must be magic.

The trick is, PUPPY is not installed. It is still the bootable-USB.
All the tinkering must be 'mirrored' on another device.

How do they do that ?
Can it be done on any other distro ?
I want to boot DestroYer-USB along with tinkering-USB and GO.

Why would I need this ?
I want every student to have their private-OS, plus their private-DATA.
Their classroom machines are donated hand-me-downs running a 'public' version of the private-OS. The day is too short for techie-issues.
Dad's old PC ate my homework & the new PC is business-only. Mom was using my sister's laptop. The dog ate my charger.

Any / all comments welcomed.
 
Old 08-18-2020, 05:00 PM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
You just make the USB drive writable. Puppy reads the savefile at boot. Better, do an actual installation on the USB stick, not just a demo. You can install an OS onto any drive, not just internal ones. Download the installer onto your machine, then run it on each USB stick. It's far more time consuming than just using dd to copy the installer, but it will provide a far better experience for the kids.
 
1 members found this post helpful.
Old 08-18-2020, 05:51 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,643

Rep: Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967
Quote:
Originally Posted by ACRIzona View Post
I know what it does,,, but how does it work ?
Example: I down-loaded the latest 'DistroYer.ISO' and made a bootable-USB. It will boot in 'demo' mode, and I can attach my WiFi, change the wallpaper, download & install my favorite editor, etc, Great !

If I decide to install it, all the tinkering I just did, is gone.
Right...that's why it's live/demo versus an installed copy.
Quote:
Now: Repeat the same process using PUPPY.ISO. (as example)
After we are done tinkering, we shutdown. Puppy will request a 'save-file' to store all of our tinkering for the next boot, then in a moment, powers OFF.

Next: Boot it again, and all tinkering is in place, just as we left it. Perfect ! Looks too easy, must be magic. The trick is, PUPPY is not installed. It is still the bootable-USB. All the tinkering must be 'mirrored' on another device.

How do they do that ?
They wrote the distro that way.
Quote:
Can it be done on any other distro ?
Yes
Quote:
I want to boot DestroYer-USB along with tinkering-USB and GO.

Why would I need this ?
I want every student to have their private-OS, plus their private-DATA.
Their classroom machines are donated hand-me-downs running a 'public' version of the private-OS. The day is too short for techie-issues.
Dad's old PC ate my homework & the new PC is business-only. Mom was using my sister's laptop. The dog ate my charger.

Any / all comments welcomed.
I would strongly suggest you first print your resume out and put out some feelers for new employment. Because if you go around school district rules, circumvent their data policies, and let students (essentially) do what they want is a GREAT way to lose your job. Because the first time little Timmy has his 'private data' found by his parents, they're going to want to know WHY AND HOW he got it...and he's going to gladly throw you under the bus.

Past that, as sgosnell said, any distro can be installed to a USB device...but it IS NOT a good idea. USB sticks aren't designed to do this for any good length of time. The read/write cycles they go through to run an entire distro and save your data are high, compared to what they're meant to do, which is occasional data access. Puppy is specifically written to do this in a better manner, which is why you need a 'save file' elsewhere.
 
1 members found this post helpful.
Old 08-18-2020, 06:36 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,720

Rep: Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914
Puppy is unique in several ways. It runs entirely from RAM and any changes made as posted will be saved to a special file upon shutdown and reloaded at boot time. Because it is different from main stream linux distributions it may not be the best for students. With donated hand me down computers USB type, amount of RAM and CPU speed will determine which Puppy version is best. I can not guarantee that a one size fits all will work unless you go with the lightest version.

Save files as far as I know are unique to Puppy but other distributions can use what is known as persistence. It comes two forms as a casper-rw file which is basically a FAT32 which is limited to 4 GB or an additional linux filesystem. It does have a few limitations that you can not upgrade versions or install hardware drivers and persistence does not work with all distributions. Basically it still runs as a live version but saved changes happen without user intervention unlike puppy. Boot speed depends on computer specs.

Running on a USB with an actual full installation is ok but usability depends on computer specs. Regardless USB flash drives are not the most robust devices and only having their private data on the same drive is dangerous IMHO...

I assume by private data the OP is referring to class homework and the classroom a private network without internet access.

One of my favorite live versions is knoppix and has persistence using a linux filesystem.

Last edited by michaelk; 08-18-2020 at 06:40 PM.
 
Old 08-18-2020, 06:43 PM   #5
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
I've run several Linux distros from flash drives, both USB and SD cards, for extended periods. It works fine. It takes years to wear one out, even with relatively heavy use. I never managed to wear one out.
 
Old 08-18-2020, 07:13 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,720

Rep: Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914
I've worn out one but I assume its wear leveling was not like now days. I've had a few just fail and was lucky they failed as read only. I've also physically broken a couple of drives out in the field.
 
Old 08-18-2020, 07:18 PM   #7
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
They can be physically broken, but I"ve read of SD cards being read after having a nail driven through them. Flash is about as robust as anything available.
 
Old 08-18-2020, 07:30 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,643

Rep: Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967
Quote:
Originally Posted by sgosnell View Post
They can be physically broken, but I"ve read of SD cards being read after having a nail driven through them. Flash is about as robust as anything available.
I'm with michaelk on this. I've had several fail, and while they're PROBABLY of better quality these days, I'd not trust them to run a full distro on for more than six months, if that.
 
Old 08-19-2020, 06:12 AM   #9
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,498

Rep: Reputation: Disabled
AntiX & MX Linux can be created to use persistence on a USB pendrive too, & it's easy to set up; once set up it can be duplicated to other drives. But, as above, don't fall foul of any school regulations.
 
Old 08-20-2020, 03:22 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
There are many distro's that can run from ram/usb and like almost any modern distro the persistence (casper) could be located on any location.
Pendrivelinux.com has a number of web pages for information on that.

I'd wonder where you are trying to locate their data in order to protect it. Usually I'd suggest a pxe/gpxe/ipxe thin client sort of setup.
So it leads me to ask why or where are you going to locate this data in order to keep the dog from it?
 
Old 08-21-2020, 02:57 PM   #11
ACRIzona
Member
 
Registered: Dec 2007
Location: Phoenix
Distribution: iMAC(64) Mint & Q4os
Posts: 82

Original Poster
Rep: Reputation: Disabled
Thank you jefro, I'll check that site you mentioned.

I omitted a lot of background info that wasn't pertinent to my question: "How did they do that ?"

Why would I need this ? The answer: I'don't.
But among my volunteer projects is a school teacher for the Amazonian tribal children of many languages.

The district-teacher is located somewhere along the Amazon between the Atlantic and the Andes mountains.
Student#1 speaks dialect-A , so the OS is in Language-1.
Student#2 speaks dialect-B , so the OS is in Language-2.
Student#3 speaks dialect-A , so the OS is in Language-1.
Student#4 speaks dialect-C , so the OS is in Language-2.
I believe there are over 800 students, 20 dialects, 6 Languages... go figure.

Organizing Lessons & Home-assignments requires a lot of electricity, among a few other things.

The best I can do is provide you(as a student, or as another teacher) with a computer that you can read & understand, at home.
Plus - Here's today's (or several day's) class for your studies.
I'll take your completed work back for your grade credits.

Some of the other replies didn't grasp my question, I'm sorry. Some offered off-topic info about flash memory & security issues.
You have read many topics, and you read & understood my question, and I will mark this topic solved.
 
Old 08-21-2020, 08:17 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
"How did they do that?" Locations to resources are not hard coded as such. They can usually be assigned. Usually the term is mount, so at boot the distro would be configured to "mount" /home by some means be in uuid or partition or such I'd think.


It is possible to make a real linux usb. You may not need to make a minimal puppy or dsl, antix or such in live.

I understand your point about machines and electricity.

"Any / all comments welcomed." We assume that you were willing to read offered thoughts.
 
Old 08-21-2020, 09:41 PM   #13
Benmc
Member
 
Registered: Jul 2020
Posts: 32

Rep: Reputation: Disabled
just a couple of notes.

a "Live" system on a USB with persistence will store your users data as others have attested to.
eventually, the physical structure of the device will fail due to excessive read/write cycles. a good quality device should be good for several years though.

some "Live" systems can be updated as per a real installed system, how-ever, due to the filesystem structure, even with USB3 type hardware, it can take an age - ie overnight.

Installing a general purpose Linux System to USB(as opposed to a Live with persistence) for use onto multiple devices will likely fail to boot up to a desktop unless all the devices share exactly the same video hardware.
Linux is not known to be video promiscuous.
A Live (with persistence) usually has multiple video drivers built in and a method to determine a suitable driver for the hardware it has been attached to.

another option would be to issue a Live USB key with persistence for the OS and a USB key for the users data.
the Live USB could be shared among several users in a village, but the data keys remains with each user, to be given to the teacher as required, copied and returned to the student.
reputable branded ones should be good for years.
effectively, the Live USBs are used in read only, except when setting hardware/software parameters for *that* village, so they also should last for years.
Hardware would require 2 USB ports if using this method or a USB multiport attachment.
 
Old 08-22-2020, 08:38 AM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,643

Rep: Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967Reputation: 7967
Quote:
Originally Posted by ACRIzona View Post
Thank you jefro, I'll check that site you mentioned.
I omitted a lot of background info that wasn't pertinent to my question: "How did they do that ?" Why would I need this ? The answer: I'don't.
But among my volunteer projects is a school teacher for the Amazonian tribal children of many languages.

The district-teacher is located somewhere along the Amazon between the Atlantic and the Andes mountains.
Student#1 speaks dialect-A , so the OS is in Language-1.
Student#2 speaks dialect-B , so the OS is in Language-2.
Student#3 speaks dialect-A , so the OS is in Language-1.
Student#4 speaks dialect-C , so the OS is in Language-2.
I believe there are over 800 students, 20 dialects, 6 Languages... go figure.

Organizing Lessons & Home-assignments requires a lot of electricity, among a few other things. The best I can do is provide you(as a student, or as another teacher) with a computer that you can read & understand, at home. Plus - Here's today's (or several day's) class for your studies. I'll take your completed work back for your grade credits.

Some of the other replies didn't grasp my question, I'm sorry. Some offered off-topic info about flash memory & security issues. You have read many topics, and you read & understood my question, and I will mark this topic solved.
It appears as if you've not grasped the answers. Putting this on USB sticks is going to have its own set of issues/problems that are 'techie related'. And based on what you said in your first post:
Quote:
Originally Posted by ACRIzona
Their classroom machines are donated hand-me-downs running a 'public' version of the private-OS. The day is too short for techie-issues. Dad's old PC ate my homework & the new PC is business-only. Mom was using my sister's laptop. The dog ate my charger.
...you're not fully thinking about what you're asking.

You say they're using old hand-me-downs...so what makes you think those are even going to be ABLE to boot from USB? Or have working USB ports?? And if you're thinking they're going to use it on their own PC's at home, you're right back to the "Dad's old PC/sisters laptop/etc." things that will STILL be in play. In short, this seems like a pointless thing to do, and instead of simplifying things, you're adding a LOT of work onto whoever is going to be making these sticks, distributing them, etc. Because now they're going to have to walk through BIOS settings to enable USB boot/change boot order, work with corrupted USB sticks, have a good supply of them, and so on.

If this is a remote area, you don't add new things; you work with what you HAVE AVAILABLE THERE, because maintenance and long-term support is more critical, when your resources are limited.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware Live Edition - Changing a LUKS encrypted persistence and home passwords! ag33k Slackware 1 10-17-2019 12:39 PM
mint 19.1 live usb with persistence works on one laptop but not another frogashes Linux - Newbie 4 02-08-2019 07:09 AM
Linux USB Flash Drive Installations, persistence, limited writes, updates.... AdamN Linux - General 5 12-20-2013 06:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration