MandrivaUsers.org : Gentoo Installation Script - MandrivaUsers.org

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Gentoo Installation Script well, no choices now :P

#1 User is offline   Echylo 

  • Silent But Deadly
  • Group: Members
  • Posts: 134
  • Joined: 28-June 04

Posted 09 August 2004 - 01:55 PM

Well I was bored(gentoo is installing ;)/> ). So I was wondering if there was already a semi-Auto installation script for Gentoo, so I started to make one, as it is my first script, and probarly far from finished, there wil be some bugs in it :)/> .
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 :)/>

This post has been edited by Echylo: 09 August 2004 - 02:08 PM

0

#2 User is offline   Echylo 

  • Silent But Deadly
  • Group: Members
  • Posts: 134
  • Joined: 28-June 04

Posted 15 September 2004 - 07:11 PM

*sortofbump* is this a good idea, should I work it further out or not?
0

#3 User is offline   Windependent 

  • frequent
  • Group: Members
  • Posts: 110
  • Joined: 31-January 04

Posted 09 November 2004 - 07:48 AM

right now i'm in the midst of a Stage 1 installation, and i'm killing time during bootstrapping. yeah, an automated gentoo install script would be sort of a dream come true...
Posted Image 4.9 Stable - Firewall/Proxy
Posted Image 9.2/10.0 - Workstation
Posted Image 9.0/9.1 - Workstation
Posted Image Stage 1 Built, NPTL Enabled, 2.6 Bootstrapped. Reiser FS. f-f-f-fast!
0

#4 User is offline   arctic 

  • Platinum
  • View blog
  • Group: Global Moderator
  • Posts: 8,192
  • Joined: 11-June 04

Posted 09 November 2004 - 08:36 AM

i wish i would have had such a script some weeks ago. installing gentoo was a pain in the a... continue your work. it is a great idea.

p.s.: now that i have gentoo running, i must say that i do not find it better or worse than e.g. slackware (and configuration an installation of slack was easy compared to gentoo). it is just another ordinary linux-distro. too much hype imho :P/>

This post has been edited by arctic: 09 November 2004 - 08:36 AM

Mageia 1
0

#5 User is offline   Padma 

  • the Outbond
  • Group: Members
  • Posts: 123
  • Joined: 15-March 04

Posted 14 November 2004 - 02:51 AM

Just to give you a laugh --

I tried your script, and accidentally gave it the wrong partition for 'swap'. I ended up destroying my Mandrake '/' partition. :wall:/>

:lol:/> It could have been worse - it forced me to reinstall 10.1, and this time it is cleaner and better. ;)/>
1st Lieutenant, USAF (Retired)

Civ3 Forums Moderator: Civilization Fanatics Center


Registered Linux User #233241
0

#6 User is offline   Echylo 

  • Silent But Deadly
  • Group: Members
  • Posts: 134
  • Joined: 28-June 04

Posted 14 November 2004 - 10:13 AM

omg :P/> sorry , and I don't think I will continue working on it, working with Ubuntu now, so no time for gentoo :P/>
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users