Porteus tips and tricks

Post tutorials, HOWTO's and other useful resources here.
User avatar
Ahau
King of Docs
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

This document has been moved to the main site, please read it here:

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!
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
brokenman
Site Admin
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

I think the first and main point (although obvious to us) would be that it is a live distro. I have seen alot of people ask questions on the old forum about how there is no /etc /dev /root folders on there USB device. Compiling drivers from source could include the noe 'built in' changes-time.sh script by fanthom if there is no DESTDIR variable in the Makefile of the source.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ahau
King of Docs
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

Thanks, brokenman!

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.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
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

@Ahau
"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
Please add [Solved] to your thread title if the solution was found.

GamerGeek

Re: Porteus tips and tricks

Post#5 by GamerGeek » 06 Apr 2011, 00:18

Hey guys, I thing that a description of the changes.dat file definately needs to be added. Such as step by step instructions on how to set it up. This is NOT clear in the cheatcodes.txt file. I am totally new to Linux and trying to build this thing is driving me nuts. My changes are not saving at all and i have unpacked the save256.zip file to the root directory which in my case is J:\ so now I have J:\slaxsave.dat but how do I activate it or whatever. The cheatcodes.txt file just isnt very clear on how it works and which changes= to use. What I want is to set up the changes.dat file the first time I boot up and then never have to change it or load it again. Being a windows user I find the idea of having to type all this stuff out EVERY time I load the OS to be down right redundant and time wasting. Is there a way to do this so that every time I boot it will just automatically know to save my changes ie..ClamAV updates, system changes, file changes, program settings, shortcuts ect... to the changes.dat file? Or do i have to load this goofty thing every time I boot?

User avatar
Ahau
King of Docs
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

Welcome, GamerGeek!

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!
Please take a look at our online documentation, here. Suggestions are welcome!

GamerGeek

Re: Porteus tips and tricks

Post#7 by GamerGeek » 06 Apr 2011, 02:03

Sweet! Now maybe i can get this thing running. :) And get all my modules from Slax working too. :) Thankfully Porteus has ALLOT more stuff built in so all I really only need a few of those modules and all the dependencies. lol It's allot but someone in the Slax forum mentioned just putting the Slax modules into the Modules folder and Porteus would convert them somehow. Not yet clear on this. Gonna boot it and see what happens. I will just boot Always Fresh the first time. :)

GamerGeek

Re: Porteus tips and tricks

Post#8 by GamerGeek » 06 Apr 2011, 03:35

Ok. :) I am now up and running. Well with one minor glitch. I cant get KlamAV to run. I had it working on Slax. I added all the modules to the modules folder and then in Konquerer I converted them to sq4. Once that was complete i activated them. I typed klamav into console and get this error:

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.

User avatar
Ahau
King of Docs
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

that's rather odd...that library comes with the clamav package (according to pkgs.org). Activate your clamav module, then open a console and see if you get anything from:

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!
Please take a look at our online documentation, here. Suggestions are welcome!

GamerGeek

Re: Porteus tips and tricks

Post#10 by GamerGeek » 06 Apr 2011, 07:48

Well i did what you said and came up with nothing. I had read somewhere before that the libraries could become "lost" for lack of a better word when the files were converted. That user used lbconfig and it fixed it. So I did the same and it worked. So I think that has fixed the issue. I am now going to put this to the ultimate test and restart the computer. If everything is still set up the way it is now then I will be thrilled! lol

Thank you very much for your assistance Ahau! :Yahoo!:

User avatar
brokenman
Site Admin
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

Anyone reading in should note that GamerGeek meant to say ldconfig as opposed to lbconfig. ldconfig determines run-time linkbindings between ld.so and shared libraries. Ldconfig scans a running system and sets up the symbolic links that are used to load shared libraries properly. It also creates a cache (/etc/ld.so.cache) which speeds the loading of programs which use shared libraries.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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: Porteus tips and tricks

Post#12 by francois » 30 Apr 2011, 19:26

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!
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:
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.
Prendre son temps, profiter de celui qui passe.

User avatar
Ahau
King of Docs
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

Thanks, francois! I'll add that to the tips and tricks, and post it to the main site as well, sometime in the next week.
Please take a look at our online documentation, here. Suggestions are welcome!

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: Porteus tips and tricks

Post#14 by francois » 01 May 2011, 13:55

@Ahau, citation:

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
Prendre son temps, profiter de celui qui passe.

User avatar
Ahau
King of Docs
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

Thanks, francois. I'll try to clarify that in my final product. The crippled sources module contains the config and header files from the kernel that are needed for compiling drivers and firmware. It does not contain the full kernel source (hence, it is crippled), so it could not be used to compile a new kernel or to compile v-box (which requires the full kernel source). It is extracted by the porteus maintainers for each kernel they release, so for each release of porteus there is a corresponding crippled-sources module. This module is significantly smaller than the full kernel source files.
Please take a look at our online documentation, here. Suggestions are welcome!

Locked