Stripping nemesis to bare minimum and rebuilding with pman

Arch based Porteus community project

Moderator: M. Eerie

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.

Stripping nemesis to bare minimum and rebuilding with pman

Post#1 by francois » 12 Dec 2016, 16:34

Stripping nemesis to bare minimum upgrading and rebuilding with pman is feasible from command line.
- start with 000-kernel.xzm 001-core.xzm
- upgrade with in save changes mode:

Code: Select all

su
toor
setup-pman
rm -rf /usr/lib/libdcadec.so.0
pacman -S dcadec
pacman-mirrors -g
pacman -Syyu
- follow arch linux wiki's and install with pman the following :
https://wiki.archlinux.org/index.php/Xorg
pman -S xorg-server
pman -S -xf86-video-intel (this is my case, you have to find your video card according to instructions)
pman -S xorg-xinit (or choose a display manager if you prefer)
pman -S xfce4 (or any desktop manager of your choice)
pman -S leafpad
pman -S xorg-xrandr
pman -S xorg-xkill

-transform your change folder into a module from another porteus installation

Code: Select all

root /mnt/live/memory # dir2xzm changes upgrade-changes.xzm
./
Autologin

Code: Select all

root /mnt/sdb2/64bit_nemesis # nano ~/.bash_profile
Put the following in ~/.bash_profile :

Code: Select all

[[ -f ~/.bashrc ]] && . ~/.bashrc
 
 # start x on login
 if [[ -z $DISPLAY && ! -e /tmp/.X11-unix/X0 ]]; then
    exec xinit -- /usr/bin/X -nolisten tcp vt7
 fi 
edit /etc/inittab the line of code (found above) which starts with these characters c6:2345 and insert instead:

Code: Select all

c6:2345:respawn:/usr/bin/agetty -a <username> -8 -s 38400 tty6 linux
<username> is replaced with the autologin user name.

Autostart

Code: Select all

root /mnt/sdb2/64bit_nemesis # nano ~/.xinitrc
add
startxfce4

upgrade-changes is 518 Mb
Prendre son temps, profiter de celui qui passe.

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: Stripping nemesis to bare minimum and rebuilding with pm

Post#2 by francois » 12 Dec 2016, 17:00

The only thing that I missed is the autologin under openrc:
https://wiki.manjaro.org/index.php?titl ... 26_SystemD
Prendre son temps, profiter de celui qui passe.

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: Stripping nemesis to bare minimum and rebuilding with pm

Post#3 by francois » 13 Dec 2016, 00:53

Made a few changes in the procedure in first post. The upgrade now is 130 Mb. :D
Prendre son temps, profiter de celui qui passe.

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#4 by Jack » 14 Dec 2016, 00:58

When you built your to get that 130 M did you have all these monules?

Code: Select all

guest /mnt/sdb1/porteus/base $ ls
000-kernel.xzm  
001-core.xzm    
002-gui.xzm   
002-xtra.xzm
003-lxde.xzm      
003-lxdextra.xzm
003-shared.xzm
Why I ask with all those modules mind came up with 190 M. After I did a dir2xzm on the change directory in my USB. I forgot I delete all the files in /mnt/sdb1/porteus/changes/var/cache/pacman/pkg to help to make it smaller but is there any more I can delete to make even smaller?

And I forgot I did add Firefox and Flashplayer so that made it a little bigger.

UPDATE:
Something must have went wrong when I put update-changes.xzm in the moduled directory and I delete the changes directory but then I rebooted back up and it didn't work. I don't know what I did wrong.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

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: Stripping nemesis to bare minimum and rebuilding with pm

Post#5 by francois » 14 Dec 2016, 11:53

I start with kernel and core only. I will have to rewrite the first post as my upgrade module does not work at reboot.
Prendre son temps, profiter de celui qui passe.

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#6 by Jack » 14 Dec 2016, 14:24

francois wrote:I start with kernel and core only. I will have to rewrite the first post as my upgrade module does not work at reboot.
Since 000-kernel and 001-core dose not have a GUI how did you upgrade all those files? What was the command line you used? This is how I want to do it but I don't understand how to. There got to be a way in just one command like Update Manager dose.

The way I did whole Nemesis v3.5 upgrade I did this in terminal mode first.

Code: Select all

su
toor
setup-pman
pacman -R upower-pm-utils
pacman -S upower
rm -rf /usr/lib/libdcadec.so.0
Then I did this in Graphics mode. I need the command line to replace this.

Code: Select all

Update Manager
Then Nemesis was up-to-date.
Last edited by Jack on 15 Dec 2016, 04:20, edited 1 time in total.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#7 by Blaze » 14 Dec 2016, 16:10

Jack wrote:Since 000-kernel and 001-core dose not have a GUI how did you upgrade all those files?
The 'Text mode' way with 000-kernel and 001-core is more correctly than GUI with a full set of modules. But this way is not perfect too.
For example, I have done it under Text mode - look at this post, but I removed only 003-lxde.xzm and 003-lxdextra.xzm
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#8 by Jack » 14 Dec 2016, 17:04

Blaze wrote:
Jack wrote:Since 000-kernel and 001-core dose not have a GUI how did you upgrade all those files?
The 'Text mode' way with 000-kernel and 001-core is more correctly than GUI with a full set of modules. But this way is not perfect too.
For example, I have done it under Text mode - look at this post, but I removed only 003-lxde.xzm and 003-lxdextra.xzm
In text mode is there any order to install them? This is how I can start doing it but I might add the whole at once.

Code: Select all

pacman -S acl acpid acpid-openrc archlinux-keyring attr bash bzip2 ca-certificates ca-certificates-cacert ca-certificates-mozilla ca-certificates-utils cdrtool
Here is a list of 001-core. Can someone take a good look to see if they are right I make they will work. If you have a list all ready and care to share please post it.

Code: Select all

acl
acpid
acpid-openrc
archlinux-keyring
attr
bash
bzip2
ca-certificates
ca-certificates-cacert
ca-certificates-mozilla
ca-certificates-utils
cdrtools
cgmanager
cgmanager-openrc
consolekit
consolekit-openrc
coreutils
cower
cpio
cracklib
cronie
cronie-openrc
curl
db
dbus-glib
dbus-openrc
device-mapper
device-mapper-openrc
dhclient
dhcpcd
dhcpcd-openrc
dialog
diffutils
dmidecode
dnssec-anchors
dosfstools
downgrade
e2fsprogs
elfutils
eudev
eudev-systemdcompat
eventlog
expac
expat
file
filesystem
findutils
fuse
gawk
gcc-libs
gdbm
gettext
glib-networking
glib2
glibc
glibc-openrc
gmp
gnupg
gnutls
gpgme
gpm
gpm-openrc
gptfdisk
grep
gsettings-desktop-schemas
gzip
haveged
haveged-openrc
hddtemp
hdparm
hwids
iana-etc
inetutils
inetutils-openrc
inotify-tools
inxi
iproute2
iptables
iptables-openrc
iputils
ipw2100
ipw2200
jansson
js17
json-c-
kbd
kbproto
keyutils
kmod
krb5
ldns
less
libarchive
libassuan
libatomic_ops
libcap
libdaemon
libdbi
libdbus
libedit
libelf
libevdev
libffi
libgcrypt
libgpg-error
libgudev
libidn
libinput
libksba
libldap
libmm-glib
libndp
libnewt
libnih
libnl
libnm-glib
libpcap
libpgm
libproxy
libsasl
libseccomp
libsodium
libsoup
libssh2
libtasn1
libteam
libtirpc
libtool
libunistring
libusb
libutil-linux
libx11
libxau
libxcb
libxdmcp
libxml2
linux-api-headers
lm_sensors
logrotate
lsof
lynx
lz4
lzo
manjaro-keyring
mc
mdadm
mdadm-openrc
mpfr
mtdev
nano
ncurses
net-tools
netifrc
nettle
networkmanager-consolekit
networkmanager-openrc
npth
nspr
nss
ntfs-3g-fuse
ntp
ntp-openrc
openrc
openresolv
openssh
openssh-openrc
openssl
openvpn
openvpn-openrc
p11-kit
pacaur
package-query
pacman
pacman-mirrorlist
pam
pambase
parted
patch
pciutils
pcre
perl
pinentry
polkit-consolekit
popt
ppp
procps-ng
psmisc
python
readline
rfkill
rp-pppoe
rsync
run-parts
screen
sdparm
sed
shadow
slang
sqlite
squashfs-tools
sudo
sysfsutils
syslog-ng
syslog-ng-openrc
sysvinit
tar
tcl
texinfo
tzdata
udev-openrc
unrar
unzip
usb_modeswitch
usbutils
util-linux
vi
wget
which
wpa_supplicant
xcb-proto
xfsprogs
xproto
xz
yajl
zd1211-firmware
zeromq
zip
zlib
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#9 by Blaze » 14 Dec 2016, 17:42

Jack wrote:In text mode is there any order to install them?
Try this script.sh in Text Mode

Code: Select all

#!/bin/bash 
pacman -S acl acpid acpid-openrc archlinux-keyring attr bash bzip2 ca-certificates ca-certificates-cacert ca-certificates-mozilla ca-certificates-utils cdrtools cgmanager cgmanager-openrc consolekit consolekit-openrc coreutils cower cpio cronie cronie-openrc curl db dbus-glib dbus-openrc device-mapper device-mapper-openrc dhclient dhcpcd dhcpcd-openrc dialog diffutils dmidecode dnssec-anchors dosfstools downgrade e2fsprogs elfutils eudev eudev-systemdcompat eventlog expac expat file filesystem findutils fuse gawk gcc-libs gdbm gettext glib-networking glib2 glibc glibc-openrc gmp gnupg gnutls gpgme gpm gpm-openrc gptfdisk grep gsettings-desktop-schemas gzip haveged haveged-openrc hddtemp hdparm hwids iana-etc inetutils inetutils-openrc inotify-tools inxi iproute2 iptables iptables-openrc iputils ipw2100 ipw2200 jansson js17 json-c kbd kbproto keyutils kmod krb5 ldns less libarchive libassuan libatomic_ops libcap libdaemon libdbi libdbus libedit libelf libevdev libffi libgcrypt libgpg-error libgudev libidn libinput libksba libldap libmm-glib libndp libnewt libnih libnl libnm-glib libpcap libpgm libproxy libsasl libseccomp libsodium libsoup libssh2 libtasn1 libteam libtirpc libtool libunistring libusb libutil-linux libx11 libxau libxcb libxdmcp libxml2 linux-api-headers lm_sensors logrotate lsof lynx lz4 lzo manjaro-keyring mc mdadm mdadm-openrc mpfr mtdev nano ncurses net-tools netifrc nettle networkmanager-consolekit networkmanager-openrc npth nspr nss ntfs-3g-fuse ntp ntp-openrc openrc openresolv openssh openssh-openrc openssl openvpn openvpn-openrc p11-kit pacaur package-query pacman pacman-mirrorlist pam pambase parted patch pciutils pcre perl pinentry polkit-consolekit popt ppp procps-ng psmisc python readline rfkill rp-pppoe rsync run-parts screen sdparm sed shadow slang sqlite squashfs-tools sudo sysfsutils syslog-ng syslog-ng-openrc sysvinit tar tcl texinfo tzdata udev-openrc unrar unzip usb_modeswitch usbutils util-linux vi wget which wpa_supplicant xcb-proto xfsprogs xproto xz yajl zd1211-firmware zeromq zip zlib
and don't forget about

Code: Select all

chmod +x script.sh
sh script.sh
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#10 by Jack » 14 Dec 2016, 20:41

Blaze you save me a lot of work. When I get it updated and back up and running will I use dir2xzm on the change directory and convert it to 001-update.xzm but I will be Always Fresh mode when I do it. I will work on 002 and as far as 003 I will change the Desktop from LXDE to Mate.

Blaze do you have 002 files like you posted on 001?

When I fine my cat5 cable I will do 001 and get back when I'm done.

Again thanks Blaze.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#11 by ncmprhnsbl » 14 Dec 2016, 21:42

unless i'm completely mistaken, 'upgrading' the kernel(000) will break Nemesis, because the standard arch kernel doesn't have the AUFS patch?
also
try extracting 001 , get list of packages from /var/lib/pacman/local
then: pacman -Sw <list of packages> to download to cache without installing
and then : pacman -Uddr /path/to/extracted/module /var/cache/pacman/pkg/*.pkg.tar.xz
then mksquashfs it...
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#12 by Jack » 14 Dec 2016, 23:40

Blaze wrote:
Jack wrote:In text mode is there any order to install them?
Try this script.sh in Text Mode

Code: Select all

#!/bin/bash 
pacman -S acl acpid acpid-openrc archlinux-keyring attr bash bzip2 ca-certificates ca-certificates-cacert ca-certificates-mozilla ca-certificates-utils cdrtools cgmanager cgmanager-openrc consolekit consolekit-openrc coreutils cower cpio cronie cronie-openrc curl db dbus-glib dbus-openrc device-mapper device-mapper-openrc dhclient dhcpcd dhcpcd-openrc dialog diffutils dmidecode dnssec-anchors dosfstools downgrade e2fsprogs elfutils eudev eudev-systemdcompat eventlog expac expat file filesystem findutils fuse gawk gcc-libs gdbm gettext glib-networking glib2 glibc glibc-openrc gmp gnupg gnutls gpgme gpm gpm-openrc gptfdisk grep gsettings-desktop-schemas gzip haveged haveged-openrc hddtemp hdparm hwids iana-etc inetutils inetutils-openrc inotify-tools inxi iproute2 iptables iptables-openrc iputils ipw2100 ipw2200 jansson js17 json-c kbd kbproto keyutils kmod krb5 ldns less libarchive libassuan libatomic_ops libcap libdaemon libdbi libdbus libedit libelf libevdev libffi libgcrypt libgpg-error libgudev libidn libinput libksba libldap libmm-glib libndp libnewt libnih libnl libnm-glib libpcap libpgm libproxy libsasl libseccomp libsodium libsoup libssh2 libtasn1 libteam libtirpc libtool libunistring libusb libutil-linux libx11 libxau libxcb libxdmcp libxml2 linux-api-headers lm_sensors logrotate lsof lynx lz4 lzo manjaro-keyring mc mdadm mdadm-openrc mpfr mtdev nano ncurses net-tools netifrc nettle networkmanager-consolekit networkmanager-openrc npth nspr nss ntfs-3g-fuse ntp ntp-openrc openrc openresolv openssh openssh-openrc openssl openvpn openvpn-openrc p11-kit pacaur package-query pacman pacman-mirrorlist pam pambase parted patch pciutils pcre perl pinentry polkit-consolekit popt ppp procps-ng psmisc python readline rfkill rp-pppoe rsync run-parts screen sdparm sed shadow slang sqlite squashfs-tools sudo sysfsutils syslog-ng syslog-ng-openrc sysvinit tar tcl texinfo tzdata udev-openrc unrar unzip usb_modeswitch usbutils util-linux vi wget which wpa_supplicant xcb-proto xfsprogs xproto xz yajl zd1211-firmware zeromq zip zlib
and don't forget about

Code: Select all

chmod +x script.sh
sh script.sh
I just thought of something if I only bootup in 000-kernel and 001-core there is no text editor to copy and paste the info in to the terminal to install the files. Am I missing something to do it?
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

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: Stripping nemesis to bare minimum and rebuilding with pm

Post#13 by francois » 15 Dec 2016, 03:31

Hello jack. I might have a solution.

nano is the standard text editor under manjaro.

All we need is to have mouse cursor under text mode http://forum.porteus.org/viewtopic.php?f=137&t=6469
Prendre son temps, profiter de celui qui passe.

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: Stripping nemesis to bare minimum and rebuilding with pm

Post#14 by francois » 15 Dec 2016, 04:01

Console windows supported environments:
https://wiki.archlinux.org/index.php/Li ... ions/Other

Twin a text-mode window environment:
https://sourceforge.net/projects/twin/
It supports mouse and multiple windows, has a built-in terminal emulator and window manager, and can serve as display for client applications.

Video of twin:
https://www.youtube.com/watch?v=iW9E-8aXfdc

Code: Select all

pman -S twin
Not working yet under nemesis. :( Working :D

*********************************************************************************************************************************************************
dvtm:
http://brain-dump.org/projects/dvtm/
dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm

Video of dvtm:
http://brain-dump.org/projects/dvtm/

Code: Select all

root ~ # pman -S dvtm
This one is working fine. You just have to learn how to play with the control keys to manage the windows.
Prendre son temps, profiter de celui qui passe.

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

Re: Stripping nemesis to bare minimum and rebuilding with pm

Post#15 by Jack » 15 Dec 2016, 04:19

francois I will have something to do now. I'm going to try it later but I still need to fine a cat5 cable so I can connect to the internet with my Laptop. That's for all the help everyone that working on this project.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Post Reply