diff --git a/kali-chroot.sh b/kali-chroot.sh index c3f6a25..28f4cdb 100755 --- a/kali-chroot.sh +++ b/kali-chroot.sh @@ -27,7 +27,7 @@ if [ ! -x /bin/vmware-mount ]; then fi # variables -kali_vmdk="/home/doomguy/VMs/Kali-Linux-2.0.0-vm-amd64/Kali-Linux-2.0.0-vm-amd64.vmdk" +kali_vmdk="/media/ubuntu/316e1560-2591-4978-aaea-842189cb1dd2/kali-linux-2024.1-vmware-amd64.vmwarevm/kali-linux-2024.1-vmware-amd64.vmdk" mnt_path="/mnt/kali" if [ ! -x $mnt_path ]; then @@ -43,6 +43,12 @@ if [ "$1" = "start" ]; then [ -z "$(mount | grep $mnt_path/proc)" ] && /bin/mount -t proc proc $mnt_path/proc/ [ -z "$(mount | grep $mnt_path/sys)" ] && /bin/mount -t sysfs sys $mnt_path/sys/ [ -z "$(mount | grep $mnt_path/dev)" ] && /bin/mount -o bind /dev $mnt_path/dev/ + #this line fixes pts error uncomment if you encounter it + #[ -z "$(mount | grep $mnt_path/dev/pts)" ] && /bin/mount -o bind /dev/pts/ $mnt_path/dev/pts + cp /etc/resolv.conf $mnt_path/etc/resolv.conf # copy nameservers + cp /etc/hosts $mnt_path/etc/hosts # copy hosts file + + # change to new root chroot $mnt_path @@ -55,8 +61,9 @@ if [ "$1" = "stop" ]; then echo "Stopping Kali chroot.." /bin/umount $mnt_path/proc/ /bin/umount $mnt_path/sys/ + #/bin/umount $mnt_path/dev/pts /bin/umount $mnt_path/dev/ /bin/vmware-mount -x echo "all done!" -fi +fi \ No newline at end of file