LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-08-2019, 08:17 AM   #1
4Baxter
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Rep: Reputation: Disabled
Ubuntu persistent - possible to RAM flush to casper-rw on shutdown only?


Recently made a persistent LiveUSB of Ubuntu 14.04.06. USB model: Lexar TOUGH 32GB usb 3.0, write speed: 20-60 mbps per manufacturer specs.

It works mostly fine. However, from time to time every activity on the screen freezes and the access LED on the mem. stick starts rapidly flashing. I take it copies the recent changes to the persistence file casper-rw. Sometimes, these "copy breaks" reach ridiculous lengths, and they occur quite often.

The volatile (non-persistent) LiveUSB, however, works just as well and performs at the level of HDD-installed system. No copy breaks whatsoever. Everything is done in RAM (as per online manuals), and is gone when the RAM loses power.

Is there a way to make the persistent Ubuntu LiveUSB, which does everything in RAM, and only writes changes to casper-rw on shutdown/reboot? Thank you.
 
Old 10-09-2019, 03:48 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,217

Rep: Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926
There is a way of course. The only issue here is that any fail before save would lose all current changes. I believe the Puppy distro has an example of toram and save changes to floppy/usb as I recall. It was one of those small distro's.

Is there a reason you don't want to create a real install on this usb flash drive and maybe even use a current distro? Is this system very old?

I guess you may also not be correctly diagnosing the problem. How did you decide it was the casper changes?

Last edited by jefro; 10-09-2019 at 03:49 PM.
 
Old 10-10-2019, 08:34 PM   #3
4Baxter
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
There is a way of course. The only issue here is that any fail before save would lose all current changes. I believe the Puppy distro has an example of toram and save changes to floppy/usb as I recall. It was one of those small distro's.

Is there a reason you don't want to create a real install on this usb flash drive and maybe even use a current distro? Is this system very old?

I guess you may also not be correctly diagnosing the problem. How did you decide it was the casper changes?
The main reason new distros aren't used is, that the install is intended to run Robot Operating System (ROS) indigo, which requires 14.04. It is a very complex software suite with so many dependencies that I wouldn't want to risk installing it onto any other Ubuntu version. However, if you happen to know about the guide on listing and resolving dependencies manually (with the method which doesn't take forever), please by all means let us know.

Moreover, I've done proper installs on usb (Ubuntu and Mint), complete with re-partitioning. However, even on a good memstick with (15-20 mb/s write speed) the boot times are ~5 min and every operation (e.g. opening gedit) takes 30+ seconds to complete. Performance might have been better on desktop powerhouse builds. The point is, however, that such portable installs are to be used mostly with mid-range laptops, e.g. HP probook 4520s which I performed most of the testing on.

Persistent LiveUSBs work great though. Really fast boot and operation speeds. The only problem is the occasional freezes described in the original post. These mostly occur when runnig apt-update, apt-install, or any other operation that requires a lot of consecutive writes to the disk (e.g. enabling prop. drivers). Sometimes, however, it can occur out of the blue when typing something in gedit. From what I've read, it is somewhat normal, since during that time casper-rw is updated with the new data. Though I might've understood it wrong.

One factor I forgot to mention is: I've installed Ubuntu 14.04 persistent on NTFS-formatted usb. Casper-rw is 7gig. Could that be the issue?

Last edited by 4Baxter; 10-10-2019 at 08:39 PM.
 
Old 10-10-2019, 09:13 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,217

Rep: Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926
You can't exactly correctly run updates on a live with persistence. There are some updates won't/can't change what is in squashfs.

It is possible to create a squashfs of some updated system and use it.

The DOD had a small usb that used an older puppy version of compression. Made it kind of hard to fool with.

There is never an easy way to fix dependencies. Best to start with some JEOS and then add in the software that you must have I'd think. Then you don't get bogged down on stuff you don't use. Not sure what all you need but stock distro's are pretty bloated for specialized stuff.

One main reason for using a live squashfs is that you are only moving compressed data out of the flash drive.


It is a must to have a well supported and very fast usb3 flash drive. Not all makes of drives like linux timings.

Of course if you are stuck on usb2 then it slows down a lot.

Last edited by jefro; 10-10-2019 at 09:42 PM.
 
Old 10-10-2019, 11:08 PM   #5
4Baxter
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
You can't exactly correctly run updates on a live with persistence. There are some updates won't/can't change what is in squashfs.

It is possible to create a squashfs of some updated system and use it.

The DOD had a small usb that used an older puppy version of compression. Made it kind of hard to fool with.

There is never an easy way to fix dependencies. Best to start with some JEOS and then add in the software that you must have I'd think. Then you don't get bogged down on stuff you don't use. Not sure what all you need but stock distro's are pretty bloated for specialized stuff.

One main reason for using a live squashfs is that you are only moving compressed data out of the flash drive.


It is a must to have a well supported and very fast usb3 flash drive. Not all makes of drives like linux timings.

Of course if you are stuck on usb2 then it slows down a lot.
Sorry, I meant apt-get update. Though sudo pciids-update, apt-get dist-update and apt-get upgrade ran just fine, and that was mostly all the updates I needed. Thanks for the JEOS advice, I guess I'll start with Ubuntu Jeos, and if it doesn't work (e.g. ROS indigo requires OLDER versions of base packages), then simply strip down 14.04 and work from there on.

"using a live squashfs" - do you mean using the installed system as opposed to persistent LiveUSB?
"It is a must to have a well supported and very fast usb3 flash drive" - That might be the case. So even high-speed usb (such as I'm using now) can still stutter if its on-board memory controller doesn't fit well with linux access timings?
 
Old 10-11-2019, 04:11 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,217

Rep: Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926
The deal with a live to usb (with or without persistence) is that almost every one of them use a single file for the source of the filesystem. That single file is almost always compressed by some compression method. Squashfs is common. You can take a complete system updated and fully working system and then make it into this image file for use. Someone on this forum always suggests the tool to do that and I always forget but you can make it manually too.

My guess is that more usb brands have the issue over the onboard controller based on what I see on LQ. Not scientific metrics.

Generally I see a usb work great on a windows format at stated speeds. Switching to ext4 or such can be a disaster on some very few models.
 
  


Reply


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
Disable casper autologin on remastered Ubuntu 10.04 LiveCD Canadian1296 Linux - General 2 12-05-2011 09:07 PM
Persistent persistent Persistent Going Nuts Here Fcukinyahoo Linux - Newbie 6 11-17-2011 09:56 PM
99% cpu usage due to flush-8:0 & flush-8:16 propofol Debian 4 09-09-2011 03:03 PM
Ubuntu Casper USBDISK Custom Boot Options metallica1973 Ubuntu 12 10-19-2010 02:57 PM
mysql "flush logs" or "flush tables with read lock", ... hangs deadeyes Linux - Server 4 01-19-2010 03:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration