Steps suggested to build your own modules:
1 Prepare an img file for temporary files storage, if you do not give slax an ext4 partition.
This is to avoid continuously expanding changes.dat, which grows very fast. On the other hand, fat32 does not handle the symbols and permissions.
> dd if=/dev/zero of=$PATH_OF_IMG_FILE bs=1M count=2048
we've created a 2GB image, then format it
> mkfs.ext4 -F $PATH_OF_IMG_FILE
mount it
> mkdir /media/ext
> mount $PATH_OF_IMG_FILE /media/ext
Do mount once on each fresh reboot.
2 After a fresh reboot, apt installs what you want.
3 Copy & Clean
> mkdir -p /media/ext/modules/YOUR_MOD_NAME
> cp -aR /run/initramfs/memory/changes/* /media/ext/modules/YOUR_MOD_NAME
remove unecessary
> cd /media/ext/modules/YOUR_MOD_NAME
> rm -rf boot/ dev/ media/ mnt/ proc/ run/ sys/ tmp/ var/tmp var/cache var/log
> rm -rf var/lib/apt/ var/lib/dhcp/ var/lib/systemd/
> rm -rf etc/fstab etc/resolv.conf etc/ld.so.cache
Select carefully if you want to shrink it in advance.
Never remove var/lib/dpkg/status & var/lib/dpkg/info/, apt needs them as meta database, or it may install package files repeatedly.
4 Make module
> mksquashfs /media/ext/modules/YOUR_MOD_NAME /media/ext/modules/PREFIX-YOUR_MOD_NAME.sb
put it into slax
> mv /media/ext/modules/PREFIX-YOUR_MOD_NAME.sb /run/initramfs/memory/data/slax/
5 Reboot(fresh start) to test it.
If you are creating more than one modules, e.g. 05-xxx 06-xxx 07-xxx, the sequence is noteworthy.
Prefix is used to keep loading order, since some packages may change the same files, the latter overwrites the previous.
Thus if you want to modify 05-xxx, better to re-produce 06-xxx and 07-xxx based on the new.
Similarly if you are unhappy to use fluxbox and are willing to install xfce4, as a start, you need to remove all original modules after 02-xorg.sb.
Такаа , това е за създаване на модул в Slax . Та , въпроса ми е - $PATH_OF_IMG_FILE трябва ли да се замести с нещо ?? и т.3 и т.4 могат ли да се обединят в един файл за автоматично изпълнение .
Това във новия Slax който е на база Debian .
Искам да създавам модули , защото с apt прекалено бързо нараства цялата система