Updated some info plu fixed some logic...

This commit is contained in:
Maxim 2017-10-31 00:26:10 -05:00
parent 642cbb9caf
commit 4f30f17a23
3 changed files with 51 additions and 34 deletions

View File

@ -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 <http://www.gnu.org/licenses/>.
#
#
#
#
#--------------------------------------------------------------------------------#
############################ ############################
#### SETUP & INFO #### #### SETUP & INFO ####
############################ ############################
@ -37,6 +14,13 @@
Ubuntu-Mini-Remix : Ubuntu-Mini-Remix :
http://www.ubuntu-mini-remix.org/ 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 ## SETUP DIR STRUCTURE
*** buildDir is where you are maintaining the squashfs and iso bits *** buildDir is where you are maintaining the squashfs and iso bits
@ -77,6 +61,8 @@ Xephyr -resizeable -screen 1920x1080 :10
## BUILDING FROM AN DEBOOTSTRAP ## BUILDING FROM AN DEBOOTSTRAP
## same location as iso/ ## same location as iso/
sudo debootstrap --variant=buildd <code name such as vivid> <chroot path> http://archive.ubuntu.com/ubuntu/
OR
sudo debootstrap --arch=amd64 vivid squashfs-root/ ## For 32bit use --arch=i386 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 the /boot folder will be needed. To allow the Customised Cd to be an
installer Cd, compress the entire chroot folder with this command: installer Cd, compress the entire chroot folder with this command:
## avg compression with possible faster boot times ## avg compression
## the reason is that it takes more time to to uncompress when loading iso
sudo mksquashfs squashfs-root/ iso/casper/filesystem.squashfs sudo mksquashfs squashfs-root/ iso/casper/filesystem.squashfs
## best compression with possible slower boot times ## best compression
## the reason is that it takes less time to to uncompress when loading iso
sudo mksquashfs squashfs-root/ iso/casper/filesystem.squashfs -comp xz -e squashfs-root/boot sudo mksquashfs squashfs-root/ iso/casper/filesystem.squashfs -comp xz -e squashfs-root/boot

View File

@ -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*

View File

@ -123,9 +123,10 @@ main() {
chrootr chrootr
elif [ -f *.iso ]; then elif [ -f *.iso ]; then
clear 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 sleep 4
mountAndCopy mountAndCopy
chrootr
fi fi
} }
@ -135,12 +136,12 @@ mountAndCopy() {
## Prep filesystem ## Prep filesystem
mount -o loop *.iso mnt/ mount -o loop *.iso mnt/
cp -r mnt/. iso/ && \ cp -r mnt/. iso/ && \
mv iso/casper/filesystem.squashfs . mv iso/casper/filesystem.squashfs .
## Unspuashfs the squashfs ## Unspuashfs the squashfs
unsquashfs filesystem.squashfs && \ unsquashfs filesystem.squashfs && \
rm filesystem.squashfs rm filesystem.squashfs
## Cleanup some prep items ## Cleanup some prep items
umount mnt/ && rmdir mnt/ umount mnt/ && rmdir mnt/
@ -150,8 +151,6 @@ mountAndCopy() {
} }
chrootr() { chrootr() {
## Set Xephyr and set chrooting mounts ## Set Xephyr and set chrooting mounts
Xephyr -resizeable -screen "${RES}" "${ID}" & Xephyr -resizeable -screen "${RES}" "${ID}" &
cd squashfs-root/ cd squashfs-root/