Strategies Promoting Inter Desktop Versatility

Technical issues/questions of an intermediate or advanced nature.
Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Strategies Promoting Inter Desktop Versatility

Post#1 by Bogomips » 24 Jul 2016, 12:06

Run from ISO File
This way one is not tied down to a desktop, or version or architecture or even a distro. Space that would have been taken up by an installed system is now freed for Data Storage. Could regard the distro on ISO as stored program which now runs on the computer..Browser profiles can be switched to directories on real filesystems by invoking mozilla browsers with command line argument. This way each distro is kept encapsulated within the ISO live file. The ISO files (write once,read many) and Video files (write once, read once)) can all reside on a partition where journalling not used like ext2 filesystem

PORTEUS

One-off Changes Folder/File
changes-ro

... Keep saved changes in a read-only state. This is useful when
you have your system set up exactly how you like it and do not
want to save any other changes you might make during a live
session. This cheatcode should be used in conjunction with the
'changes=' or 'changes=EXIT:' cheatcodes.
Example: 'changes=/path/file.dat changes-ro'
Boot Parameter (cheatcode) changes
  • changes=EXIT:[/dev/sdXy]/Path/to/<Directory to hold Changes Folder>
    When required setup reached, restart system without changes parameter
  • changes-ro changes=[/dev/sdXy]/Path/to/<Directory to hold Changes Folder>
    Starts up system with saved setup.
However have to have separate changes folder for each architecture. Also, and here am not sure if same changes folder can be used for different versions of same desktop, let alone different desktops. :unknown:

Rootcopy
igreka wrote:Also, I know changes are supposed to be in rootcopy but in my case, Porteus has a changes folder populated instead.
alienbob wrote:rootcopy/ - this directory is empty by default. Anything you (the user of the ISO) add to this directory will be copied verbatim into the filesystem by the init script when the Live OS boots. You can use this feature for instance if you do not want to create a separate squashfs module file for your application configuration files.
This last method of creating module presumably that used by brokenman to set up his system.
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

igreka
White ninja
White ninja
Posts: 29
Joined: 05 Oct 2014, 21:48
Distribution: porteus 3
Location: lincoln

Re: Strategies Promoting Inter Desktop Versatility

Post#2 by igreka » 24 Jul 2016, 12:35

Thanks Bogomips for the clarification on the use of changes-ro.
However have to have separate changes folder for each architecture. Also, and here am not sure if same changes folder can be used for different versions of same desktop, let alone different desktops.
I understand that this 'changes-ro will protect my desired, ideal system configuration from being overwritten later on. But then, how would I go on to save changes to files and folders. Maybe by introducing a second save.dat file that will record new changes using the 'save-changes' script?

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

Re: Strategies Promoting Inter Desktop Versatility

Post#3 by Bogomips » 24 Jul 2016, 15:29

igreka wrote:how would I go on to save changes to files and folders. Maybe by introducing a second save.dat file that will record new changes using the 'save-changes' script?
Don't see why this proccupation with saving changes, when saving changes for the type of processing being done is giving such aggro.

Magic Folders

These essentially map a directory from the live filesystem onto a directory of choice on a real filesystem. Am using this approach for all cache storage of a demanding nature, in order to save space. So, do all important stuff in these folders, and perhaps save-changes for non-critical stuff, in conjunction with changes-ro, or just changes in conjunction with settings module.
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

igreka
White ninja
White ninja
Posts: 29
Joined: 05 Oct 2014, 21:48
Distribution: porteus 3
Location: lincoln

Re: Strategies Promoting Inter Desktop Versatility

Post#4 by igreka » 25 Jul 2016, 17:32

But of course, :wall:

I have been so focused on manipulating save.dat files and session files that I forgot about magic folders. I will map one to my to my /home/guest/, /usr/local/, and wherever it is, MongoDB, and npm save their stuff.

Thanks for the reminders, Bogomips. You just gave me the tools to build a strong system.

By the way, is there an easy way to exclude subfolders from magic folders? For instance, I would want to save my /home/guest/workspace folder but not the /home/guest/workspace/js/node_modules since its content can be dynamically generated and updated.

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

Re: Strategies Promoting Inter Desktop Versatility

Post#5 by Bogomips » 26 Jul 2016, 00:59

igreka wrote:By the way, is there an easy way to exclude subfolders from magic folders? For instance, I would want to save my /home/guest/workspace folder but not the /home/guest/workspace/js/node_modules since its content can be dynamically generated and updated.
Easy provided the right sequence is followed.

CLI Implementation
  • Redirect workspace

    Code: Select all

    guest@porteus:~$ mkdir /mnt/sda6/lm/wsp
    guest@porteus:~$ mkdir workspace
    guest@porteus:~$ sudo mount --bind /mnt/sda6/lm/wsp/  workspace/
    guest@porteus:~$ touch workspace/wk0
    guest@porteus:~$ ls /mnt/sda6/lm/wsp
    wk0
    
  • Create End Directory

    Code: Select all

    guest@porteus:~$ mkdir -p workspace/js/node_modules
    guest@porteus:~$ touch workspace/js/js0
    guest@porteus:~$ ls /mnt/sda6/lm/wsp/js/
    js0  node_modules/
    
  • Redirect End Directory

    Code: Select all

    guest@porteus:~$ mkdir /tmp/nms
    guest@porteus:~$ sudo mount --bind /tmp/nms/  workspace/js/node_modules/
    guest@porteus:~$ touch  workspace/js/node_modules/nm0
    guest@porteus:~$ ls /tmp/nms
    nm0
    
  • Final Structure

    Code: Select all

    guest@porteus:~$ tree workspace/
    workspace/
    ├── js
    │   ├── js0
    │   └── node_modules
    │       └── nm0
    └── wk0
    2 directories, 3 files
    
    guest@porteus:~$ tree  /mnt/sda6/lm/wsp
    /mnt/sda6/lm/wsp
    ├── js
    │   ├── js0
    │   └── node_modules
    └── wk0
    2 directories, 2 files
    
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
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Strategies Promoting Inter Desktop Versatility

Post#6 by francois » 26 Jul 2016, 11:46

Personally, I use the extramod cheatcode for trading between desktops with the same basic porteus installation:
XFCE

Code: Select all

menuentry "porteus on sda6 64bit_v31  XFCE" {
set root=(hd0,6)
linux /64bit_v31/boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31 extramod=/mnt/sda6/64bit_v31/xfce changes=EXIT:/64bit_v31/xfce   login=root
initrd /64bit_v31/boot/syslinux/initrd.xz
}
KDE

Code: Select all

menuentry "porteus on sda6 64bit_v31  XFCE" {
set root=(hd0,6)
linux /64bit_v31/boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31 extramod=/mnt/sda6/64bit_v31/kde changes=EXIT:/64bit_v31/kde   login=root
initrd /64bit_v31/boot/syslinux/initrd.xz
}
You have to create different save changes folders for the different desktop.

This is for a hdd, also called frugal install.

This is a grub 2 entry in /etc/grub.d/40custom.
Prendre son temps, profiter de celui qui passe.

Post Reply