From 4f30f17a235a9f14aef7575a2b9aa037308747b4 Mon Sep 17 00:00:00 2001 From: Maxim Date: Tue, 31 Oct 2017 00:26:10 -0500 Subject: [PATCH] Updated some info plu fixed some logic... --- NOTES_LICENCE/Chroot_Distro_Build.txt | 38 ++++++++------------------- NOTES_LICENCE/Useful_Commands.txt | 34 ++++++++++++++++++++++++ dist_Builder.sh | 13 +++++---- 3 files changed, 51 insertions(+), 34 deletions(-) create mode 100644 NOTES_LICENCE/Useful_Commands.txt diff --git a/NOTES_LICENCE/Chroot_Distro_Build.txt b/NOTES_LICENCE/Chroot_Distro_Build.txt index d8d9774..ed2c50d 100644 --- a/NOTES_LICENCE/Chroot_Distro_Build.txt +++ b/NOTES_LICENCE/Chroot_Distro_Build.txt @@ -1,26 +1,3 @@ -#---------------- Copyright notices and creator info-----------------------------# -# -# By Maxim F. Stewart Contact: [maximstewart1@gmail.com] -# -# Copyright 2013 Maxim F. Stewart -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# -# -# -#--------------------------------------------------------------------------------# - ############################ #### SETUP & INFO #### ############################ @@ -37,6 +14,13 @@ Ubuntu-Mini-Remix : http://www.ubuntu-mini-remix.org/ + Good Reference : + http://willhaley.com/blog/create-a-custom-debian-stretch-live-environment-ubuntu-17-zesty/ + Other : + https://wiki.ubuntu.com/Releases + http://archive.ubuntu.com/ubuntu/ + http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/ + ## SETUP DIR STRUCTURE *** buildDir is where you are maintaining the squashfs and iso bits @@ -77,6 +61,8 @@ Xephyr -resizeable -screen 1920x1080 :10 ## BUILDING FROM AN DEBOOTSTRAP ## same location as iso/ + sudo debootstrap --variant=buildd http://archive.ubuntu.com/ubuntu/ + OR sudo debootstrap --arch=amd64 vivid squashfs-root/ ## For 32bit use --arch=i386 @@ -166,12 +152,10 @@ If this Customised Remix is to potentially be installed on some systems then the /boot folder will be needed. To allow the Customised Cd to be an installer Cd, compress the entire chroot folder with this command: - ## avg compression with possible faster boot times - ## the reason is that it takes more time to to uncompress when loading iso + ## avg compression sudo mksquashfs squashfs-root/ iso/casper/filesystem.squashfs - ## best compression with possible slower boot times - ## the reason is that it takes less time to to uncompress when loading iso + ## best compression sudo mksquashfs squashfs-root/ iso/casper/filesystem.squashfs -comp xz -e squashfs-root/boot diff --git a/NOTES_LICENCE/Useful_Commands.txt b/NOTES_LICENCE/Useful_Commands.txt new file mode 100644 index 0000000..c679f49 --- /dev/null +++ b/NOTES_LICENCE/Useful_Commands.txt @@ -0,0 +1,34 @@ +## Removes all packages but the ones specified and its dependencies +# !~nubuntu-minimal +aptitude markauto '~i !~nxserver !~nxserver-xorg !~nxorg !~nlinux-image-generic !~nsquashfs-tools !~ncasper !~naptitude !~napt-get !~napt' -y + + +## Get installed pkgs and insert to txt file +apt list --installed | awk '{print $1}' | cut -f1 -d"/" > installed-list.txt + +## Remove pkgs in the made txt file +apt-get remove --purge `cat installed-list.txt` + +## Clean un-needed pkgs +apt-get autoremove --purge + +## Remove old install pkgs +apt-get autoclean + +## Update pkg apt lists +apt-get update + +## Updates pkgs +apt-get upgrade + + +apt-get remove --purge shotwell* rhythmbox* thunderbird* totem* remmina* seahorse* libreoffice* gedit* gnome-* \ +vino* whoopsie* cheese* evince* firefox* eog* aisleriot* unity* yelp* totem* transmission-gtk* gparted* ubuntu-docs ubuntu-software* \ +zeitgeist-core zeitgeist-datahub onboard nautilus* simple-scan libqt4* qt4* adwaita-icon-theme* apport-gtk* bamfdaemon* \ +baobab* checkbox-converged* checkbox-gui* deja-dup* fcitx-config-common* fcitx-config-gtk* fcitx-frontend-gtk3* \ +file-roller* gcr* gir1.2-appindicator3-0.1* gir1.2-gtk-3.0* gir1.2-gtksource-3.0* gir1.2-peas-1.0* gir1.2-rb-3.0* \ +gir1.2-timezonemap-1.0* gir1.2-vte-2.91* gir1.2-webkit2-4.0* gir1.2-wnck-3.0* gkbd-capplet* gstreamer1.0-clutter-3.0* \ +gucharmap* gvfs-backends* humanity-icon-theme* indicator-application* indicator-appmenu* indicator-printers* \ +language-selector-gnome* samba* cups* libunity* alsa* pulseaudio* ubuntu-drivers-common* ubuntu-keyring* ubuntu-minimal* \ +ubuntu-mobile-icons* ubuntu-release-upgrader-core* ubuntu-settings* ubuntu-sounds* ubuntu-system-service* \ +ubuntu-touch-sounds* ubuntu-ui-toolkit-theme* ubuntu-wallpapers* ubuntu-wallpapers-xenial* diff --git a/dist_Builder.sh b/dist_Builder.sh index 48e0fa6..f76d3d7 100755 --- a/dist_Builder.sh +++ b/dist_Builder.sh @@ -123,9 +123,10 @@ main() { chrootr elif [ -f *.iso ]; then clear - echo "Iso found. Mounting and copying to proper file structure. Then chrooting in...\n" + echo "Iso found; mounting and copying to proper file structure. Then chrooting in..." sleep 4 - mountAndCopy + mountAndCopy + chrootr fi } @@ -135,12 +136,12 @@ mountAndCopy() { ## Prep filesystem mount -o loop *.iso mnt/ - cp -r mnt/. iso/ && \ - mv iso/casper/filesystem.squashfs . + cp -r mnt/. iso/ && \ + mv iso/casper/filesystem.squashfs . ## Unspuashfs the squashfs unsquashfs filesystem.squashfs && \ - rm filesystem.squashfs + rm filesystem.squashfs ## Cleanup some prep items umount mnt/ && rmdir mnt/ @@ -150,8 +151,6 @@ mountAndCopy() { } chrootr() { - - ## Set Xephyr and set chrooting mounts Xephyr -resizeable -screen "${RES}" "${ID}" & cd squashfs-root/