Updating notes

This commit is contained in:
itdominator 2024-12-22 01:04:28 -06:00
parent efd7c9c8cd
commit ad5e17b2a6
3 changed files with 44 additions and 4 deletions

View File

@ -50,13 +50,22 @@ function _get_x_port() {
function _get_chroot_env() { function _get_chroot_env() {
if [ ! -z "${1}" -a "${1}" != " " ]; then if [ ! -z "${1}" -a "${1}" != " " ]; then
chroot_env="${1}" chroot_env="${1}"
else else
chroot_env=$(_prompt_chroot_env "${2}") chroot_env=$(_prompt_chroot_env "${2}")
fi fi
echo "${chroot_env}" echo "${chroot_env}"
} }
function _get_input_apps_list() {
read -p "To Install: " apps
if [ ! -z "${apps}" -a "${apps}" != " " ]; then
echo "${apps}"
else
exit 1
fi
}
function _install_software() { function _install_software() {
chroot_env=$(_get_chroot_env "${1}" "Install Base Software To Chroot Venv:") chroot_env=$(_get_chroot_env "${1}" "Install Base Software To Chroot Venv:")
@ -69,6 +78,7 @@ function _install_software() {
x11-xserver-utils \ x11-xserver-utils \
locales \ locales \
sudo \ sudo \
moreutils \
less \ less \
nano \ nano \
wget \ wget \
@ -197,6 +207,7 @@ function install_desktop_software() {
engrampa \ engrampa \
terminator \ terminator \
mousepad \ mousepad \
sqlitebrowser \
ghex \ ghex \
galculator \ galculator \
gpick gpick
@ -272,6 +283,20 @@ EOF
_unbind_mounts "${chroot_env}" _unbind_mounts "${chroot_env}"
} }
function install_custom_software() {
clear
chroot_env=$(_get_chroot_env "${1}" "Install Custom Software To Chroot Venv:")
apps=$(_get_input_apps_list)
_bind_mounts "${chroot_env}"
sudo chroot "${chroot_env}" /usr/bin/apt-get install \
--no-install-recommends \
--no-install-suggests -y \
"${apps}"
_unbind_mounts "${chroot_env}"
}
function _get_chroot_system_type() { function _get_chroot_system_type() {
PS3="Enter system type: " PS3="Enter system type: "
@ -289,7 +314,7 @@ function _get_chroot_system_type() {
echo "${system_type}" echo "${system_type}"
break break
;; ;;
*) *)
;; ;;
esac esac
done done
@ -315,7 +340,7 @@ function _get_chroot_variant() {
echo "${variant}" echo "${variant}"
break break
;; ;;
*) *)
;; ;;
esac esac
done done
@ -565,4 +590,4 @@ if [[ -z "${name}" ]]; then
_menu _menu
else else
$f_call "$@" $f_call "$@"
fi fi

View File

@ -0,0 +1,15 @@
Make the directory our chroot would be in and the bin folder.
mkdir -p MyChroot/bin
Now, we need to download a shell. (For this example, use Ash from Busybox 1.26.)
wget https://busybox.net/downloads/binaries/1.26.2-i686/busybox_ASH -O MyChroot/bin/ash
Next, make the binary executable.
chmod +x MyChroot/bin/ash
To run chroot do;
chroot path/to/<shell>