Page 1 of 2

copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 04:01
by timcowchip
I'm trying Porteus because I want to help speed up loading web pages and all the crap contained therein without having to temporarily store everything on my hdd. So I'm using the "copy2ram" option. I would like to have my mozilla profile persist thru a reboot. I think this can be accomplished by making a module from my ~/.mozilla folder.
I tried

Code: Select all

dir2xzm .mozilla / /mnt/sda1/porteus/modules/08-.mozilla.xzm
. A module was created, it copies to ram during boot. When I attempt to activate it, dialog says its already activated. Yet, no login cookies are saved in my mozilla profile.
Am I doing this the wrong way or am I asking too much, to run Porteus in ram and have some small amount of persistence thru a reboot.

Re: copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 08:18
by fanthom
hi timcowchip,

you have created the module incorrectly. it will show up in live fs as /.mozilla while you need it in /home/guest/.mozilla.
please refer to our documentation how to create modules properly:
http://www.porteus.org/component/conten ... dules.html

Re: copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 19:09
by timcowchip
I tried following the instructions here : http://www.porteus.org/component/conten ... dules.html

Code: Select all

mkdir -p /tmp/fakeRoot/home/guest
cp -R /home/guest /tmp/fakeroot/home/guest
dir2xzm /tmp/fakeRoot /mnt/sda1/porteus/modules/guest.xzm
I couldn't log in as guest after that. I'm guessing that I need to put the module somewhere else like ~/Desktop/guest.xzm then activate it after logging in as guest instead of have it load and activate at boot.

Re: copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 19:24
by Ed_P
[quote="timcowchip"]

Code: Select all

cp -R /home/guest /tmp/fakeroot/home/guest
fakeroot

and

Code: Select all

dir2xzm /tmp/fakeRoot /mnt/sda1/porteus/modules
fakeRoot

are not referencing the same folder. Linux file/folder names are case sensitive.

Re: copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 19:46
by timcowchip
Thanks Ed. I made the typo when posting, not on the command line. :)

Re: copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 20:08
by timcowchip
I did, however, make other typos on the command line.

Code: Select all

cp -R /home/guest /tmp/fakeRoot/home/guest
should have been

Code: Select all

cp -R /home/guest /tmp/fakeRoot/home
Everything works as it should. The /home/guest folder is as it was when I made the module from it.

Re: copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 20:15
by Ed_P
timcowchip wrote:I would like to have my mozilla profile persist thru a reboot. I think this can be accomplished by making a module from my ~/.mozilla folder.
I tried

Code: Select all

dir2xzm .mozilla / /mnt/sda1/porteus/modules/08-.mozilla.xzm
.
hmmmmm

Try

Code: Select all

dir2xzm /home/guest/.mozilla/firefox  /mnt/sda1/porteus/modules/firefox.xzm
I have not tried this myself but I think it should work. And if it doesn't it shouldn't stop you from logging on.


BTW Firefox signons are stored in the signons.sqlite file.

Re: copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 22:17
by francois
You need the changes cheatcode as instructions in your bootloader, see:
http://www.porteus.org/component/conten ... -them.html

What architecture and what desktop environment are you using?

Re: copy2ram, modules, mozilla profile

Posted: 03 Jul 2014, 23:31
by Ed_P
We cross posted before timcowchip.

If you're making a module of the whole /home folder you should consider switching from the extramods= cheatcode to the changes= one as francois suggested. It's easier to maintain that way than manually making modules all the time.

Re: copy2ram, modules, mozilla profile

Posted: 04 Jul 2014, 00:22
by timcowchip
I have tried the "changes=" way and it works very well, but I was looking for a way to run everything in ram to speed up things. I am using Razor-Qt on an Intel Atom D510 x86_64 with 2G of ram. Its netbook hardware but the ram is adequate for loading a few modules.

Re: copy2ram, modules, mozilla profile

Posted: 04 Jul 2014, 02:09
by francois
I don't see why you can't use both copy2ram and changes cheatcodes simultaneously!

Also, have a look at panel menu > system > porteus setting center > diskette icon. There are many solutions there.

Re: copy2ram, modules, mozilla profile

Posted: 04 Jul 2014, 03:50
by Ed_P
timcowchip wrote:I have tried the "changes=" way and it works very well, but I was looking for a way to run everything in ram to speed up things. I am using Razor-Qt on an Intel Atom D510 x86_64 with 2G of ram. Its netbook hardware but the ram is adequate for loading a few modules.
I'm running Razor-Qt on a 2G of ram netbook also. I guess it depends on what works best for you.

Re: copy2ram, modules, mozilla profile

Posted: 04 Jul 2014, 07:31
by fanthom
I couldn't log in as guest after that.
because you messed up permissions (created /home/guest as root). use this:
mkdir -p /tmp/fakeRoot
cp -a --parents /home/guest/.mozilla /tmp/fakeroot/
dir2xzm /tmp/fakeRoot /mnt/sda1/porteus/modules/guest-mozilla.xzm
if you are not sure why '-a' and '--parents' then run:

Code: Select all

man cp

Re: copy2ram, modules, mozilla profile

Posted: 04 Jul 2014, 16:07
by Ed_P
fanthom wrote:if you are not sure why '-a' and '--parents' then run:

Code: Select all

man cp

Code: Select all

-a, --archive
              same as -dR --preserve=all

--parents
              use full source file name under DIRECTORY

Code: Select all

--preserve[=ATTR_LIST]
              preserve the specified attributes (default:
              mode,ownership,timestamps), if possible additional attributes:
              context, links, xattr, all
I'm kinda surprised these aren't defaults.

Re: copy2ram, modules, mozilla profile

Posted: 04 Jul 2014, 20:26
by mt12345
francois wrote:I don't see why you can't use both copy2ram and changes cheatcodes simultaneously!
but changes are not copied to ram!

http://forum.porteus.org/viewtopic.php?f=81&t=3618