Page 1 of 1

Release Transition Trials

Posted: 20 Nov 2014, 19:31
by Bogomips
Running AF. Have porteus on 2 partitions of hdd, as matter of security. One partition has nvidia driver, the other not. As it came through to 3.0.1, out of precaution kept most of release modules in sub-directory of optional, while trying them out. So when 3.1rc1 came along, decided to clear out porteus directory(without nvidia driver), and to use this directory for testing. Going about this, just had a moment's lapse of concentration and zapped base in current porteus directory. Luckily had most of required modules in 3.0.1 folder, and retrieved situation by hard linking relevant modules to base. Only needed to copy one module across from fall-back directory.

Following this harrowing experience, been keeping modules for each release in sub-directory of optional, and just hard linking them to base, at least until today. Wishing to switch DE from kde to mate, appended to kernel command line noload=kde and load=mate. 003-mate.xzm had already been hard linked from release sub-directory to optional, so it was quite unexpected to see in porteus-livedbg that 003-mate.xzm was loaded three times into ram.

Code: Select all

# Modules activated during boot time:
/memory/copy2ram/000-kernel.xzm
/memory/copy2ram/001-core.xzm
/memory/copy2ram/002-xorg.xzm
/memory/copy2ram/sudo-1.8.9p5-i486-1.xzm
/memory/copy2ram/003-mate.xzm
/memory/copy2ram/003-mate.xzm
/memory/copy2ram/003-mate.xzm
Possible explanation: loaded from optional, then from optional/rc1 and then optional/rc2.

However shouldn't have made any difference that 003-mate.xzm was loaded from both sub-directory rc1 and rc2, as 003-mate.xzm has not changed between these two releases.

Code: Select all

loop0     7:0    0    16M  0 loop /mnt/live/memory/images/000-kernel.xzm
loop1     7:1    0    46M  0 loop /mnt/live/memory/images/001-core.xzm
loop2     7:2    0  43.7M  0 loop /mnt/live/memory/images/002-xorg.xzm
loop3     7:3    0   528K  0 loop /mnt/live/memory/images/sudo-1.8.9p5-i486-1.xz
loop4     7:4    0  56.5M  0 loop /mnt/live/memory/images/003-mate.xzm
loop5     7:5    0  29.6M  1 loop /mnt/live/memory/images/ImM_180914.xzm
Apparently something like find seems to be used to retrieve these modules (no maxdepth limitation).

I know one can have multiple versions on the same partition, but that only increases the room for error, especially when there is very little difference between the directories. As it is, with just two almost similar directories on different partitions, managed to clobber wrong porteus directory, although sight of a settings module should have got me thinking: wrong partition.

Reckon now on having fairly fail-safe method. Made directory version to hold sub-directories with modules from each release. Then to switch releases, it's just a matter of two statements. Say switching to release 3.1rc2:

Code: Select all

rm base/*
ln version/3.1rc2/00?-*.xzm base
Now, having learnt that a recursive search of optional is made, all optional modules pertinent to a release can now be linked into a release sub-directory of optional, like say optional/rc2, thereby reducing probability of error..

Re: Release Transition Trials

Posted: 20 Nov 2014, 21:26
by brokenman
Or try: noload=kde load=rc2/003-mate or the extramod cheatcode.

Check /mnt/live/linuxrc (05-devel.xzm) for the find method. From memory it is 'locate' being used.
EDIT: It is indeed a find command with no maxdepth. The above string should work fine.

Re: Release Transition Trials

Posted: 20 Nov 2014, 22:38
by Bogomips
brokenman wrote:Or try: noload=kde load=rc2/003-mate or the extramod cheatcode.
Thanks. Suspect with noauto extramod is nogo. :( rammod looks like a possibility, but looks too complicated. So left with load=rc2/003-mate which certainly seems worth a try.

Re: Release Transition Trials

Posted: 21 Nov 2014, 08:29
by fanthom
no maxdepth is intended so you can build whole tree of deps (placed in a folders) if you want.

Re: Release Transition Trials

Posted: 23 Nov 2014, 00:21
by Bogomips
Summing Up optional

load=<substring of pathname>
  1. Doesn't work
    load=/Path to/?*<string>
    or in RE notation
    load=/Path to/^.+<string>.*
    • Works
      load=/Path to/<string>*
      or in RE notation
      load=/Path to/^<string>.*
    Example:

    Code: Select all

    guest@porteus:~$ tree optional
    optional
    ├── 3.1
    │   └── opt
    │       ├── 003-lxqt.xzm
    │       ├── 003-mate.xzm
    │       └── 003-xfce.xzm
    └── rc1
        └── 003-mate.xzm
    3 directories, 4 files
    
        1. Doesn't work
          load=3.1/opt/mate
          • Works
            load=3.1/opt/003-mate
        2. Various Boots
          1. Code: Select all

            guest@porteus:~$ grep command /var/log/dmesg
            [    0.000000] Kernel command line: quiet copy2ram ramsize=30% noauto timezone=Europe/London volume=60% noload=kde load=3.1/opt/003-m
            # Modules activated during boot time:
            /memory/copy2ram/000-kernel.xzm
            /memory/copy2ram/001-core.xzm
            /memory/copy2ram/002-xorg.xzm
            /memory/copy2ram/sudo-1.8.9p5-i486-1.xzm
            /memory/copy2ram/003-mate.xzm
            
            • Code: Select all

              guest@porteus:~$ grep command /var/log/dmesg 
              [    0.000000] Kernel command line: quiet copy2ram ramsize=30% noauto timezone=Europe/London volume=60% noload=kde load=t/003-m
              guest@porteus:~$ cat /var/log/porteus-livedbg 
              ...
              # Modules activated during boot time:
              /memory/copy2ram/000-kernel.xzm
              /memory/copy2ram/001-core.xzm
              /memory/copy2ram/002-xorg.xzm
              /memory/copy2ram/sudo-1.8.9p5-i486-1.xzm
              /memory/copy2ram/003-mate.xzm
              
              • Code: Select all

                guest@porteus:~$ grep command /var/log/dmesg 
                [    0.000000] Kernel command line: quiet copy2ram ramsize=30% noauto timezone=Europe/London volume=60% noload=kde load=t/003-x
                root@porteus:/home/guest# activate p4/mods/ImgMgk_241014.xzm 
                Updating shared library links:  /sbin/ldconfig
                guest@porteus:~$ ls -1 /mnt/live/memory/images/
                000-kernel.xzm/
                001-core.xzm/
                002-xorg.xzm/
                003-xfce.xzm/
                
                • Code: Select all

                  guest@porteus:~$ grep command /var/log/dmesg 
                  [    0.000000] Kernel command line: quiet copy2ram ramsize=30% noauto timezone=Europe/London volume=60% noload=kde load=l/3.1/opt/003-x
                  loop0     7:0    0    16M  0 loop /mnt/live/memory/images/000-kernel.xzm
                  loop1     7:1    0    46M  0 loop /mnt/live/memory/images/001-core.xzm
                  loop2     7:2    0  43.7M  0 loop /mnt/live/memory/images/002-xorg.xzm
                  loop3     7:3    0   528K  0 loop /mnt/live/memory/images/sudo-1.8.9p5-i486-1.xz
                  loop4     7:4    0  24.6M  0 loop /mnt/live/memory/images/003-xfce.xzm
                  

              Re: Release Transition Trials

              Posted: 23 Nov 2014, 12:26
              by brokenman
              It uses find command which is piped to grep. You will need to use a string that is found in the output of this.

              3.1/opt/003-mate
              1/opt/003
              opt/003-ma
              3-m

              Re: Release Transition Trials

              Posted: 23 Nov 2014, 19:25
              by Bogomips
              brokenman wrote:1/opt/003
              3-m
              Why these two strings, did not quite understand, as they did not look unique.

              Anyway, tried them out:
              • Code: Select all

                guest@porteus:~$ grep command /var/log/dmesg 
                [    0.000000] Kernel command line: quiet copy2ram ramsize=30% noauto timezone=Europe/London volume=60% noload=kde load=1/opt/003
                
                guest@porteus:~$ cat /var/log/porteus-livedbg 
                ...
                # Modules activated during boot time:
                /memory/copy2ram/000-kernel.xzm
                /memory/copy2ram/001-core.xzm
                /memory/copy2ram/002-xorg.xzm
                /memory/copy2ram/sudo-1.8.9p5-i486-1.xzm
                /memory/copy2ram/003-lxqt.xzm
                /memory/copy2ram/003-mate.xzm
                /memory/copy2ram/003-xfce.xzm
                
                guest@porteus:~$ ls -1 /mnt/live/memory/images/
                000-kernel.xzm/
                001-core.xzm/
                002-xorg.xzm/
                003-lxqt.xzm/
                003-mate.xzm/
                003-xfce.xzm/
                sudo-1.8.9p5-i486-1.xzm/
                
                guest@porteus:~$ df -h .
                Filesystem      Size  Used Avail Use% Mounted on
                aufs            265M  964K  264M   1% /
                guest@porteus:~$ free -m
                             total       used       free     shared    buffers     cached
                Mem:           880        621        259          0         61        391
                -/+ buffers/cache:        168        712
                Swap:          126          0        126
                
                • Code: Select all

                  guest@porteus:~$ grep command /var/log/dmesg 
                  [    0.000000] Kernel command line: quiet copy2ram ramsize=30% noauto timezone=Europe/London volume=60% noload=kde load=3-m
                  
                  guest@porteus:~$ cat /var/log/porteus-livedbg 
                  ...
                  # Modules activated during boot time:
                  /memory/copy2ram/000-kernel.xzm
                  /memory/copy2ram/001-core.xzm
                  /memory/copy2ram/002-xorg.xzm
                  /memory/copy2ram/sudo-1.8.9p5-i486-1.xzm
                  /memory/copy2ram/003-mate.xzm
                  /memory/copy2ram/003-mate.xzm
                  
                  guest@porteus:~$ ls -1 /mnt/live/memory/images/
                  000-kernel.xzm/
                  001-core.xzm/
                  002-xorg.xzm/
                  003-mate.xzm/
                  sudo-1.8.9p5-i486-1.xzm/
                  
                  guest@porteus:~$ df -h .
                  Filesystem      Size  Used Avail Use% Mounted on
                  aufs            265M  1.7M  263M   1% /
                  guest@porteus:~$ free -m
                               total       used       free     shared    buffers     cached
                  Mem:           880        537        342          0         56        322
                  -/+ buffers/cache:        158        721
                  Swap:          126          0        126
                  

                Re: Release Transition Trials

                Posted: 23 Nov 2014, 21:38
                by brokenman
                Why these two strings, did not quite understand, as they did not look unique.
                This was to show that both will work. The first (1/opt/003) will only load one mate module, the one in 3.1/opt/003-mate because this path contains the string.
                The second will load every module in optional that contains the string "3-m" such as 003-mate.xzm. So (as fanthom mentioned) you can put all of your stuff in one folder called mystuff and then use the cheat load=mystuff

                Re: Release Transition Trials

                Posted: 25 Nov 2014, 16:12
                by Bogomips
                brokenman wrote:you can put all of your stuff in one folder called mystuff and then use the cheat load=mystuff
                The reason being that every file will have mystuff in its pathname? For that matter, if understood correctly, one could stick a whole load of files and directories in optional, if one was so minded, and then with load=opt[ional] or even load=/, every xzm will be loaded.

                Re: Release Transition Trials

                Posted: 25 Nov 2014, 18:28
                by brokenman
                While I haven't tried this, in theory it would work.

                Re: Release Transition Trials

                Posted: 25 Nov 2014, 20:20
                by tome
                If I remember correctly, it depends also on bootloader, for example grub2 treats differently load= and/or noload= cheatcode than another bootloaders, must be probably load=;mod1;mod2; or similar (additional semicolons).

                Re: Release Transition Trials

                Posted: 26 Nov 2014, 00:23
                by Bogomips
                brokenman wrote:While I haven't tried this, in theory it would work.
                • Code: Select all

                  guest@porteus:~$ tree porteus/optional/
                  porteus/optional/
                  ├── 3.1
                  │   └── opt
                  │       ├── 003-lxqt.xzm
                  │       ├── 003-mate.xzm
                  │       └── 003-xfce.xzm
                  ├── Oku_230814.xzm
                  └── rc1
                      └── 003-mate.xzm
                  3 directories, 5 files
                  
                  • Code: Select all

                    guest@porteus:~$ grep command /var/log/dmesg 
                    [    0.000000] Kernel command line: quiet copy2ram ramsize=30% noauto timezone=Europe/London volume=60% noload=kde load=/
                    
                    guest@porteus:~$ grep xzm /var/log/porteus-livedbg 
                    /memory/copy2ram/000-kernel.xzm
                    /memory/copy2ram/001-core.xzm
                    /memory/copy2ram/002-xorg.xzm
                    /memory/copy2ram/sudo-1.8.9p5-i486-1.xzm
                    /memory/copy2ram/003-lxqt.xzm
                    /memory/copy2ram/003-mate.xzm
                    /memory/copy2ram/003-xfce.xzm
                    /memory/copy2ram/Oku_230814.xzm
                    /memory/copy2ram/003-mate.xzm
                    
                    guest@porteus:~$ ls -1 /mnt/live/memory/images/
                    000-kernel.xzm/
                    001-core.xzm/
                    002-xorg.xzm/
                    003-lxqt.xzm/
                    003-mate.xzm/
                    003-xfce.xzm/
                    Oku_230814.xzm/
                    sudo-1.8.9p5-i486-1.xzm/
                    
                    guest@porteus:~$ ps -e
                    ...
                     2743 ?        00:00:00 xfsm-shutdown-h
                     2748 ?        00:00:00 xfce4-terminal
                     2753 ?        00:00:00 gnome-pty-helpe
                     2754 pts/0    00:00:00 bash
                     2766 ?        00:00:03 mousepad
                     2779 ?        00:00:00 kworker/0:0
                     2780 pts/0    00:00:00 ps
                    
                    • Code: Select all

                      guest@porteus:~$ free -m
                                   total       used       free     shared    buffers     cached
                      Mem:           880        617        262          0         60        406
                      -/+ buffers/cache:        149        730
                      Swap:          644          0        644
                      
                      guest@porteus:~$ df -h .
                      Filesystem      Size  Used Avail Use% Mounted on
                      aufs            265M  944K  264M   1% /
                      
                    Grub 1 Bootloader

                    Re: Release Transition Trials

                    Posted: 11 Dec 2014, 20:54
                    by Bogomips
                    Transition to 3.1 Proper

                    This time being more cautious, did what should have been done last time,

                    Code: Select all

                    sudo mount -r /dev/sda5 /mnt/sda5
                    while copying over files to /mnt/sda6, to host the 3.1 release.

                    Anyway, in eagerness to savour the new release did not check .sgn file used in rc2 release. Just booted without changing anything in bootloader, including kernel command line, keeping fingers crossed. Landed in desired partition /dev/sda6. Only later as afterthought, checked .sgn file of rc2 release, which unexpectedly has same name as that of 3.1 release. So, puzzling is, how system decided to load from 3.1 partition, even though on /dev/sda6, coming after rc2 partion on /dev/sda5?

                    Incidentally also had an nvidia.sgn file on sda6, but don't think system would be that clever to check for nvidia driver. :roll:

                    Re: Release Transition Trials

                    Posted: 11 Dec 2014, 23:54
                    by brokenman
                    Difficult to know for certain without seeing your /proc/cmdline but most probably it is because when no direction is given regarding where to boot from, linuxrc will search (in reverse order) in /mnt until it finds the .sgn file.

                    sda7
                    sda6
                    sda5

                    Re: Release Transition Trials

                    Posted: 12 Dec 2014, 08:04
                    by fanthom
                    correct - linuxrc searches in reverse alphabetical order. this way removable media will be first.