Creating my own Porteus !

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
Post Reply
r004
White ninja
White ninja
Posts: 19
Joined: 24 Sep 2014, 10:32
Distribution: Porteus
Location: troy,MI

Creating my own Porteus !

Post#1 by r004 » 12 Oct 2014, 21:32

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

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Creating my own Porteus !

Post#2 by fanthom » 12 Oct 2014, 22:28

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

r004
White ninja
White ninja
Posts: 19
Joined: 24 Sep 2014, 10:32
Distribution: Porteus
Location: troy,MI

Re: Creating my own Porteus !

Post#3 by r004 » 13 Oct 2014, 01:13

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

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Creating my own Porteus !

Post#4 by francois » 13 Oct 2014, 03:04

Porteus!
Voltaire: Le mieux est l'ennemi du bien.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Creating my own Porteus !

Post#5 by fanthom » 13 Oct 2014, 03:59

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

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Creating my own Porteus !

Post#6 by francois » 13 Oct 2014, 13:58

You can have a try on xfce desktop too, just for practice:
viewtopic.php?f=53&t=3727&hilit=+xfce
Voltaire: Le mieux est l'ennemi du bien.

User avatar
freestyler
Contributor
Contributor
Posts: 382
Joined: 17 Oct 2013, 14:21
Distribution: Porteus KDE4
Location: Traveller
Contact:

Re: Creating my own Porteus !

Post#7 by freestyler » 15 Oct 2014, 22:02

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 :)
https://www.porteus-apps.org

rollingscissors
Ronin
Ronin
Posts: 3
Joined: 04 Sep 2011, 02:25
Distribution: Porteus 3.0.1
Location: People's Republic of China (I outsourced myself...)
Contact:

Re: Creating my own Porteus !

Post#8 by rollingscissors » 17 Oct 2014, 01:03

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.
Cheers,
William Munny
http://mofolinux.com

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Creating my own Porteus !

Post#9 by fanthom » 17 Oct 2014, 08:40

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

User avatar
wread
Module Guard
Module Guard
Posts: 1061
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Creating my own Porteus !

Post#10 by wread » 17 Oct 2014, 12:29

Fine business, Tom! :)
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
freestyler
Contributor
Contributor
Posts: 382
Joined: 17 Oct 2013, 14:21
Distribution: Porteus KDE4
Location: Traveller
Contact:

Re: Creating my own Porteus !

Post#11 by freestyler » 18 Oct 2014, 01:13

Thanks!
https://www.porteus-apps.org

CafeRay
Ronin
Ronin
Posts: 3
Joined: 26 Jun 2011, 04:43
Location: Florida

Re: Creating my own Porteus !

Post#12 by CafeRay » 22 Dec 2014, 03:48

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.

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Creating my own Porteus !

Post#13 by francois » 22 Dec 2014, 21:33

Hello caferay:
Please start 3 threads on each of the specific topics you mentioned. This thread is about another type of customization.
Thanks.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
wread
Module Guard
Module Guard
Posts: 1061
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Creating my own Porteus !

Post#14 by wread » 27 Dec 2014, 13:57

@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
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

Post Reply