-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdracos-chroot.sh
executable file
·108 lines (102 loc) · 3.5 KB
/
dracos-chroot.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#! /bin/bash
#####################################################################################################################
# Dracos Simple Chroot
#
# For Info Contact : eLCrush Dracos-linux.org
#
# Thanks For Development Team
# Special Thanks Myuga & Purnomo Hadi
#####################################################################################################################
if [ "$(id -u)" != "0" ]; then
echo [✔]::[Check User]:$USER;
sleep 1
echo [X]::[not root] kamu harus menggunakan user [root] untuk menjalankan ini script;
sleep 1
sudo -s
exit
else
echo [✔] Your User :$USER;
clear
fi
# untuk warna
cyan='\e[0;36m'
green='\e[0;34m'
okegreen='\033[92m'
lightgreen='\e[1;32m'
white='\e[1;37m'
red='\e[1;31m'
yellow='\e[1;33m'
BlueF='\e[1;34m'
# untuk pilihan
again='y'
while [ $again == 'y' ] || [ $again == 'Y' ];
do
clear
echo -e $red ""
echo " 80G08 "
echo " 8G#G@8 "
echo " 8##0 "
echo " 0##G8 "
echo " ####08 "
echo " 8#####8 "
echo " G#####8 "
echo " 8G#####8 "
echo " #8#########0 #######8 "
echo " 8#######0 0#88##### "
echo " 8G####8 8 8#8@@8### "
echo " 8### G8 8@G###### "
echo " 8##88 8 8######8 "
echo " G##088 80G##G080 "
echo " 88000000008880# 000 "
echo " 9 0 "
echo ""
echo -e $white" ====================================================="
echo -e $cyan" Drac0s Linux Chroot Simple Script $red v1.0"
echo ""
echo -e $cyan" Author by eLCrush - Blackbutterfly"
echo -e $white" ====================================================="
echo ""
echo -e $white"$white 1)$cyan CHROOT$red By Blackbutterfly"
echo -e $white"$white 2)$cyan CHROOT$red By eLCrush"
echo -e $white"$white 3)$cyan EXIT"
echo ""
echo -e -n $red" root@dracos: ";tput sgr0
read pick
if test $pick == '1'
then
echo -e -n $cyan"Your directory name"
read dir
echo -e -n $cyan"Mount partition ( /dev/sdx )"
read sdx
export LFS=/mnt/$dir
mount $sdx $LFS
mount -v -o bind /dev ${LFS}/dev
mount -vt devpts -o gid=5,mode=620 devpts ${LFS}/dev/pts
mount -vt proc proc ${LFS}/proc
mount -vt tmpfs tmpfs ${LFS}/run
mount -vt sysfs sysfs ${LFS}/sys
[ -h ${LFS}/dev/shm ] && mkdir -pv ${LFS}/$(readlink ${LFS}/dev/shm)
chroot "$LFS" /bin/bash --login +h
elif test $pick == '2'
then
echo -e -n $cyan"Your directory location"
read dir
echo -e -n $cyan"Mount partition ( /dev/sdx )"
read sdx
export DRACOS=$dir
export bin=/bin/bash
mount $sdx $DRACOS
chroot $sdx $bin
elif test $pick == '3'
then
exit
fi
echo
echo -e -n "Back to Menu? (y/n)?";
read again;
while [ $again != 'y' ] && [ $again != 'Y' ] && [ $again != 'n' ] && [ $again != 'N' ];
do
echo -n "Back to menu (y/n)?";
read again;
done
done