# Make sure only root can run our scriptif[$EUID -ne 0]; thenecho"This script must be run as root"1>&2exit1fi

# Make sure that $1 is not emptyif[ ! -n "$1"]; thenecho -e "\033[1;33mYou must give an argument which device you want to chroot in (without leading '/dev/') "echo -e "\033[1;33mExample '$0 sda8' will chroot the device /dev/sda8 into /mnt/chroot."exit1fi