Just wondering what you all think of it
QUOTE
#!bin/bash
#Gentoo Installation Script(x86)(2004.2)
#Installs from Mandrake on Partitions
#Made by Echylo
#Contact: driesdesmet@linux.be or dries.de.smet@skynet.be
#Checks if user is root
if [ `id -u` != "0" ]; then
echo "Gentoo Installation Script 2004.2"
echo "Sorry, you are not root."
echo "Please restart script as root."
fi
#When user is , it gives information about the script
echo
echo "This script installs Gentoo from Mandrake"
echo "So no Live cd required"
echo "Created by Echylo"
echo "This is for x86 machines only."
echo "Working internet connection required"
echo "To continue press a key..."
read key
#Gives user opportunity to check its partitions
echo "The script will launch DiskDrake, for you to set partitions..."
echo "If set, just close Diskdrake"
echo "Press any key to continue"
read key
echo "Launching DiskDrake..."
diskdrake
echo "I suppose that you have set partitions, and you are ready to continue"
echo "Press a key to continue"
read key
#Asks for boot, swap and home partition
echo "What is the boot partition of your gentoo installation?"
echo "Example : /dev/hdb1"
read BOOTPART
echo "What is the Swap partition?"
read SWAP
echo "What is your Gentoo(home) partition?"
read GENTOOHOME
#Activates Swap partition, mounts boot & home partition
mkswap $SWAP
swapon $SWAP
mkdir /mnt/gentoo
mount $BOOTPART /mnt/gentoo
mkdir /mnt/gentoo/boot
mount $GENTOOHOME /mnt/gentoo/boot
#Downloading stage file
cd /mnt/gentoo
echo "Downloading Stage file..."
echo "Choose your location...(1-4)"
echo "1- America"
echo "2 - Europe"
echo "3 - Australia"
echo "4 - Asia"
echo
echo "Pick number:"
read LOC
if [ $LOC -eq 1 ]
then
echo "Downloading Stage 1 file..."
wget ftp://gentoo.chem.wisc.edu/gentoo/release...-2004.2.tar.bz2
elif [ $LOC -eq 2 ]
then
echo "Downloading Stage 1 file..."
wget ftp://ftp.snt.utwente.nl/pub/os/linux/gen...-2004.2.tar.bz2
elif [ $LOC -eq 3 ]
then
echo "Downloading Stage 1 file..."
wget ftp://planetmirror.com/pub/gentoo/release...-2004.2.tar.bz2
elif [ $LOC -eq 4 ]
then
echo "Downloading Stage 1 file..."
wget ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO/releas...-2004.2.tar.bz2
else
echo "You have to pick a number between (1-4)!"
echo "Downloading Stage 1 file from default..."
wget ftp://gentoo.chem.wisc.edu/gentoo/release...-2004.2.tar.bz2
fi
#Unpacks Stage1 tar file
clear
echo
echo "Stage 1 file Downloaded"
echo "Unpacking Stage 1 file..."
tar -xjpf stage1-x86-2004.2.tar.bz2
echo "Unpacked"
echo
#Copies DNS information
echo "Copying DNS information"
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
#Mounts Proc filesystem
echo "Mounting proc filesystem"
mount -t proc none /mnt/gentoo/proc
#Chroots into new Enviroment"
echo "Chrooting into Enviroment"
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
#Updates Portage Tree"
echo "Updating Portage tree"
emerge sync
cd /usr/portage
#Stage 1 -> Stage 2
echo "Stage 1 => Stage 2 "
echo "Press key to continue"
read key
echo "BootStraping..."
scripts/bootstrap.sh
echo "Arrived in Stage 2"
#Emerging system
echo "Emerging system"
emerge system
#script finished until here
#Gentoo Installation Script(x86)(2004.2)
#Installs from Mandrake on Partitions
#Made by Echylo
#Contact: driesdesmet@linux.be or dries.de.smet@skynet.be
#Checks if user is root
if [ `id -u` != "0" ]; then
echo "Gentoo Installation Script 2004.2"
echo "Sorry, you are not root."
echo "Please restart script as root."
fi
#When user is , it gives information about the script
echo
echo "This script installs Gentoo from Mandrake"
echo "So no Live cd required"
echo "Created by Echylo"
echo "This is for x86 machines only."
echo "Working internet connection required"
echo "To continue press a key..."
read key
#Gives user opportunity to check its partitions
echo "The script will launch DiskDrake, for you to set partitions..."
echo "If set, just close Diskdrake"
echo "Press any key to continue"
read key
echo "Launching DiskDrake..."
diskdrake
echo "I suppose that you have set partitions, and you are ready to continue"
echo "Press a key to continue"
read key
#Asks for boot, swap and home partition
echo "What is the boot partition of your gentoo installation?"
echo "Example : /dev/hdb1"
read BOOTPART
echo "What is the Swap partition?"
read SWAP
echo "What is your Gentoo(home) partition?"
read GENTOOHOME
#Activates Swap partition, mounts boot & home partition
mkswap $SWAP
swapon $SWAP
mkdir /mnt/gentoo
mount $BOOTPART /mnt/gentoo
mkdir /mnt/gentoo/boot
mount $GENTOOHOME /mnt/gentoo/boot
#Downloading stage file
cd /mnt/gentoo
echo "Downloading Stage file..."
echo "Choose your location...(1-4)"
echo "1- America"
echo "2 - Europe"
echo "3 - Australia"
echo "4 - Asia"
echo
echo "Pick number:"
read LOC
if [ $LOC -eq 1 ]
then
echo "Downloading Stage 1 file..."
wget ftp://gentoo.chem.wisc.edu/gentoo/release...-2004.2.tar.bz2
elif [ $LOC -eq 2 ]
then
echo "Downloading Stage 1 file..."
wget ftp://ftp.snt.utwente.nl/pub/os/linux/gen...-2004.2.tar.bz2
elif [ $LOC -eq 3 ]
then
echo "Downloading Stage 1 file..."
wget ftp://planetmirror.com/pub/gentoo/release...-2004.2.tar.bz2
elif [ $LOC -eq 4 ]
then
echo "Downloading Stage 1 file..."
wget ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO/releas...-2004.2.tar.bz2
else
echo "You have to pick a number between (1-4)!"
echo "Downloading Stage 1 file from default..."
wget ftp://gentoo.chem.wisc.edu/gentoo/release...-2004.2.tar.bz2
fi
#Unpacks Stage1 tar file
clear
echo
echo "Stage 1 file Downloaded"
echo "Unpacking Stage 1 file..."
tar -xjpf stage1-x86-2004.2.tar.bz2
echo "Unpacked"
echo
#Copies DNS information
echo "Copying DNS information"
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
#Mounts Proc filesystem
echo "Mounting proc filesystem"
mount -t proc none /mnt/gentoo/proc
#Chroots into new Enviroment"
echo "Chrooting into Enviroment"
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
#Updates Portage Tree"
echo "Updating Portage tree"
emerge sync
cd /usr/portage
#Stage 1 -> Stage 2
echo "Stage 1 => Stage 2 "
echo "Press key to continue"
read key
echo "BootStraping..."
scripts/bootstrap.sh
echo "Arrived in Stage 2"
#Emerging system
echo "Emerging system"
emerge system
#script finished until here