Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e61b7614dc | |||
| 59570236e8 | |||
| 9dce0a5b3f |
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
# ---- Setup Variables ---- #
|
# ---- Setup Variables ---- #
|
||||||
|
|
||||||
# Root filesystem path
|
|
||||||
ROOT="${CHROOT_PTH}"
|
|
||||||
|
|
||||||
# Resolution of Xephyr... ex: 1920x1080 or 1600x900, etc
|
# Resolution of Xephyr... ex: 1920x1080 or 1600x900, etc
|
||||||
RESOLUTION="1920x1080"
|
RESOLUTION="1920x1080"
|
||||||
|
|
||||||
|
|||||||
@@ -54,9 +54,11 @@ function start_menu_mesage() {
|
|||||||
echo "\t6) Install Media Apps"
|
echo "\t6) Install Media Apps"
|
||||||
echo "\t7) Install Office Apps"
|
echo "\t7) Install Office Apps"
|
||||||
echo "\t8) Install Debs"
|
echo "\t8) Install Debs"
|
||||||
echo "\t9) Transfer Setting"
|
echo "\t9) Transfer Settings"
|
||||||
echo "\t10) Add PPA Repo Enteries"
|
echo "\t10) Install ALSA"
|
||||||
echo "\t11) Add PPA Repo Keys"
|
echo "\t11) Transfer Pulseaudio"
|
||||||
echo "\t12) Cleanup (Should run before exiting chroot.)"
|
echo "\t12) Add PPA Repo Enteries"
|
||||||
|
echo "\t13) Add PPA Repo Keys"
|
||||||
|
echo "\t14) Cleanup (Should run before exiting chroot.)"
|
||||||
echo "\t0) EXIT"
|
echo "\t0) EXIT"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,13 +12,7 @@ function main() {
|
|||||||
clear;
|
clear;
|
||||||
start_menu_mesage;
|
start_menu_mesage;
|
||||||
read -p "--> : " ANSR
|
read -p "--> : " ANSR
|
||||||
while [[ $ANSR != "0" ]] && [[ $ANSR != "1" ]] && \
|
while $ANSR -lt 0 || $ANSR -gt 14; do
|
||||||
[[ $ANSR != "2" ]] && [[ $ANSR != "3" ]] && \
|
|
||||||
[[ $ANSR != "4" ]] && [[ $ANSR != "5" ]] && \
|
|
||||||
[[ $ANSR != "6" ]] && [[ $ANSR != "7" ]] && \
|
|
||||||
[[ $ANSR != "8" ]] && [[ $ANSR != "9" ]] && \
|
|
||||||
[[ $ANSR != "10" ]] && [[ $ANSR != "11" ]] && \
|
|
||||||
[[ $ANSR != "12" ]]; do
|
|
||||||
read -p "--> : " ANSR
|
read -p "--> : " ANSR
|
||||||
done
|
done
|
||||||
case $ANSR in
|
case $ANSR in
|
||||||
@@ -31,9 +25,11 @@ function main() {
|
|||||||
"7" ) install_office;;
|
"7" ) install_office;;
|
||||||
"8" ) install_debs;;
|
"8" ) install_debs;;
|
||||||
"9" ) transfer_settings;;
|
"9" ) transfer_settings;;
|
||||||
"10" ) ./GET_PPA_REPOSITORIES.sh;;
|
"10" ) install_alsa;;
|
||||||
"11" ) ./GET_PPA_GPG_KEYS.sh;;
|
"11" ) install_pulseaudio;;
|
||||||
"12" ) ./CLEANUP.sh;;
|
"12" ) ./GET_PPA_REPOSITORIES.sh;;
|
||||||
|
"13" ) ./GET_PPA_GPG_KEYS.sh;;
|
||||||
|
"14" ) ./CLEANUP.sh;;
|
||||||
"0" ) exit;;
|
"0" ) exit;;
|
||||||
* ) echo "Don't know how you got here but that's a bad sign...";;
|
* ) echo "Don't know how you got here but that's a bad sign...";;
|
||||||
esac
|
esac
|
||||||
@@ -67,7 +63,7 @@ function install_live_iso_dependencies() {
|
|||||||
# Yet, we need A kernel in order to even boot stuff.
|
# Yet, we need A kernel in order to even boot stuff.
|
||||||
# I need to look into a kind of menu for the user where they could chose one.
|
# I need to look into a kind of menu for the user where they could chose one.
|
||||||
# For right now, we'll use this...
|
# For right now, we'll use this...
|
||||||
apt-get install -y linux-generic
|
# apt-get install -y linux-generic
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_ubuntu_live_pkgs() {
|
function install_ubuntu_live_pkgs() {
|
||||||
@@ -82,6 +78,16 @@ function install_debian_live_pkgs() {
|
|||||||
debian-minimal debian-standard
|
debian-minimal debian-standard
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_alsa() {
|
||||||
|
apt-get install -y \
|
||||||
|
alsa* apulse sox libsox-fmt-all
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_pulseaudio() {
|
||||||
|
apt-get install -y \
|
||||||
|
pulseaudio pavucontrol sox libsox-fmt-all
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function install_installer() {
|
function install_installer() {
|
||||||
|
|
||||||
@@ -108,11 +114,15 @@ function install_installer() {
|
|||||||
######################## Main Desktop ########################
|
######################## Main Desktop ########################
|
||||||
function install_base() {
|
function install_base() {
|
||||||
echo "Install base stuff stub..."
|
echo "Install base stuff stub..."
|
||||||
# Pushe to a meta-package deb after selecting what if anything you want to keep...
|
# Note: Doing it this way, this actually is a small login manager that doesn't
|
||||||
|
# bring in unity* packages. Slim is also a great choice and even smaller....
|
||||||
|
# sudo apt-get install --no-install-recommends --no-install-suggests lightdm lightdm-gtk-greeter
|
||||||
|
|
||||||
|
# Push to a meta-package deb after selecting what if anything you want to keep...
|
||||||
# apt-get install -y xserver-xorg xorg xinit slim synaptic aptitude apt-xapian-index \
|
# apt-get install -y xserver-xorg xorg xinit slim synaptic aptitude apt-xapian-index \
|
||||||
# gufw wicd-curses pulseaudio pavucontrol file-roller p7zip-rar arj rar unrar-free \
|
# gufw wicd-curses file-roller p7zip-rar arj rar unrar-free \
|
||||||
# xcompmgr tweak lhasa unar p7zip zip terminator stjerm ttf-mscorefonts-installer \
|
# xcompmgr tweak lhasa unar p7zip zip terminator stjerm ttf-mscorefonts-installer \
|
||||||
# gparted gdebi sox udisks2 iftop htop tree hardinfo libsox-fmt-all onboard mc \
|
# gparted gdebi sox udisks2 iftop htop tree hardinfo onboard mc \
|
||||||
# oracle-java8-installer apt-transport-https software-properties-common -y
|
# oracle-java8-installer apt-transport-https software-properties-common -y
|
||||||
|
|
||||||
# apt-get autoremove --purge -y && apt-get autoclean
|
# apt-get autoremove --purge -y && apt-get autoclean
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
## WEBSITES
|
## WEBSITES
|
||||||
Window Managers :
|
Window Managers :
|
||||||
http://xwinman.org/
|
http://xwinman.org/
|
||||||
# Python Tiling WM
|
|
||||||
http://docs.qtile.org/en/latest/index.html
|
|
||||||
Source List Generator :
|
Source List Generator :
|
||||||
https://repogen.simplylinux.ch/index.php
|
https://repogen.simplylinux.ch/index.php
|
||||||
Themes :
|
Themes :
|
||||||
@@ -211,7 +209,3 @@ sudo mkisofs -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-
|
|||||||
OPTION 2::
|
OPTION 2::
|
||||||
## Hasn't worked for me....
|
## Hasn't worked for me....
|
||||||
sudo mkisofs -r -no-emul-boot -boot-load-size 4 -o ../ubu-mini.iso -b isolinux/isolinux.bin -c isolinux/boot.cat ./
|
sudo mkisofs -r -no-emul-boot -boot-load-size 4 -o ../ubu-mini.iso -b isolinux/isolinux.bin -c isolinux/boot.cat ./
|
||||||
|
|
||||||
|
|
||||||
Alternate?:
|
|
||||||
sudo genisoimage -l -r -J -V "Sol-OS" -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o ../Sol-OSv3.iso ./
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#more info here http://www.cyberciti.biz/faq/debian-ubuntu-restricting-ssh-user-session-to-a-directory-chrooted-jail/
|
|
||||||
|
|
||||||
fs="$PWD/jail"
|
|
||||||
echo "Creating ${fs}..."
|
|
||||||
mkdir -p ${fs}/{etc,usr/{bin,lib},bin,lib}/
|
|
||||||
|
|
||||||
mkdir -p $fs/dev/
|
|
||||||
mknod -m 666 $fs/dev/null c 1 3
|
|
||||||
mknod -m 666 $fs/dev/tty c 5 0
|
|
||||||
mknod -m 666 $fs/dev/zero c 1 5
|
|
||||||
mknod -m 666 $fs/dev/random c 1 8
|
|
||||||
|
|
||||||
cp -v /lib/ld-linux.so.2 $fs/lib/
|
|
||||||
|
|
||||||
chown root:root $fs
|
|
||||||
chmod 0755 $fs
|
|
||||||
|
|
||||||
wget "http://www.busybox.net/downloads/binaries/latest/busybox-i686" -O ${fs}/bin/busybox
|
|
||||||
chmod +x ${fs}/bin/busybox
|
|
||||||
|
|
||||||
cd ${fs}/bin
|
|
||||||
./busybox --help | \
|
|
||||||
sed -e '1,/^Currently defined functions:/d' \
|
|
||||||
-e 's/[ \t]//g' -e 's/,$//' -e 's/,/\n/g' | \
|
|
||||||
while read app ; do
|
|
||||||
if [ "$app" != "" ]; then
|
|
||||||
printf "linking %-12s ...\n" "$app"
|
|
||||||
ln -sf "./busybox" "$app"
|
|
||||||
ls -ld "$app"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "nameserver 8.8.8.8" > $fs/etc/resolv.conf
|
|
||||||
echo "search 8.8.8.8" >> $fs/etc/resolv.conf
|
|
||||||
|
|
||||||
#add nmap
|
|
||||||
cp -v /usr/bin/nmap $fs/usr/bin/nmap_real
|
|
||||||
#create unprivileged nmap script
|
|
||||||
cat << EOF > $fs/usr/bin/nmap
|
|
||||||
#!/bin/sh
|
|
||||||
nmap_real --unprivileged \$*
|
|
||||||
EOF
|
|
||||||
chmod +x $fs/usr/bin/nmap
|
|
||||||
|
|
||||||
mkdir -p $fs/{usr/share/nmap/,etc/services}
|
|
||||||
#cp -vr /usr/share/nmap $fs/usr/share/nmap/
|
|
||||||
ldd /usr/bin/nmap|while read line;
|
|
||||||
do
|
|
||||||
echo "$line"|\
|
|
||||||
awk '{print $3}'
|
|
||||||
done|grep lib|while read line;
|
|
||||||
do
|
|
||||||
cp -v "$line" $fs/usr/lib/;
|
|
||||||
done
|
|
||||||
|
|
||||||
clear
|
|
||||||
echo "welcome to your chroot!"
|
|
||||||
chroot $fs sh
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Note: Very good breakdown of an LFS setup. His directory script is interesting too. Just a good source all around.
|
|
||||||
https://www.youtube.com/watch?v=IXA0GNTLf_Q&list=PLHh55M_Kq4OAPznDEcgnkQsbjgvG-QFBR
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
. CONFIG.sh
|
|
||||||
|
|
||||||
# set -o xtrace ## To debug scripts
|
|
||||||
# set -o errexit ## To exit on error
|
|
||||||
# set -o errunset ## To exit if a variable is referenced but not set
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function create_file_init_and_configs() {
|
|
||||||
|
|
||||||
# Toy init system to look over eventually.
|
|
||||||
#
|
|
||||||
# cat > "$ROOT"/init << 'EOF' &&
|
|
||||||
# #!/bin/sh
|
|
||||||
# export HOME=/home
|
|
||||||
# export PATH=/bin:/sbin
|
|
||||||
# mountpoint -q proc || mount -t proc proc proc
|
|
||||||
# mountpoint -q sys || mount -t sysfs sys sys
|
|
||||||
# if ! mountpoint -q dev
|
|
||||||
# then
|
|
||||||
# mount -t devtmpfs dev dev || mdev -s
|
|
||||||
# mkdir -p dev/pts
|
|
||||||
# mountpoint -q dev/pts || mount -t devpts dev/pts dev/pts
|
|
||||||
# fi
|
|
||||||
# if [ $$ -eq 1 ]
|
|
||||||
# then
|
|
||||||
# # Don't allow deferred initialization to crap messages over the shell prompt
|
|
||||||
# echo 3 3 > /proc/sys/kernel/printk
|
|
||||||
# # Setup networking for QEMU (needs /proc)
|
|
||||||
# ifconfig eth0 10.0.2.15
|
|
||||||
# route add default gw 10.0.2.2
|
|
||||||
# [ "$(date +%s)" -lt 1000 ] && rdate 10.0.2.2 # or time-b.nist.gov
|
|
||||||
# [ "$(date +%s)" -lt 10000000 ] && ntpd -nq -p north-america.pool.ntp.org
|
|
||||||
# [ -z "$CONSOLE" ] &&
|
|
||||||
# CONSOLE="$(sed -rn 's@(.* |^)console=(/dev/)*([[:alnum:]]*).*@\3@p' /proc/cmdline)"
|
|
||||||
# [ -z "$HANDOFF" ] && HANDOFF=/bin/sh && echo Type exit when done.
|
|
||||||
# [ -z "$CONSOLE" ] && CONSOLE=console
|
|
||||||
# exec /sbin/oneit -c /dev/"$CONSOLE" $HANDOFF
|
|
||||||
# else
|
|
||||||
# /bin/sh
|
|
||||||
# umount /dev/pts /dev /sys /proc
|
|
||||||
# fi
|
|
||||||
# EOF
|
|
||||||
# chmod +x "$ROOT"/init &&
|
|
||||||
|
|
||||||
cat > "$ROOT"/etc/passwd << 'EOF' &&
|
|
||||||
root::0:0:root:/root:/bin/sh
|
|
||||||
guest:x:500:500:guest:/home/guest:/bin/sh
|
|
||||||
nobody:x:65534:65534:nobody:/proc/self:/dev/null
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat > "$ROOT"/etc/group << 'EOF' &&
|
|
||||||
root:x:0:
|
|
||||||
guest:x:500:
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "nameserver 8.8.8.8" > "$ROOT"/etc/resolv.conf || exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function create_file_structure() {
|
|
||||||
rm -rf "${ROOT}" &&
|
|
||||||
mkdir -p "${ROOT}"/{etc,tmp,proc,sys,dev,home,mnt,root,usr/{bin,sbin,lib},var} &&
|
|
||||||
chmod a+rwxt "${ROOT}"/tmp &&
|
|
||||||
ln -s "${ROOT}"/usr/bin "${ROOT}/bin" &&
|
|
||||||
ln -s "${ROOT}"/usr/sbin "${ROOT}/sbin" &&
|
|
||||||
ln -s "${ROOT}"/usr/lib "${ROOT}/lib"
|
|
||||||
}
|
|
||||||
|
|
||||||
function main() {
|
|
||||||
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
|
|
||||||
cd "${SCRIPTPATH}"
|
|
||||||
echo "Working Dir: " $(pwd)
|
|
||||||
|
|
||||||
create_file_structure
|
|
||||||
create_file_init_and_configs
|
|
||||||
}
|
|
||||||
main $@;
|
|
||||||
@@ -89,10 +89,6 @@ function sanity_check() {
|
|||||||
"\tapt-get install xserver-xephyr syslinux squashfs-tools genisoimage netpbm syslinux-utils -y"
|
"\tapt-get install xserver-xephyr syslinux squashfs-tools genisoimage netpbm syslinux-utils -y"
|
||||||
sleep 2
|
sleep 2
|
||||||
sudo apt-get install xserver-xephyr syslinux squashfs-tools genisoimage netpbm syslinux-utils -y
|
sudo apt-get install xserver-xephyr syslinux squashfs-tools genisoimage netpbm syslinux-utils -y
|
||||||
|
|
||||||
# Note: Need to add arch/manjaro linux detection to run compatable commands.
|
|
||||||
# # cdrkit has 'genisoimage' command
|
|
||||||
# sudo pacman -Syy syslinux squashfs-tools cdrkit netpbm xorg-server-xephyr
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${ARCH}" == "" ]] || [[ "${RELEASE}" == "" ]]; then
|
if [[ "${ARCH}" == "" ]] || [[ "${RELEASE}" == "" ]]; then
|
||||||
|
|||||||
@@ -44,9 +44,6 @@ function move_iso_linux_parts() {
|
|||||||
# We will need a kernel and an initrd that was built with the Casper scripts.
|
# We will need a kernel and an initrd that was built with the Casper scripts.
|
||||||
# Grab them from the chroot. Use the current version.
|
# Grab them from the chroot. Use the current version.
|
||||||
# Note that before 9.10, the initrd was in gz not lz format...
|
# Note that before 9.10, the initrd was in gz not lz format...
|
||||||
# Should look inti makeinitcpio:
|
|
||||||
# https://wiki.archlinux.org/title/Mkinitcpio
|
|
||||||
# Is that the same stuff? I'm thinking not but...I r dumb.
|
|
||||||
echo "If this fails then use what's in chroot/boot/...:"
|
echo "If this fails then use what's in chroot/boot/...:"
|
||||||
echo "Copying ${CHROOT_PTH}/boot/vmlinuz-5.4.**-**-generic to image/casper/vmlinuz"
|
echo "Copying ${CHROOT_PTH}/boot/vmlinuz-5.4.**-**-generic to image/casper/vmlinuz"
|
||||||
sudo cp "${CHROOT_PTH}"/boot/vmlinuz-5.4.**-**-generic image/casper/vmlinuz
|
sudo cp "${CHROOT_PTH}"/boot/vmlinuz-5.4.**-**-generic image/casper/vmlinuz
|
||||||
|
|||||||
Reference in New Issue
Block a user