All pastes #392852 Raw Edit

TheX1le

public shellscript v1 · immutable
·published 2007-03-13 03:36 UTC
rendered paste body
#!/bin/sh#Created by TheX1leclearecho "This simple script is just for installing bt2, it assumes you have created and formatted your partitions all ready. Version BETA 2" #Handles input of boot and root partitionsecho "Your boot partition EX. hda1" read BOOTecho "Your root partition EX. hda3"read ROOTclearmkdir -p /tmp/backtrack/boot#determines if you are using mutiple partitons or notif [ "$BOOT" == "$ROOT" ]; then	echo "This is not the best recomended install method"	echo "Mounting Drive"	mount /dev/$ROOT /tmp/backtrack	if [ "$?" != "0" ]; then		echo "Mounting failed check your partitions"		exit	fielse	echo "Mounting Drives"	mount /dev/$BOOT /tmp/backtrack/boot	mount /dev/$ROOT /tmp/backtrack	if [ "$?" != "0" ]; then		echo "Mounting failed check your partitions"                exit	fifi#copies over the filescp --preserve -R -v /{bin,dev,home,pentest,root,usr,etc,lib,opt,sbin,var} /tmp/backtrackif [ "$?" != "0" ]; then	echo "Files did not copy correctly there were some errors"	exitelse	echo "Backtrack files copied sucessfully"fimkdir /tmp/backtrack/{mnt,proc,sys,tmp}mount --bind /dev/ /tmp/backtrack/dev/mount -t proc proc /tmp/backtrack/proc/cp /boot/vmlinuz /tmp/backtrack/bootif [ "$?" != "0" ]; then        echo "Kernel did not copy correctly there was an error"	exitelse        echo "Kernel copied sucessfully"fi read -p "Backtrack copied to hard drive successfully press the ANY KEY to continue"clear"your next step is to chroot into your new install IE [chroot /tmp/backtrack/ /bin/bash], then edit /etc/lilo.conf and run lilo -v . Thats it your installed"