Multiple versions of Porteus

Post here if you are a new Porteus member and you're looking for some help.
rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Multiple versions of Porteus

Post#1 by rara » 25 Aug 2015, 02:24

Hello everyone,

I had installed Porteus 3.17 with KDE4 desktop as my first try with Porteus. I replaced KDE with XFCE in the same installation and everything seemed fine. Then I deleted the "changes" folder as a part of the cleanup process and since then I can't change the wallpaper. I remember being able to change the wallpaper when I had KDE4 and perhaps even after I changed to XFCE. But after deleting the changes folder and let the system start with a blank slate I lost the ability to change the wallpaper. What I am trying to say is - I feel there are differences in the way KDE4 and XFCE based installations store changes.

Later I installed another (older) version of Porteus with XFCE and loving it. Now I would like to keep them both. Both the versions of Porteus run from an ext4 partition of 2 GB. As of now I have the "changes" folder separate for both the installations.

I would like to know if it is possible to have a common "changes" folder for more than one Porteus installations (assuming the different installations may have different Kernel versions and different desktop managers)?

Thanks in advance for any pointers.

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Multiple versions of Porteus

Post#2 by Rava » 25 Aug 2015, 05:19

rara wrote:I would like to know if it is possible to have a common "changes" folder for more than one Porteus installations (assuming the different installations may have different Kernel versions and different desktop managers)?
So, to get you right, I rephrase.

You have 2 different versions of XFCe (could be different versions of other GUI) and still want to use the same changes folder?

Technically, that can be done, also I must admit I not use the changes folder out of several reasons, the main reason being security. Instead I name all my modules in /base in a [nnn-] scheme, as in 001- to 999-. Usually my settings xzm I name 990-settings_YYYY-MM-DD.xzm so that it will be loaded as last module.

I know, that after I added some stuff, e.g. palemoon (that is a firefox variant) bookmarks, and then the system crashed, and I was not able to create a recent 990- module and have that copied to my boot partition, all that is lost.
But doing it so, and without a changes folder or changes file container has also advantages, other that security. It speeds up your system, and you also learn more about it, having the need to figure out where settings are and even sometimes how settings are stored. That might sound annoying to some users, while others appreciate that, cause it betters your learning curve for Linux, especially the GUI variant you choose to use.

Still, I prefer it that way. When I boot from an Linux partition I also use (for small changes, like my dozens of scripts from /usr/local/bin ) in porteus/rootcopy


</digress>
Back to your question. While it would be possible, I recommend you not doing so. I know of some programs, some of them being XFCe "core" programs or usually part of XFCe having changed the way they store their settings. While I see why you would like to only have one changes folder for both variants, it can get you nasty bugs and strange behaviour that will be almost impossible to track down.

Therefore I annoyed you with my above rant about not using changes folder, but using a local settings module instead.

When I wanted to make it like you, I would use 2 settings modules, and having the need to add new stuff to both.

Up to now I always xzm2dir and dir2xzm manually, but could be that I create a script for that one day... especially since I inserted some code that creates the symlink of /x that always points to the boot device, whatever physical device that might be, so reading or writing back the module can always be done from and to /x/porteus/base [considering I not boot from a CDROM or any other read-only-media, which I usually do not anyway)

I hope I managed to get my point to you, and also hope I was able to phrase it all in and understandable way, since I am not that awake at 07:00 during my holiday, and being a Non-native-tongue to boot.
Cheers!
Yours Rava

User avatar
brokenman
Site Admin
Site Admin
Posts: 5455
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Multiple versions of Porteus

Post#3 by brokenman » 25 Aug 2015, 14:12

I agree. I would convert the changes for each desktop into modules. Boot into copy2ram mode. Set things up how you like them. Use the porteus-settings-centre to create a module from your changes. Place this module in the 'optional' folder on your install media. Use the load= cheatcode to load the appropriate changes module for the desktop.

E.g: name the module xfce1.xzm and boot with: load=xfce1
How do i become super user?
Wear your underpants on the outside and put on a cape.

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: Multiple versions of Porteus

Post#4 by rara » 26 Aug 2015, 12:13

Rava wrote:So, to get you right, I rephrase.

You have 2 different versions of XFCe (could be different versions of other GUI) and still want to use the same changes folder?
Yes, correctly understood.
Rava wrote:Technically, that can be done, also I must admit I not use the changes folder out of several reasons, the main reason being security. Instead I name all my modules in /base in a [nnn-] scheme, as in 001- to 999-. Usually my settings xzm I name 990-settings_YYYY-MM-DD.xzm so that it will be loaded as last module.

I know, that after I added some stuff, e.g. palemoon (that is a firefox variant) bookmarks, and then the system crashed, and I was not able to create a recent 990- module and have that copied to my boot partition, all that is lost.
But doing it so, and without a changes folder or changes file container has also advantages, other that security. It speeds up your system, and you also learn more about it, having the need to figure out where settings are and even sometimes how settings are stored. That might sound annoying to some users, while others appreciate that, cause it betters your learning curve for Linux, especially the GUI variant you choose to use.

Still, I prefer it that way. When I boot from an Linux partition I also use (for small changes, like my dozens of scripts from /usr/local/bin ) in porteus/rootcopy
I am getting a hang of what you are saying. For now, I have the following directory structure and it's working absolutely fine.

Code: Select all

==> /dev/sda2

	== ==> /boot/syslinux
	== == ==> boot files, config files

	== ==> /porteus_3.1
	== == ==> /porteus_3.1/base
	== == ==> /porteus_3.1/modules
	== == ==> /porteus_3.1/changes

	== ==> /porteus_x.xx
	== == ==> /porteus_x.xx/base
	== == ==> /porteus_x.xx/modules
	== == ==> /porteus_x.xx/changes

Next I am going to give your suggested method a try.
Rava wrote:While it would be possible, I recommend you not doing so. I know of some programs, some of them being XFCe "core" programs or usually part of XFCe having changed the way they store their settings. While I see why you would like to only have one changes folder for both variants, it can get you nasty bugs and strange behaviour that will be almost impossible to track down.

Therefore I annoyed you with my above rant about not using changes folder, but using a local settings module instead.

When I wanted to make it like you, I would use 2 settings modules, and having the need to add new stuff to both.

Up to now I always xzm2dir and dir2xzm manually, but could be that I create a script for that one day... especially since I inserted some code that creates the symlink of /x that always points to the boot device, whatever physical device that might be, so reading or writing back the module can always be done from and to /x/porteus/base [considering I not boot from a CDROM or any other read-only-media, which I usually do not anyway)

I hope I managed to get my point to you, and also hope I was able to phrase it all in and understandable way, since I am not that awake at 07:00 during my holiday, and being a Non-native-tongue to boot.
I really appreciate your detailed reply, that too odd hours (sorry about that :sorry: )! And don't worry about the language, I could understand you well.

Your additional info is of good use from the perspective of learning. Really appreciated! I can see using the - save_to_module_and_load_as_needed_through_boot_menu - can have a number of advantages. I'll give it a shot.

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: Multiple versions of Porteus

Post#5 by rara » 26 Aug 2015, 12:18

brokenman wrote:I agree. I would convert the changes for each desktop into modules. Boot into copy2ram mode. Set things up how you like them. Use the porteus-settings-centre to create a module from your changes. Place this module in the 'optional' folder on your install media. Use the load= cheatcode to load the appropriate changes module for the desktop.

E.g: name the module xfce1.xzm and boot with: load=xfce1
Thanks for building upon Reva's post Brokenman! I see what you mean.

One question! Wouldn't it matter if different versions of Porteus have different Kernel versions? I mean, wouldn't "vmlinuz", initrd.xz and Porteus-xxx-xxx-.sgn files be Porteus version specific?

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Multiple versions of Porteus

Post#6 by Rava » 26 Aug 2015, 13:29

The Porteus Porteus-xxx-xxx-.sgn file is technically always the same file. Just try it by md5dum'ing them.

What sure differs, and should be kept separate are your initrd, kernel and associated 000-kernel.xzm and 001-core.xzm modules.

You still kan have several Porteus veriants, with differing kernel, initrd, 000-kernel.xzm and 001-core.xzm and all other modules being different by just pointing to a different porteus/base folder for the modules, and by simply renaming the kernal and initrd files, e.g. including the Porteus or Kernel version in the filename, and reflecting that change in the porteus.cfg in your boot/syslinux/

But when you read the cheatcodes.txt you will realize that in fact there are several ways to make a boot-multi-Porteus setup workable, and there is not "one right / best" way doing it and any other are "wrong" ones, just more way to do it. Or in other words: the Free Software way. :D
Cheers!
Yours Rava

Bogomips
Full of knowledge
Full of knowledge
Posts: 2533
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Multiple versions of Porteus

Post#7 by Bogomips » 26 Aug 2015, 14:21

A simple way would be to make your own sign file to replace that supplied, say rara_0.sgn, and then use as boot parameter (cheatcode) sgnfile=rara_0.sgn, the way I understand it.
sgnfile=some_name.sgn

... This cheatcode specifies the *.sgn file which Porteus will
search for. This is useful when you want to store several
Porteus editions on one disk/disc.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Multiple versions of Porteus

Post#8 by Rava » 26 Aug 2015, 20:15

^
Like I said, this is one of the many alternative ways of storing several instances / versions of Porteus, but it not handles the kernel and initrc itself, you still can have just one /boot folder, and in my book the best was to keep them apart is by renaming them, and put the renamed = correct filenames into the porteus.cfg
Cheers!
Yours Rava

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: Multiple versions of Porteus

Post#9 by rara » 26 Aug 2015, 23:21

Thanks Rava, Bogomips once again for additional info. I will give these methods a try and post back. But it won't be fast. I mean I will take a couple days to get through these cycles to learn different ways to get it done and post what works the best for me (for others to possibly learn from).

User avatar
francois
Contributor
Contributor
Posts: 4932
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Multiple versions of Porteus

Post#10 by francois » 27 Aug 2015, 01:55

Extramod cheatcode is another way to achieve your goal. Here is an example with grub legacy menu.lst, an associated desktop manager kde or xfce, is associated with its own save changes folder:

viewtopic.php?f=62&t=946

Code: Select all

title porteus  on sda5 64bit_v30  KDE 
root (hd0,4)
kernel /64bit_v30/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v30 extramod=/mnt/sda5/64bit_v30/kde changes=EXIT:/64bit_v30/kde   login=root
initrd /64bit_v30/boot/syslinux/initrd.xz
boot

title porteus  on sda5 32 BIT v30  XFCE
root (hd0,4) 
kernel /32bit_v30/boot/syslinux/vmlinuz from=/dev/sda5/32bit_v30 extramod=/mnt/sda5/32bit_v30/xfce changes=EXIT:/32bit_v30/xfce login=root 
initrd /32bit_v30/boot/syslinux/initrd.xz
boot
Using the same save folder with different desktop manager did not work for me.
Voltaire: Le mieux est l'ennemi du bien.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2533
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Multiple versions of Porteus

Post#11 by Bogomips » 27 Aug 2015, 14:19

rara wrote: I will give these methods a try and post back. But it won't be fast. I mean I will take a couple days to get through these cycles to learn different ways to get it done and post what works the best for me (for others to possibly learn from).
And when you have done so, do make a tutorial with nice examples of the different methods you have tried, and what you have learnt, in Tutorials. You sound like the kind of chap who would be happy to oblige with some of your time. :)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Re: Multiple versions of Porteus

Post#12 by rara » 28 Aug 2015, 11:13

Thanks for more food for thought, francois.

You can count on it, Bogomips :good:

rara
Black ninja
Black ninja
Posts: 36
Joined: 25 Jul 2015, 01:29
Distribution: Porteus
Location: India

Multiple versions of Porteus - How not to do

Post#13 by rara » 07 Sep 2015, 08:28

Gentlemen (and sweet ladies :evil:),

I'm back with what I have learned try to work this out. I got things to work out, but after learning a lot of ways how not to do it (which is good in a way, because things working right off the bat doesn't teach you a lot). So, here I am gonna share how not to attempt having multiple versions of Porteus run on your computer. I will share how to make it actually work in a tutorial at a later time.

(1) Don't try to install more than one version of Porteus on the same media using the Porteus installer. The Porteus installer isn't designed to resolve complex dependencies. Extract the necessary ISOs and install manually.

(2) Don't try to install more than one version of Porteus in one folder. Even if you manage to get Kernel (vmlinuz) to load, Intial Ram Disk (initrd) may not load. Even if you manage to get Kernel and Intial Ram Disk to load the loading script may have trouble finding the "Signature file" (the one that tells Porteus where to find rest of the OS to load from). Even if you specify the full path to your files in the bootloader configuration file, Porteus may remain unsuccessful at retrieving the files to load.

Further problems to encounter would be - Problems related to Kernel loading "modules" belonging to other versions. Even after resolving all dependencies I figured kernel was loading all modules from all versions. I couldn't find a way to prevent that even after renaming module files differently and altering their sequence.

(3) Don't try to have a common "changes" folder. As mentioned by some seniors members earlier in the thread, it can lead to nasty errors which would be extremely hard to trace. Don't try unless you love fire-fighting.

This is of course applicable to scenarios where you are using "changes" folder rather than "Save file". In case of Save file you won't run into this problem anyway.

(4) Don't try to have nested bootloader configuration files. It makes things unnecessarily complicated. Consolidate your gazillion configuration files into as few as possible. Consolidating bootloader configuration files is harmless and easier from the perspective of maintenance.


That's it for the time being. I will post actual "How to run multiple versions of Porteus" tutorial at a later time.

Senior members, please point out if there are any technical errors in this post.

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Multiple versions of Porteus - How not to do

Post#14 by Rava » 07 Sep 2015, 11:30

rara wrote:after learning a lot of ways how not to do it (which is good in a way, because things working right off the bat doesn't teach you a lot).
Right you are. It might at times be bothering, or even frustrating when you have to spend hours or even days and still it won't work like you want it to.

TL;DR: Off Topic issues with gmail
Currently I cannot access my gmail account using alpine. I just get an email to my non gmail account that tells me I am using outdated software. Trying to post on the google gmail forum also fails. Even being logged into google, there is no "post article" anywhere to be found, also no "Frage posten" as it should be named in the German parts of the help forum... so, I am working on that issue with alpine now for years and still have not managed to get it running...
With gmx, I managed to have alpine as email reader, but still am not able to send any emails via alpine... *le sigh merveilleux*


... In my gmail and gmx case, I don't really learn anything useful when it comes to gmail or google, just that both are partly messed via up setup and non working help... but still, I will fight on... :evil:


Anyhow... back on topic
rara wrote:Senior members, please point out if there are any technical errors in this post.
Everything is fine in your post...

For your tutorial / howto you currently are working on, I am thrilled to see that. Feel free to PM me a template or parts of it when you have questions prior posting the whole thing.

I am especially curious how you will handle the issue by itself, since the Porteus cheatcodes by themselves offer more than one way to have several different Porteus versions on one physical partition...
Cheers!
Yours Rava

Bogomips
Full of knowledge
Full of knowledge
Posts: 2533
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Multiple versions of Porteus - How not to do

Post#15 by Bogomips » 07 Sep 2015, 12:05

rara wrote: Problems related to Kernel loading "modules" belonging to other versions. Even after resolving all dependencies I figured kernel was loading all modules from all versions. I couldn't find a way to prevent that even after renaming module files differently and altering their sequence.
Can you go into this in more detail, and give us a for example?
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Post Reply