Porteus tips and tricks
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Porteus tips and tricks
Post#1 by Ahau » 09 Mar 2011, 16:13
http://porteus.org/info/docs/45-other/1 ... ricks.html
Feel free to continue discussing this document, ask questions, or suggest changes in this thread.
Thanks!
Ahau
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Porteus tips and tricks
Post#2 by brokenman » 09 Mar 2011, 20:31
Wear your underpants on the outside and put on a cape.
brokenman
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Porteus tips and tricks
Post#3 by Ahau » 09 Mar 2011, 20:45
I might need more info on the no DESTDIR variable/script issue, since I've never had to do that. Is that so that you can compile a driver and specify a 'fake root' folder, to easily turn it into a module?
regarding the live distro element, I was thinking about starting with a paragraph about that--how you have your 'live' files, and your 'dead' files (maybe there's a better word for that) that are used to create your live system. It may be confusing for some, when they are told, "you could add it to rootcopy. Or put it in the live system, if you have saved changes. Or make a module, or extract a base module, put it there, and rebuild it. Or, hell, just use a magic folder". There are many ways to do the same thing. That is great for experienced users who like the flexibility, but it is confusing for newbies.
Ahau
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Porteus tips and tricks
Post#4 by fanthom » 12 Mar 2011, 23:55
"Is that so that you can compile a driver and specify a 'fake root' folder, to easily turn it into a module?"
yes - after 'make install' all files are copied to the specified folder and not the '/'
TIPS:
1) when your pc has usb port but it's BIOS does not support booting from it directly, then you can split your porteus installation as follows:
- /boot folder on CD
- /porteus folder on usb stick
now you can boot from CD and linuxrc script will find /porteus folder on the pendrive

all cheatcodes like 'from_dev', 'from_dir=', 'changes=' does apply here as in normal usb installation.
2) to enable pre-configured (thanks to Tomas M) firewall in Porteus at every boot just add following line to /etc/rc.d/rc.local:
'/etc/rc.d/rc.Firewall start'
3) porteus has some aliases set in ~/.bashrc (home directory). good to know that they exist so you can use them in console

4) porteus has some nice cli utilities which may be forgotten or never find by the users. this is the list with short description:
changes-time.sh - more info: http://forum.porteus.org/viewtopic.php?f=39&t=132
chkbase.sh - let you check if main porteus components (kernel, initrd, all modules from /porteus/base) have correct md5sum after copying to another media. useful when you are not using standard porteus installers (they have this function built in).
fromdos/todos - cli utils which converts documents between windows/unix formatting
mloop - great tool by brokenman (i use it even on gentoo) for mounting modules/iso/initrd/dat files on a loop device. just use it to find more info.
modtools.sh - cli version of famous 'module utilities'
pxe-boot - run this short script to start PXE boot services. useful when you did not choose 'PXE boot option' at the start and dont want to reboot.
save-changes - dump whole changes from the live session into a module
update_module - more info: http://forum.porteus.org/viewtopic.php?f=39&t=252
5) Porteus has a special 'GUI helper' script /opt/porteus-scripts/paths (we could change this name as is irrelevant now) which is launched by lxde/kde autostart and does some configurations of the X environment automatically. among the other functions it sets '.terminal' and '.browser' symlinks in /tmp which are used by some porteus scripts like: language-selection-tool, power-saver, porteus-encrypter, etc..
If you can't launch for example 'magic folders' and using non standard browser/terminal (or prefer one over another) just edit /opt/porteus-scripts/paths script to get it working in your favorite application.
6) while logged into LXDE desktop use 'who rememember which?' key combination to start dmenu application - its like krunner in KDE.
7) KDE file managers (konqueror/dolphin) have added extra service menus specific to Porteus only. all what you need to do is to do right mouse click on a certain file type to get an option for an extra action:
- folders: you can build porteus module from it
- modules: you can extract it to a folder; mount it to a folder (same function as 'mloop' utility); convert lzm->xzm (32bit only)
- tgz/txz slackware packages: you can convert it to xzm; install/uninstall directly to/from live system
- rpm packages: convert to xzm
- deb packages: convert to xzm
This is it for now. will post more if something comes to my mind.
(Ahau - while creating the DOC please fix my eng)
Cheers
fanthom
Re: Porteus tips and tricks
Post#5 by GamerGeek » 06 Apr 2011, 00:18
GamerGeek
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Porteus tips and tricks
Post#6 by Ahau » 06 Apr 2011, 01:25
Yes, it does take a little getting used to. Our 'save.dat' documentation for Version 1 is much improved over V09, and in fact, as of V1.0, porteus can create a save.dat container during the bootup procedure, to help streamline the process.
For V09, you need to press TAB at the SYSLINUX boot menu, and type 'changes=slaxsave.dat' (leave out the quotes), assuming your .dat container is in the root directory of your flashdrive (not inside any subdirectories within the drive). Then press enter to boot up. If that works for you, you can edit the file /boot/porteus.cfg on your flash drive to include the 'changes=slaxsave.dat' cheatcode in the APPEND line for the option you use to boot (probably the first boot option). that way, you won't have to type it every time you boot up.
See "Appendix B" of the official Porteus installation guide, for more info. A rough draft of that doc can be found here: http://www.forum.porteus.org/viewtopic. ... t=10#p1527
this doc will ship with V 1.0 in the start_here.sh script, and there will be a finalized version posted on the forum and on the main website as soon as V 1.0 final is released.
Thanks!
Ahau
Re: Porteus tips and tricks
Post#7 by GamerGeek » 06 Apr 2011, 02:03



GamerGeek
Re: Porteus tips and tricks
Post#8 by GamerGeek » 06 Apr 2011, 03:35

root@porteus:~# klamav
klamav: error while loading shared libraries: libclamav.so.6: cannot open shared object file: No such file or directory
I also tried freshclam so I could update the definitions and got this error:
root@porteus:~# freshclam
freshclam: error while loading shared libraries: libclamav.so.6: cannot open shared object file: No such file or directory
I do have this module, 2772-libclamav6.sq4.lzm, but its apparently not the same. Here is the link to the original.
http://www.slax.org/modules.php?action=detail&id=2772
I cannot find the module libclamav.so.6 anywhere.

I am running KlamAV 0.46, ClamAV 0.95.2, ClamAV-freshclam 0.95.2, clamav-daemon 0.94. All were gotten from slax.org/modules and converted to sq4.
I hope this is enough info. lol Let me know if more is needed.
GamerGeek
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Porteus tips and tricks
Post#9 by Ahau » 06 Apr 2011, 05:41
ls /lib | grep libclamav
ls /usr/lib | grep libclamav
If you get something there that almost matches libclamav.so.6, then probably what happened is you converted modules that were sitting in your /modules or /optional folder on your flash drive, formatted with FAT. The modules would have been extracted into that folder, and symlinks that point to the libraries were destroyed before the module got put back together in sq4 format.
If that is the case, copy the original slax modules to a location in your live filesystem (e.g. /root/Desktop), convert them to sq4, and then copy the new modules to /porteus/modules or /porteus/optional.
Glad you got it up and running!
Ahau
Re: Porteus tips and tricks
Post#10 by GamerGeek » 06 Apr 2011, 07:48
Thank you very much for your assistance Ahau!

GamerGeek
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Porteus tips and tricks
Post#11 by brokenman » 10 Apr 2011, 23:44
Wear your underpants on the outside and put on a cape.
brokenman
- francois
- Contributor
- Posts: 6514
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Re: Porteus tips and tricks
Post#12 by francois » 30 Apr 2011, 19:26
Hi Ahau, could you reedit you first post to mention the copy2ram cheatcode in some way, as we have it. It could be useful for dissemination of porteus on the net:Ahau wrote:Hi all,
I’m working on compiling a list of useful information about Porteus, to live here on the forum and on the main website as a doc. ...
... One can utilize cheatcodes (see cheatcodes.txt inside the porteus/ folder on your CD), such as ‘noload=kde’ to make the system boot into LXDE faster, or ‘extramod=/path/to/mod’ to load modules from a hard drive, usb drive, etc. You can also extract the .iso file for the CD, make modifications, add modules, etc., and remaster a new .iso (using make_iso.bat or make_iso.sh inside the /porteus folder), and burn that to a CD, for your own customized version...
Thanks!
http://forum.porteus.org/viewtopic.php? ... 3036#p3036
I am looking for a reference to mention that we have this feature in porteus as well. I would use this post as a citation so that we appear in Wikipedia's List of Linux distributions that run from RAM:
Lightweight Linux distribution: Distributions described as lightweight
In addition, in the recent CD's the cheatcodes.txt appear now in /boot/docs, is it possible to take into account of this modification in the first post of this thread.
Naturally, these are only suggestions.
francois
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Porteus tips and tricks
Post#13 by Ahau » 30 Apr 2011, 22:59
Ahau
- francois
- Contributor
- Posts: 6514
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Re: Porteus tips and tricks
Post#14 by francois » 01 May 2011, 13:55
Compiling drivers from source -- If you have hardware that is not supported by porteus out of the box, you may need to compile a driver from source. Some of these drivers need access to the kernel configuration files, which are not included in porteus by default (to reduce the size of the porteus .iso). In order to compile these drivers, you will first need to download the ‘crippled sources’ module for your version of porteus (e.g. ‘crippled_sources-porteus-v-1.0_beta-x86_64-1ftm.xzm), and activate it. This will insert the kernel source/config files in /usr/src/. Then, you’re ready to compile the driver per the ‘readme’ instructions included with the source code.
*****************************************************************************************************
I am not used to the term crippled source. Really excuse my ignorance. Are we talking about kernel headers and kernels sources proper to the last edition of the kernel? If this is the case maybe we should give these as a synonym. In addition people have to know, at least those naive to linux, that compilation of drivers has to be done as root.
For example, here is a thread explaining how to compile virtual box so to get linux guest additions and Xorg.conf file:
http://forums.virtualbox.org/viewtopic.php?t=15679
Thanks
francois
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Porteus tips and tricks
Post#15 by Ahau » 01 May 2011, 17:02
Ahau