Code: Select all
mkdir -p $curdir/$rootfs/proc;
mkdir -p $curdir/$rootfs/sys
mkdir -p $curdir/$rootfs/dev
mount -o rbind /proc $curdir/$rootfs/proc
mount -t sysfs none $curdir/$rootfs/sys
mount -o rbind /dev $curdir/$rootfs/dev
cp -f /etc/resolv.conf $curdir/$rootfs/etc/resolv.conf
chroot $curdir/$rootfs /bin/bash
https://pastebin.com/zrdGa2fV
(I removed some intializations and if blocks from the above code but not in the above link). Use whatever you want for the system shell in the last line such as bash or ash)
Once mounted you can open the puppy package manager with the command:
Code: Select all
xwin & Open a second terminal to uninstall stuff
dotpup
From there you can see what packages are installed, you can even download the packages with all the dependencies. You might want to do the latter if you want to port puppy aps to another distro (or even another version of puppy).
Now if you try uninstalling a package from the command line
Code: Select all
petget -leafpad
There is a file called "~/.packages/buitin_files/leafpad". I wonder if we could just move this file up one level and add a .files to the end of the file name and try again.No file named leafpad.files found in /root.packages/folder
/usr/local/petget/removepreview.sh
refusing cowardly to remove the package
Possible suggestions: No pkgs beginning with I found
Possible solutions: Edit /root/.packages/user-installed-packages to match the package and start again
There is also a tool with puppy to remove built-in packages but I don't know if it works properly or not in a chroot enviornment.
Another issue is when I get above said error that it opens up geany. Perhaps in a minimal system I want to uninstall geany, in which case I want to open nano instead. Maybe the fix is to edit the default text editor file or alternatively maybe I can make a script called geany and have it open nano instead in a new terminal.
Anyway, once you are done you can make an ISO if you want. Here is a script that is approxamitly what we want to make said iso:
make_ISO_Fm_slitaz-rootfs - TazPup64 Build Kit
I'll need to check through it though to make sure that it is looking in all the right places. For instances I need to replace "slitaz-rootfs" with "$root_fs" and I need to set prefix to an empty string. The script in the last link was mast on mistfires built-kit for tazpup.
Similarly I might want to change the default file manager to midnight commander.
Edit: wiak wanted me to add the following to this post:
wiak wrote:This comment inspired me to start a related thread, since a lot could be said about this and can also I feel be regarded as a subtopic of "Stripping Down a Puppy".nic007 wrote:What would really be cool for me is a method whereby one can open all the applications one use on a regular basis and any others one wants to keep in the base sfs/ones specific network and printing connections, take a snapshot of the things running (including the firmware/modules/libs/configurations, etc. currently in use) and then rebuild the base sfs to include ONLY the things currently running and in use.
I'd be grateful therefore if, s243a, you could put a link to the following as a subtopic in your first post, which could be usefully explored in parallel (but, being in separate thread, not swamp your main thread):
Determining "device drivers" (in kernel, external modules, in conjunction sometimes with firmware for hardware devices) used by your computer and how to remove unneeded ones
http://www.murga-linux.com/puppy/viewtopic.php?t=115717
wiak