-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
50 lines (43 loc) · 1.21 KB
/
install.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
#!/bin/bash
##script to automate the installtion of stage 4
##Secploit OS , Gentoo Kernal
hd=/dev/sda
ext2=2
ext4=3
parted -s $hd mklabel gpt &> /dev/null
##remove previouse partition
parted -s $hd rm 1 &> /dev/null
parted -s $hd rm 2 &> /dev/null
parted -s $hd rm 3 &> /dev/null
parted -s $hd rm 4 &> /dev/null
##partion start
parted -s $hd unit mib
parted -s $hd mkpart primary 1 3
parted -s $hd name 1 grub
parted -s $hd set 1 bios_grub on
parted -s $hd mkpart primary 3 131
parted -s $hd name 2 boot
parted -s $hd mkpart primary 643 -- -1
parted -s $hd name 3 rootfs
parted -s $hd set 2 boot on
##end of partion
##formating
mkfs.ext2 $hd$ext2
mkfs.ext4 $hd$ext4
##end of formating
##mouting Drive
mount $hd$ext4 /mnt/gentoo
##end of mounting
##installing proccess
emerge --ask pv
tar xvfj /mnt/cdrom/stages/secploit.tar.gz -C /mnt/gentoo
#pv /mnt/cdrom/stages/secploit.tar.gz | tar xvfj - -C /mnt/gentoo
echo "Successfully installed , please run chroot script "
##end of install step
mount --types proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
echo "chrooting ...."
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) ${PS1}"