[Solved] USB drive not idle during copy2ram session with persistence mode

Post here if you are a new Porteus member and you're looking for some help.
PrtsUsrKr
Ronin
Ronin
Posts: 2
Joined: 15 Mar 2024, 04:44
Distribution: Porteus-v5.01

[Solved] USB drive not idle during copy2ram session with persistence mode

Post#1 by PrtsUsrKr » 15 Mar 2024, 06:26

Hi!

I'm a real newbie to Linux and Porteus, so please excuse me in advance if any of my questions are in any way too stupid or unworthy of asking!
I've tried my best to search for answers to my question in this forum before posting, but unfortunately was unsuccesful :(

So, I was very happy to find out that by combining the copy2ram feature alongside persistence mode, Porteus(a super awesome distro by the way !!) will let me load and run everything on my ancient Dell Mini 10v's RAM while also letting me save to a USB drive any changes I make during a session run on RAM.

Thanks to this forum, I thought I've successfully implemented this by adding the cheat code "changes=/mnt/sdb1/porteus" next to "Append" under "copy2ram" in the "poretus.cfg" file. I can confirm that any changes I make during a run-on-RAM session successfully gets saved to my USB drive, and those saved changes successfully get loaded to RAM during the next boot.

HOWEVER, I've noticed that while working on my computer during a session on RAM, my USB drive keeps blinking every now and then! (for example, when opening firefox and browsing the web)
From what I've understood after studying forum posts, aren't all changes I make during a session run on RAM supposed to get saved on RAM first, and only get written to the USB drive after I click on "shut down"?

The fact that the USB drive keeps blinking in the middle of my session in copy2ram mode got me worried if (even though Porteus tells me its succesfully loaded everything to RAM) I'm actually just experiencing the same experience as running a live session from my USB (aka the regular Graphics mode). :cry:

So my newbie questions I'd be grateful for your help are the following:
1) Is it normal for the USB drive to be doing things while I'm using Porteus with copy2ram and persistence mode at the same time?
1-1) If so, is it because all changes I make during a session run on RAM (contrary to my understanding) get saved/written to the USB drive in real-time, instead of after clicking on shut down?
Or is it because my USB drive is carrying out some other neccessary task other than saving changes I make during my session?
1-2) If the USB drive acting this way is normal, then is there practically no difference between running from the USB drive(Graphics) or on RAM(copy2ram) in my case?
2) If the USB drive IS in fact supposed to stay idle until I ask Porteus to shut the computer down, and therefore I'm currently not enjoying a true copy2ram exprerience, then could anybody please tell me what I can do to make everything work properly?

Additional information in case it might help :
- The USB drive I'm using is 1GB in size, and about 800 MB is used by Porteus, Firefox and a few fonts.
- My computer(Dell Mini 10v) has 2GB of RAM, so I'm thinking that since roughly 1GB of RAM will be allocated to loading the USB, the other 1GB of RAM can be used for any activities like surfing the web using firefox without the need to use any swap memory. I've actually checked if the blinking of the USB drive is because swap memory, but it seemed to still be blinking when no swap memory's being used.

Thank you so so much for the help!
Last edited by PrtsUsrKr on 19 Mar 2024, 02:01, edited 1 time in total.

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

USB drive not idle during copy2ram session with persistence mode

Post#2 by Ed_P » 15 Mar 2024, 17:08

PrtsUsrKr wrote:
15 Mar 2024, 06:26
I'm a real newbie to Linux and Porteus,
We all were at some point.
PrtsUsrKr wrote:
15 Mar 2024, 06:26
I've successfully implemented this by adding the cheat code "changes=/mnt/sdb1/porteus" next to "Append" under "copy2ram" in the "poretus.cfg" file.
Please post the text of the menu you used.

I've never used the copy2ram cheatcode but I do use the changes= one and changes do get written to the changes file as they occur. That's one of the reasons why I use the changes=EXIT: cheatcode. 1. Changes don't get written to the drive until I shutdown and 2. If I make a change that I don't like I can stop the change from being saved when I shutdown.

Also try specifying your changes folder without the /mnt/sdb1 characters.


Added in 11 hours 5 minutes 30 seconds:
/boot/docs/cheatcodes.txt wrote: Here's an example of what the boot line would look like, adding the
noauto and copy2ram cheatcodes to a standard Porteus boot option
(which already has some other cheatcodes by default):

APPEND initrd=initrd.xz changes=/porteus/ noauto copy2ram

:
:
:

Copy2ram slows down the boot phase but speeds up Porteus!

:
:
:

SPECIAL NOTE FOR USING CHANGES CHEATCODE WITH 'EXIT:' extension:
The 'EXIT:' extension tells the 'changes=' cheatcode to keep all
of the files that have been added/deleted/modified during the
live session stored in memory until you reboot/shutdown. Your
RAM works as a buffer which gets dumped on the drive only once,
when the session is finished.
'changes=EXIT:' cheatcode has following advantages:
- Porteus works as fast as in 'Always Fresh' mode as all modifications
to files and folders are performed in RAM.
- reduced number of read/write cycles should extend the life of SSD
drives and USB sticks.
The only disadvantage of the 'EXIT:' extension is that the session
does not get saved in cases where you experience a hang (kernel crash)
or power interrupt.
Please use with caution!

While you are running a session with changes=EXIT, you can use the
'dump-session' command (run as root from the command line) to move all
of your changes from RAM to your storage media. This will reduce the
risk of data loss and free up your RAM.

Examples:
changes=EXIT:/dev/device
changes=EXIT:/path/
changes=EXIT:UUID:STrING-0F-ChARACtERS/path/file.dat
Ed

PrtsUsrKr
Ronin
Ronin
Posts: 2
Joined: 15 Mar 2024, 04:44
Distribution: Porteus-v5.01

USB drive not idle during copy2ram session with persistence mode

Post#3 by PrtsUsrKr » 19 Mar 2024, 02:00

"changes=EXIT:"
This made Porteus now work exactly the way I wanted it to!
Thank you so so much Ed_P for the help :worship:

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

[Solved] USB drive not idle during copy2ram session with persistence mode

Post#4 by nanZor » 23 Mar 2024, 21:42

copy2ram is one of the great features of Porteus. Not only for older minimal gear, but for modern ones too that may have a decent amount of ram, but slower cpu's (like Intel Atom's etc).

If your load isn't too huge, watching the system and say a browser just FLY on ram, (well maybe with just one or two tabs open) is amazing. And being able to choose to do that on the fly when you boot is so convenient.
That's a UNIX book - cool. -Garth

Post Reply