Updating notes
This commit is contained in:
parent
efd7c9c8cd
commit
ad5e17b2a6
@ -57,6 +57,15 @@ function _get_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() {
|
||||
chroot_env=$(_get_chroot_env "${1}" "Install Base Software To Chroot Venv:")
|
||||
|
||||
@ -69,6 +78,7 @@ function _install_software() {
|
||||
x11-xserver-utils \
|
||||
locales \
|
||||
sudo \
|
||||
moreutils \
|
||||
less \
|
||||
nano \
|
||||
wget \
|
||||
@ -197,6 +207,7 @@ function install_desktop_software() {
|
||||
engrampa \
|
||||
terminator \
|
||||
mousepad \
|
||||
sqlitebrowser \
|
||||
ghex \
|
||||
galculator \
|
||||
gpick
|
||||
@ -272,6 +283,20 @@ EOF
|
||||
_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() {
|
||||
PS3="Enter system type: "
|
||||
|
15
src/TXTs/Make Tiniest Chroot Ever.txt
Normal file
15
src/TXTs/Make Tiniest Chroot Ever.txt
Normal 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>
|
Loading…
Reference in New Issue
Block a user