Page 1 of 1

converting save changes folder into module

Posted: 19 Jan 2011, 16:21
by francois
I would like to be able to convert my frugal install save changes folder into a module. This way once I get a satisfying desktop (my favorite wallpaper, screensaver, right dimension for the control panel, firefox set with xmarks addon, etc.), I could revert to it anytime that I wanted to, instead of reinstalling everything anew. The main reason for that is that it happens to me regularly that with time my changes folder gets corrupted or all mixed up. Jcsoh's solution for slax is rather elegant:
http://www.slax.org/forum.php?action=vi ... ostid72773

However, for one reason or another I am not able to apply his solution. Do you know or resort to any save changes folder module for your frugal installation? How do you build it?

Re: converting save changes folder into module

Posted: 19 Jan 2011, 20:16
by crashman
Maybe you must create another .lzm module with:
/root/.config
/root/.kde
/usr/share/wallpaper

for firefox you must seek changes folder.

cheers

Re: converting save changes folder into module

Posted: 19 Jan 2011, 20:54
by Burninbush
@ francois ...

How do you save changes? If you are using the default changes=/slax on a vfat filesystem, then switching to a slaxsave.dat container will solve that corruption problem. My opinion, you should just toss your old changes and start fresh -- once a file is corrupt there is no way to fix it -- it will still be corrupt after you convert it to lzm format.

So ... how to do it? Assuming container file, then reboot to always fresh, loop-mount the container.dat file, and dir2lzm the directory [mount point] where you mounted it. Copy that to /slax/modules on your media. Here, I'd take the opportunity to first scan it for junk, deleting what shouldn't be inside it.

If using changes=/slax, then maybe somebody else who uses that method will answer the question. I decided on day-2 of using slax that posixovl was evil, and switched to slaxsave.dat to avoid it.

I'm not clear on saving KDE setup changes -- they don't always seem to save properly, and my guess is that KDE is doing something dynamic about its setups during startx.

Re: converting save changes folder into module

Posted: 20 Jan 2011, 02:26
by francois
In fact I work with frugal install on hdd. The menu.lst is:

title porteus09
kernel (hd0,5)/boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/porteus09cfg fromhd=/mnt/sda6
initrd=(hd0,5)/boot/initrd.lz
boot

The always fresh reboot is something I will try. What will be the effects of removing modules in /slax/modules folder?

Re: converting save changes folder into module

Posted: 20 Jan 2011, 07:42
by Burninbush
In fact I work with frugal install on hdd. The menu.lst is:

title porteus09
kernel (hd0,5)/boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/porteus09cfg fromhd=/mnt/sda6 ... >francois

++++++++++++++++

OK ... then you'd boot, when the grub menu.lst appears, highlight your slax entry, E to edit it, then E again to edit this line, arrow-left to get to the changes=/porteus09cfg, and backspace over it, deleting that cheatcode completely. Enter to accept it, and then B to boot. Porteus will come up, but missing all your setup changes that are captured in /porteus09cfg, which is fine, the expected outcome. You are now in always fresh mode, and the system will not be writing to your changes directory while you are trying to convert it to a lzm.

Now run

#dir2lzm /mnt/partition/porteus09cfg /mnt/partition/slax/modules/z-mychanges.lzm

-- and wait until the prompt comes back. Do NOT believe it when the 100% done message appears.

Reboot again the same way, again deleting the changes= statement. When Porteus comes up, it should look and be setup just the way it looked the last time you exited slax when you were saving changes.

If that is successful then you should start a new changes directory -- be sure to edit menu.lst.

The reason to name the file z-mychanges.lzm is to ensure that it is loaded last, after all other modules. Last module to load a file wins. If you then later repeat this conversion maneuver, be sure to name the new .lzm something like z1-mychanges.lzm -- to ensure that it is loaded after the previous changes lzm.

I'll make another recommendation -- a convenience; edit your menu.lst to make another porteusV09 entry, a duplicate of the one you have except without a changes= cheatcode. Change the label to Porteus - Always Fresh. The ability to easily boot to always fresh is very handy for debugging purposes.

Re: converting save changes folder into module

Posted: 20 Jan 2011, 13:48
by fanthom
@francois
if you care about saving user settings only then do:

Code: Select all

dir2lzm /mnt/partition/porteus09cfg/root /mnt/partition/slax(or porteus)/modules/z-mychanges.lzm
BTW - wallpaper is also saved in /root/.kde
now i can guarantee that your system will be ok after reboot.

Re: converting save changes folder into module

Posted: 21 Jan 2011, 01:06
by francois
@burningbush:
Thanks for the detailed explanation permitting bootup when in grub entry. I also appreciate your always fresh menu.lst settings. However, it seems that my changes folder is pretty huge, so I will have to downsize it in size before proceeding anyway. I will start with a more recent /porteus09cfg save changes folder.

@fanthom:
Thanks, However:
root@slax:~# cd /mnt/sda2/porteus09cfg/root
-bash: cd: /mnt/sda2/porteus09cfg/root: No such file or directory
root@slax:~# dir2lzm /mnt/sda2/porteus09cfg/root /mnt/sda2/slax/modules/z-mychanges.lzm

Convert directory tree into .lzm compressed module
usage: /usr/bin/dir2lzm source_directory output_file.lzm

I imagine that you forgot to specify /changes in the expression:
root@slax:~# dir2lzm /mnt/sda2/porteus09cfg/changes/root /mnt/sda2/slax/modules/z-mychanges.lzm

The folder is still very huge. As stated in the above, I will make a new save changes folder with minimal settings, and report.

Posted after 3 hours 41 minute 31 second:
@burningbush:
It does not seem to work.

@fanthom:
/porteus09cfg/changes/root was not enough, it seems.

@burningbush:
Here is what I did for a porteus tailored basic installation module for hdd frugal install:

1) boot porteus with a virgin save change folder, using cheatcode changes=/newsettings, e.g. in my case /porteus09cfg that resides on th
2) proceed to the modifications you basically want on your installation
3) logout
4) reboot porteus without the changes cheatcode or Always fresh mode (these are synonyms)
5) in cli mode:
root@slax:~# dir2lzm /mnt/sda2/porteus09cfg/root /mnt/sda2/slax/modules/z-mychanges.lzm
The tailored basic installation should ready to be used at next booting of porteus.
6) reboot porteus Always fresh or with a new virgin save changes folder, using for example cheatcode changes=/additionalchanges
However, in 6) neither options did work.

Posted after 25 minutes 10 seconds:
******************************************
Here are the changes that I try to include in the z-mychanges.lzm (maybe some of them could not be applied by this method):
a)configure desktop to multiple desktop
b)wallpaper different for each desktop
c)konqueror view mode saved to detailed view
d)panel clock to plain clock timezone Montreal, North America
e)keyboard settings to canada multilingual(french-english)
f)firefox with xmarks addon
g)openoffice writer setup so to be ready to be used (I already have OO as a module

Re: converting save changes folder into module

Posted: 21 Jan 2011, 03:38
by brokenman
For the record i start with changes-orig.lzm

Then later on i make another module while keeping the old one. changes110120.lzm

I keep making these until i reach 4 or 5. This way if corruption occurs i know it was the last module. When i am happy that they are stable i combine them all and remove un needed files.

Then the process repeats. It has saved me a few times and i didn't lose everything, only the last lot of changes.

Re: converting save changes folder into module

Posted: 21 Jan 2011, 03:46
by X-Factor
@francios
Listen to what the man said, i've tried both BB n BM method by booting "always fresh" do add module then save the change,
edit//
which mean say
1. if i want pidgin i choose on my G4D always fresh + load pidgin+personal changes LZM
2. if i want usbmodem modeswicth setting i choose on my G4D always fresh + load usb modem+personal changes LZM
(as you know usb modem mode switch need tcl/tk whereas Pidgin doesn't)
i'm a total noob with cli :cry: but PMT help me a lot 8) .

Re: converting save changes folder into module

Posted: 21 Jan 2011, 20:53
by Burninbush
I keep making these until i reach 4 or 5. This way if corruption occurs i know it was the last module. When i am happy that they are stable i combine them all and remove un needed files. >brokenman

+++++++++++++++++

There ya go. I find this to be one of the most attractive features of the slax module system. That, and not having to deal with dependencies, usually.

My method here is almost the same as yours, except at the end I bring a slaxsave.dat into play for small daily tweaks, nothing I can't afford to lose.

Re: converting save changes folder into module

Posted: 09 May 2011, 00:49
by brokenman
The next Porteus 32bit rc1 release contains: save-changes

Boot to fresh mode and then from CLI type: save-changes /path/to/save/your/changes.xzm
It also contains a GUI tool to make your changes.dat file bigger or to create a new one. It will also attempt to repair a corrupt .dat

Re: converting save changes folder into module

Posted: 09 May 2011, 21:42
by francois
This is a very nice feature, one that will be quite appreciated. I will surely try it.

Thanks.

Re: converting save changes folder into module

Posted: 09 Jul 2011, 13:19
by francois
I really appreciate those threads on which you come back once and a while. Its good for those brains that with age are getting a little rusty.

Re: converting save changes folder into module

Posted: 11 Dec 2011, 05:40
by francois
Here is what I get under xfce 4.8 always fresh. Is there something wrong^

Code: Select all

root@porteus:~# save-changes /mnt/sda7/32bit_v11/porteus/modules/changes.xzm

Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /mnt/sda7/32bit_v11/porteus/modules/changes.xzm, block size 262144.
[===============================================================-] 804/804 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
	compressed data, compressed metadata, compressed fragments, compressed xattrs
	duplicates are removed
Filesystem size 3645.81 Kbytes (3.56 Mbytes)
	24.85% of uncompressed filesystem size (14670.98 Kbytes)
Inode table size 11522 bytes (11.25 Kbytes)
	23.09% of uncompressed inode table size (49897 bytes)
Directory table size 13008 bytes (12.70 Kbytes)
	44.39% of uncompressed directory table size (29301 bytes)
Number of duplicate files found 10
Number of inodes 1186
Number of files 765
Number of fragments 13
Number of symbolic links  281
Number of device nodes 2
Number of fifo nodes 1
Number of socket nodes 11
Number of directories 126
Number of ids (unique uids + gids) 7
Number of uids 4
	root (0)
	guest (1000)
	avahi (85)
	lp (4)
Number of gids 5
	root (0)
	lp (7)
	users (100)
	avahi (85)
	sys (3)

Your changes module has been created!
/usr/bin/save-changes: line 40: unexpected EOF while looking for matching `"'
/usr/bin/save-changes: line 43: syntax error: unexpected end of file
root@porteus:~# 

Re: converting save changes folder into module

Posted: 11 Dec 2011, 13:08
by brokenman
I see no fault in the save-changes.sh script ... i havn't checked the dir2xzm script yet. Everything seems in order to me ... but keep in mind that you can't save the module your are creating onto the filesystem that is being saved. In your case it doesn't appear to be the case.