Page 4 of 10

Re: Wishlist for porteus 3.1

Posted: 12 Oct 2014, 04:45
by Ed_P
fanthom wrote:please try it once again.
This code:

Code: Select all

title Porteus 3.0.1 changes=EXIT \n 213MB\n %ISO3% 
find --set-root                       /ISOs/%ISO3%
map --heads=0 --sectors-per-track=0   /ISOs/%ISO3% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISO3% changes=EXIT:/porteus/changes/porteussave.dat extramod=/porteus/modules/ volume=40  
initrd /boot/syslinux/initrd.xz
results in no extramod files found: https://drive.google.com/file/d/0B1Uj3O ... sp=sharing

This code:

Code: Select all

title Porteus 3.0.1 changes=EXIT \n 213MB\n %ISO3% 
find --set-root                       /ISOs/%ISO3%
map --heads=0 --sectors-per-track=0   /ISOs/%ISO3% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISO3% changes=EXIT:/porteus/changes/porteussave.dat extramod=/mnt/sda5/porteus/modules/ volume=40  
initrd /boot/syslinux/initrd.xz
finds all the extramod files: https://drive.google.com/file/d/0B1Uj3O ... sp=sharing

And

Code: Select all

set ISO3=Porteus-RazorQT-v3.0.1-x86_64.iso

== update ==

Views from within the booted Porteus systems:

Code: Select all

guest@porteus:~$ bootmode.sh
Porteus-v3.0.1
quiet from=/ISOs/Porteus-RazorQT-v3.0.1-x86_64.iso changes=EXIT:/porteus/changes/porteussave.dat extramod=/porteus/modules/ volume=40  
guest@porteus:~$ ls /mnt/live/memory/images
000-kernel.xzm/  002-xorg.xzm/   04-firefox.xzm/
001-core.xzm/    003-razor.xzm/  changes/
guest@porteus:~$ 

guest@porteus:~$ bootmode.sh
Porteus-v3.0.1
quiet from=/ISOs/Porteus-RazorQT-v3.0.1-x86_64.iso changes=EXIT:/porteus/changes/porteussave.dat extramod=/mnt/sda5/porteus/modules/ volume=40  
guest@porteus:~$ ls /mnt/live/memory/images
000-kernel.xzm/                   bash-4.2.048-x86_64-2_slack14.1.xzm/
001-core.xzm/                     changes/
002-xorg.xzm/                     flash-plugin-11.2.202.350-x86_64-1gv.xzm/
003-razor.xzm/                    gnupg-1.4.15-x86_64-1.xzm/
04-firefox.xzm/                   jre-7u67-x86_64-1.xzm/
07-printing.xzm/                  keepassx-0.4.3-x86_64-2dj.xzm/
MyWines.xzm/                      kpat-4.10.5-x86_64-bundle.xzm/
Wine-1.7.26-x64-GeckoMono-1.xzm/  testdisk-6.14-x86_64-2sl.xzm/
guest@porteus:~$ 
bootmode.sh

Code: Select all

#!/bin/sh
cat /etc/porteus-version
cat /proc/cmdline

Re: Wishlist for porteus 3.1

Posted: 12 Oct 2014, 15:19
by brokenman
Just checked: extramod=UUID:xxxx/path and it is not working for me.

Re: Wishlist for porteus 3.1

Posted: 12 Oct 2014, 17:09
by fanthom
@Ed_P
give your extramod folder an UNIQUE name. /porteus/modules/ exists in yout ISO and is empty. when you do not provide a full path then script is not able to guess which folder you want and accepts first one which is found.

@brokebnman
checked and works beautifully here with LABEL (uuid was too long to type): so i guess UUID is also ok.

Re: Wishlist for porteus 3.1

Posted: 12 Oct 2014, 17:49
by brokenman
ok, I will check it again. Thanks.

Re: Wishlist for porteus 3.1

Posted: 12 Oct 2014, 18:00
by Ed_P
fanthom wrote:@Ed_P
give your extramod folder an UNIQUE name. /porteus/modules/ exists in yout ISO and is empty. when you do not provide a full path then script is not able to guess which folder you want and accepts first one which is found.
Excellent. :Yahoo!:

Code: Select all

guest@porteus:~$ bootmode.sh
Porteus-v3.0.1
quiet from=/ISOs/Porteus-RazorQT-v3.0.1-x86_64.iso changes=EXIT:/porteus/changes/porteussave.dat extramod=/porteus/Modules/ volume=40  
guest@porteus:~$ ls /mnt/live/memory/images
000-kernel.xzm/                   bash-4.2.048-x86_64-2_slack14.1.xzm/
001-core.xzm/                     changes/
002-xorg.xzm/                     flash-plugin-11.2.202.350-x86_64-1gv.xzm/
003-razor.xzm/                    gnupg-1.4.15-x86_64-1.xzm/
04-firefox.xzm/                   jre-7u67-x86_64-1.xzm/
07-printing.xzm/                  keepassx-0.4.3-x86_64-2dj.xzm/
MyWines.xzm/                      kpat-4.10.5-x86_64-bundle.xzm/
Wine-1.7.26-x64-GeckoMono-1.xzm/  testdisk-6.14-x86_64-2sl.xzm/
guest@porteus:~$ 
Thank you Image fanthom

Re: Wishlist for porteus 3.1

Posted: 12 Oct 2014, 18:19
by brokenman
Confirmed ... working with both UUID and LABEL.

I had pointed it to a folder full of slackware packages. :fool:

Re: Wishlist for porteus 3.1

Posted: 13 Oct 2014, 00:00
by Ed_P
Rava wrote:Off Topic... (kinda)
tome wrote:

Code: Select all

# Get booting device and link to it
bdev=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
pdat=${bdev}
ln -sf $pdat /mnt/bootdevice
it would be better than uuid because it is the same for all devices (uuids are different), I miss it (or similar) in Porteus
I wonder, which code is more streamlined, tome's above or mine:

Code: Select all

awk 'c-->0;/Booting device:/{c=1}' /var/log/porteus-livedbg
Very clever code guys. Image Thanks. :beer:

I've got so much to learn.

Re: Wishlist for porteus 3.1

Posted: 13 Oct 2014, 15:34
by Bogomips
Forcible Deactivation

Didn't get much joy as a question: http://forum.porteus.org/viewtopic.php?f=81&t=3947

But as a wish?

All the more so relevant, following upon the request for bundled modules. :beer:

Re: Wishlist for porteus 3.1

Posted: 13 Oct 2014, 18:07
by brokenman
I guess the only way to deactivate the module in use is to forcefully kill the process in use. The hard part is finding said process in all scenarios.

Re: Wishlist for porteus 3.1

Posted: 13 Oct 2014, 23:05
by fanthom
@Bogomips

run 'init 3' in terminal -> login as root -> deactivate module -> run 'init 4'
if that wont work then only reboot.

Re: Wishlist for porteus 3.1

Posted: 15 Oct 2014, 17:43
by Bogomips
fanthom wrote:run 'init 3' in terminal -> login as root -> deactivate module -> run 'init 4'
if that wont work then only reboot.
Even when it works, it is still somewhat of a disruption of workflow. Last time got into an endless kgreeter loop :(
brokenman wrote:I guess the only way to deactivate the module in use is to forcefully kill the process in use. The hard part is finding said process in all scenarios.
Well, as they say, it takes two to tango. So in short term might be easier to achieve user side. As it's normally a bundle scenario, then all that's required is to explode last package added, go through it and construct list of library files, then iterate against output of lsof, using maybe shellscript or awk, to get list of processes to kill, which should do the trick? 8)

Re: Wishlist for porteus 3.1

Posted: 20 Oct 2014, 21:10
by Rava
Ed_P wrote:Very clever code guys. Image Thanks. :beer:

I've got so much to learn.
That is the neat thing with shell scripting, it always starts easy, and can get more and more complex, but the results also get more and more awesome...

But it took me a while to get that snipped of code working as I needed it, it was not done and finished in just some seconds. I just am currently not coding as much as I used to do, just my own little scripts once in a while... and you get rusty when not coding... RL has it's toll on me, like it has on all of us....

Sadly, I got no reply on that part:
Rava wrote:I wonder, which code is more streamlined, tome's above or mine:
:cry:

Or did I just miss that answer?

Cause I really am thrilled to learn which snipped is the better one, and especially: why.
(Or maybe an even better 3rd solution, or a mixed solution that has parts of his and parts of my code that takes the cake, streamlined / efficiency-wise)

___________________________________________

Back on topic: I wish the names of modules all to have 3 numbers. Like the main module have, starting from 000.

E.g. 05-devel.xzm 06-abiword.xzm or 07-printing.xzm are breaking that naming convention. Why not name them something that fits in that "nnn-" scheme, "n" meaning here a "number", of course.

Re: Wishlist for porteus 3.1

Posted: 20 Oct 2014, 21:53
by Bogomips
Modified Wish

A deactivate that takes as an argument a file with a list of PIDs to kill, before attempting deactivation.

Re: Wishlist for porteus 3.1

Posted: 20 Oct 2014, 22:38
by Rava
Modified Bogomips Wish:

Deactivate like now, with naming the processes that still use the module, but with added PID to kill of someone wants to do so. With warning in bold and red that killing programs could cause system instability, data loss and that jazz...

Re: Wishlist for porteus 3.1

Posted: 21 Oct 2014, 01:36
by Bogomips
Rava wrote:Modified Bogomips Wish:

Deactivate like now, with naming the processes that still use the module, but with added PID to kill of someone wants to do so. With warning in bold and red that killing programs could cause system instability, data loss and that jazz...
No need to complicate situation. This deactivate would be used only by those aware of the risks, and who would already have saved data in jeopardy. All processes would be lost anyway, should one have to reboot.

However on the upside, just run scanner, constructing list of PIDs requiring killing, hand over to deactivate, module freed and no relevant processes lost. Should it prove viable, then could be extended from just one package to an entire bundle. Would mean bundles could be inserted and removed with ease. (For starters to minimise risk while proving viability would be sensible to be in always fresh mode with copy to ram and without changes file, as I normally run)