Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 04-18-2016, 03:07 AM   #1
LQ Newbie
Registered: Apr 2016
Posts: 1

Rep: Reputation: Disabled
how to make my root system behave like a live system but preserve changes when shutdown?

one of my friends doesn't have an hdd , so I will install linux distro on a usb stick. it will be a full install just like installing to hdd but it will install on a flash stick instead of hdd.
the problem here is usb 2.0 stick are very slow , If you write a lot on it , it will wear out quickly because if have limed number of write cycles

so I want to do a full system install on a usb stick, and make it something like read only filesystem so that any changes like installing packages will written on ram , at the end before I shutdown run a script to write all the changes on the flash drive over the old system.
this is good for flash sticks because all writes are in ram and then are written to flash drive only ""ONCE"" per session when you shutdown.
I think this is possible because puppylinux does a similar thing when you shutdown it asks you to save all the changes you made to a sfs file and it will loaded next time you boot. I want to do the same thing but instead of the sfs file I want the changes to be written over the old system , also don't want to run the full system on ram like puppy.
I read about overlayfs and rsync , but didn't quite understand , I need some help here.

you may ask why I didn't the following options ?
1- install the system on flash stick and use it just like hdd ? tried that it was painfully slow maybe because of the simultaneous read and writes.

2- live cd ? tried it , it was very fast , but the customization I made will be lost if I shutdown.

3- live cd with persistence ? it also was very slow because changes are continuously written to the usb stick , and there's hidden services that always write logs something like that.
Old 04-18-2016, 01:20 PM   #2
Registered: Mar 2008
Posts: 19,217

Rep: Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926
I'd buy a fast drive, usually the weak point. The is a great choice. Fast even under 2.0

If your system is hung up on usb 1.x then you do have a problem.

A live cd to usb with persistence is an OK choice. It leaves the live cd squash filesystem to help speed the computer up. Easier to move compressed data over usb.

I have only burned out one usb flash drive. By the time you get tired of it, time to buy a new one.
Old 04-18-2016, 02:42 PM   #3
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,334

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
I agree with jefro. But if you can't get a better drive, one option can be to use the "commit" option when mounting ext4. If you set it to some huge value, and have plenty RAM, data will not be written for a while. Then, most likely, data will not be written until the unmount at shutdown.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you make a live boot cd dvd from existing system ? ron7000 Linux - General 2 09-18-2011 09:25 PM
Using genisoimage to make an iso of a live system ? uncle-c Linux - Newbie 1 03-13-2008 09:44 AM
No system restore, so can I make a new 'live' DVD? eoinrua Ubuntu 7 06-22-2007 06:25 PM
howto disable shutdown/lock screen and make system wide icons jojobold SUSE / openSUSE 1 10-11-2006 09:08 AM
SuSE 9.3 - USB Diapeared & Non-Root users can shutdown system nuro305 SUSE / openSUSE 9 04-14-2006 02:27 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:19 PM.

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