#!/bin/bash

disk=/dev/hda
partition=${disk}1
mountPoint=/mnt/gentoo

partition() {
  echo "partitioning disk..."
  sfdisk ${disk} << EOF
;
EOF
  mkfs.ext3 /dev/hda1
}

mountDisk() {
  echo "mounting ${partition} at ${mountPoint}..."
  mount ${partition} ${mountPoint}
}

extractStageThree() {
  echo "extracting stage 3..."
  cd ${mountPoint}
  wget -N http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/releases/x86/current/stages/stage3-x86-2007.0.tar.bz2
  tar xjpf stage3*.tar.bz2
}

installPortage() {
  echo "installing portage..."
  wget -N http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/snapshots/portage-latest.tar.bz2
  tar xjf portage-latest.tar.bz2 -C /mnt/gentoo/usr
}

partition
mountDisk
extractStageThree
installPortage

Add new attachment

Only authenticated users are allowed to upload new attachments.
« This page (revision-2) was last changed on 03-03-2008 22:37 by Gus