Page 1 of 1

Creating my own Porteus !

Posted: 12 Oct 2014, 21:32
by r004
I am trying to customizing the Porteus for my needs and I want to know how could I make that happen.
From how to manage the fstab partition down to making modules and loading them on boot.
A recepie If you wish to call it. I want to build Poertues from the ground up.
I would be garetful if you developers spend sometime and drop a tip or two to make a working handook for this job.
TNX

Re: Creating my own Porteus !

Posted: 12 Oct 2014, 22:28
by fanthom
i may sound rude but this is actually the truth:
devs do not have a time to train every random person coming to this board just to find that the person is gone after a year or two (probably starting his own project or quitting linux adventure completely).

to be at least somewhat helpful:
everything is in clear text so start from unpacking initrd and studying linuxrc. once done move to /etc/inittab -> /etc/rc.d/rc.* scripts.

sorry but this is all what i can give.
maybe neko, tome, donald or other advanced users will be able to help more.

Re: Creating my own Porteus !

Posted: 13 Oct 2014, 01:13
by r004
Hello again;
I understand, but if it means anything for you I doesn't think about launching my own project. (how many livecd we need !).
I am a gentoo user for 7 years and I know something about linux ( :sorry: ).
I was answered here before as "You are stretch thin". so use me for some mediocre jobs to lighten the load. :D
but comes hell and hot water I build Proteus of my own. LOL

Re: Creating my own Porteus !

Posted: 13 Oct 2014, 03:04
by francois
Porteus!

Re: Creating my own Porteus !

Posted: 13 Oct 2014, 03:59
by fanthom
I was answered here before as "You are stretch thin". so use me for some mediocre jobs to lighten the load.
so there is no point to learn everything from the ground. Porteus is not the best for this as our documentation is lacking. i would go with LFS instead.

if you want to do something on the Porteus ground then maybe try to create E17 desktop you were asking before. it's easy:
a) grab one of our ISOs (does not matter which one as core modules are shared)
b) add development module to it so you can compile stuff
c) remove 003-xxx.xzm module from it
d) compile E17 on top of 000/001/002/05-devel
e) strip unneeded files from your desktop module (i can share sample scleanup script i have recently created for LxQT)
f) make your work public so people can give it a go, report bugs and suggest improvements

if you want to find out more how modules are created please have a look here:
http://www.porteus.org/info/category/9-modules.html

good luck!

Re: Creating my own Porteus !

Posted: 13 Oct 2014, 13:58
by francois
You can have a try on xfce desktop too, just for practice:
http://forum.porteus.org/viewtopic.php? ... ilit=+xfce

Re: Creating my own Porteus !

Posted: 15 Oct 2014, 22:02
by freestyler
fanthom wrote:
e) strip unneeded files from your desktop module (i can share sample scleanup script i have recently created for LxQT)
Would love to see your script :)

Re: Creating my own Porteus !

Posted: 17 Oct 2014, 01:03
by rollingscissors
Hello r004,

You're on the right track for making your own Porteus. I've made my own versions for personal use and also periodically put out MOFO Linux for others who have a need for easy use of VPNs and other similar tools. If you want some amusement, have a look at the older versions of Porteus that I used, and the corresponding MOFOs. You'll see that most of the customization involved extracting files from the base modules, then building new versions and adding more software I compiled from source code.

Right now, I'm working on version 3, and have hit a wall getting certain encryption to work. The time has come to work on the kernel, or replace it, and I'm getting my hands dirty in initrd and such places. If you get into this sort of work, I suggest keeping a couple of backups in case you encounter a complex situation involving multiple packages that don't play well together.

There's a large body of knowledge regarding Ubuntu remasters, but Porteus is the cat's meow: lightweight, modern, pretty, and capable. So good luck with your remastering efforts.

Re: Creating my own Porteus !

Posted: 17 Oct 2014, 08:40
by fanthom
@freestyler

more than likely it will require tweaking in case you are building your own version of LXQt:

Code: Select all

#!/bin/bash

# Determine arch:
if ls var/log/packages | grep -q x86_64; then
    arch=64
    lib=lib64
else
    arch=32
    lib=lib
fi

# Custom porteus tweaks:
sed -i 's/Icon=gparted/Icon=partitionmanager/g' usr/share/applications/gparted.desktop
sed -i 's/;Utility;/;Office;/g' usr/share/applications/leafpad.desktop
sed -i 's/Categories=Help/Categories=Settings;Help/g' usr/share/applications/lxqt-about.desktop
sed -i 's/;Utility;/;System;/g' usr/share/applications/luckybackup.desktop
sed -i 's/Utility;//g' usr/share/applications/lximage-qt.desktop
rm -rf usr/share/applications/luckybackup-*.desktop
rm -rf usr/share/applications/qtconfig.desktop
rm -rf usr/share/applications/qasconfig.desktop
rm -rf usr/share/applications/qashctl.desktop

# Remove unnecessary stuff:
rm -rf etc/X11/Sessions
rm -rf etc/env.d
rm -rf usr/info/*
rm -rf usr/doc/*
rm -rf usr/man/man2
rm -rf usr/man/man3
rm -rf usr/man/man4
rm -rf usr/man/man6
rm -rf usr/man/man9
rm -rf usr/man/mann
rm -rf usr/$lib/gnome-keyring/devel/*
rm -rf usr/$lib/qt/phrasebooks/*
rm -rf usr/$lib/qt/tests
rm -rf usr/libexec/gvfsd-recent
rm -rf usr/share/applications/mimeinfo.cache
rm -rf usr/share/devhelp/*
rm -rf usr/share/doc
rm -rf usr/share/gnome/*
rm -rf usr/share/gnome-session/*
rm -rf usr/share/gtk-doc/*
rm -rf usr/share/help/*
rm -rf usr/share/icons/oxygen/128x128
rm -rf usr/share/icons/oxygen/256x256
rm -rf usr/share/icons/hicolor/128x128
rm -rf usr/share/icons/hicolor/192x192
rm -rf usr/share/icons/hicolor/256x256
rm -rf usr/share/icons/hicolor/512x512
rm -rf usr/share/lxqt/themes/ambiance
rm -rf usr/share/lxqt/themes/a-mego
rm -rf usr/share/lxqt/themes/green/just_green_curls_reverse.png
rm -rf usr/share/lxqt/themes/green/just_green_curls.png
rm -rf usr/share/qpdfview/*.html
rm -rf usr/share/qpdfview/*.svg
rm -rf usr/share/slim/themes/default/background.jpg
rm -rf usr/share/speedcrunch/books/*
rm -rf usr/bin/oxygen-gtk-demo
rm -rf usr/src/*
rm -rf var/log/scripts/*
rm -rf var/log/setup/*

# Fix man:
cp -a usr/share/man usr 2>/dev/null && rm -rf usr/share/man

# Strip qt:
for x in assistant designer pixeltool qcollectiongenerator qdbusviewer qdoc3 qhelpconverter qhelpgenerator qmlplugindump qmlviewer qt3to4 qttracereplay; do rm usr/bin/$x usr/$lib/qt/bin/$x; done
rm usr/$lib/libQtDesigner* usr/$lib/qt/lib/libQtDesigner*
rm usr/$lib/libQtHelp* usr/$lib/qt/lib/libQtHelp*
rm usr/$lib/qt/plugins/designer/*

# Strip transmission:
pushd usr/bin && ls transmission* | grep -v qt | xargs rm && popd

# Set default perms, extract compressed files, strip debugging symbols:
echo "Changing permissions..."
find ./ -type d | xargs chmod -v 755 >/dev/null 2>&1
echo "Extracting All manpages..."
find . | grep .gz | xargs gunzip >/dev/null 2>&1
echo "stripping Unneeded Symbols..."
find . | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded >/dev/null 2>&1

# Clean old files:
rm -rf /home/work/changes/$arch/004

# Create dir for dropping stuff:
mkdir -p /home/work/changes/$arch/004/togo/man /home/work/changes/$arch/004/togo/locale /home/work/changes/$arch/004/a.out /home/work/changes/$arch/004/include /home/work/changes/$arch/004/qt

# Drop static libs:
pack=`find . -name "*.a"`
target=/home/work/changes/$arch/004/a.out
for a in $pack; do
    cp -a --parents $a $target
    rm $a
done

# Move headers and qt stuff:
cp --parents usr/$lib/qt/bin/{lconvert,linguist,lrelease,lupdate,moc,qmake,rcc,uic,uic3} /home/work/changes/$arch/004/qt
cp --parents -r usr/$lib/qt/include /home/work/changes/$arch/004/qt
cp --parents -r usr/$lib/qt/mkspecs /home/work/changes/$arch/004/qt
cp --parents -r usr/$lib/qt/src /home/work/changes/$arch/004/qt
rm -r usr/$lib/qt/bin/{lconvert,linguist,lrelease,lupdate,moc,qmake,rcc,uic,uic3} usr/$lib/qt/include usr/$lib/qt/mkspecs usr/$lib/qt/src

cp -a --parents usr/include /home/work/changes/$arch/004/include
rm -r usr/include/*
find -type f -name "*.h" | xargs -n1 -i cp -a --parents {} /home/work/changes/$arch/004/include
find -type f -name "*.h" | xargs rm 2>/dev/null
find -type f -name "*.cmake" | xargs -n1 -i cp -a --parents {} /home/work/changes/$arch/004/include
find -type f -name "*.cmake" | xargs rm 2>/dev/null
cp -a --parents usr/$lib/girepository-1.0 usr/share/gir-1.0 /home/work/changes/$arch/002/include
rm -r usr/$lib/girepository-1.0 usr/share/gir-1.0

# Move translations/localized man pages:
echo "moving locales"
for x in `ls usr/share/locale | egrep -v "all_languages|currency|l10n"`; do
    cp -r usr/share/locale/$x /home/work/changes/$arch/004/togo/locale
    rm -r usr/share/locale/$x
done
cp -a --parents `find usr/share/ -type d -name "translations" -or -name "locale" -or -name "l10n" -or -name "qpdfview" | grep -v 'share/locale'` /home/work/changes/$arch/004/togo
for x in `find usr/share/ -type d -name "translations" -or -name "locale" -or -name "l10n" -or -name "qpdfview" | grep -v 'share/locale'`; do rm -rf $x/*; done

for x in `ls usr/man | grep -v man`; do
    cp -r usr/man/$x /home/work/changes/$arch/004/togo/man
    rm -r usr/man/$x
done

echo "move changes"

# Testing:
rm -rf usr/bin/quasconfig
rm -rf usr/bin/quashctl
rm -rf usr/sbin/v4l2-dbg
rm -rf usr/share/icons/oxygen/64x64
rm -rf usr/share/icons/hicolor/96x96
rm -rf usr/share/icons/hicolor/64x64

Re: Creating my own Porteus !

Posted: 17 Oct 2014, 12:29
by wread
Fine business, Tom! :)

Re: Creating my own Porteus !

Posted: 18 Oct 2014, 01:13
by freestyler
Thanks!

Re: Creating my own Porteus !

Posted: 22 Dec 2014, 03:48
by CafeRay
I am new to Porteus, and only noticed a few things I would like to see changed.

1. I prefer a more complete installer such as is used in the ubuntu derivatives, with Grub or Grub2 boot manager.
2. I prefer a more robust video player such as VLC
3. I would like to have more choices for the background screens.

Re: Creating my own Porteus !

Posted: 22 Dec 2014, 21:33
by francois
Hello caferay:
Please start 3 threads on each of the specific topics you mentioned. This thread is about another type of customization.
Thanks.

Re: Creating my own Porteus !

Posted: 27 Dec 2014, 13:57
by wread
@CafeRay
Your 1-2-3 wish will only make Porteus heavier; besides, all three things can be found on the web....Just customize your Porteus and you are done :D