HOWTO Install Gentoo Linux: Preparation

From Gentoo Linux Wiki

Jump to: navigation, search
This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Image:Gentoo_tux.png

Base Install

  1. What is Gentoo?
  2. About
  3. Preparation
  4. Partitioning
  5. Configuring
  6. Stage Progression
  7. Kernel
  8. Bootloader
  9. Test
  10. Troubleshooting
  11. Maintaining

Configuration

Base Extras

Server

Desktop

Other Articles

edit

[edit] Dual Booting with Windows

If you already have Microsoft Windows (tm) on your machine and you do not have a spare hard drive, take a look at HOWTO Install Linux after Windows for information on how to prepare your system.

[edit] Insert LiveCD && Do Stuff && Walk Away

One of the beauties of the Gentoo LiveCD is that it enables you to quickly set up your target machine for remote access and you could then login to your system on your lunch break from work and type in a few snippets of commands to move it forward. Two assumptions are made for that to be true:

  • Your router / firewall at home allows for incoming ssh connections on port 22 to the target machine.
  • You know your IP address or are using the integrated DynDNS features of a Linksys, Netgear, or D-Link router.
  • You're running Linux, OSX, or Windows, or have some other ssh capable operating system on the other end.
    • For windows you would need to download putty.

You'll need a user, password, and IP address. You'll need to start sshd. Additionally, it's always an excellent idea to start a screen session when logging in via ssh in order to resume a session easily even if the network connection is terminated by a loose cable, timeout, or what have you. It also adds a little security by obsurity to use screen as you can set all of the virtual consoles on the target machine to the prompt of a dummy account and no one will see what you have done.

date
echo "If date is incorrect, fix it with date MMDDhhmmYYYY"
screen -S install
passwd
# > secret
# > secret
useradd install -m -g users -G wheel
passwd install
# > secret
# > secret
useradd dummy -m -g nobody
passwd dummy
# > secret
# > secret
/etc/init.d/sshd start
IPADDR=ifconfig eth0 | grep "inet addr" | cut -f2 -d':' | cut -f1 -d' '
echo "This machines IP address is: ${IPADDR}"
echo "detach your screen session here with <ctrl>+<a> <d>"
echo "Resume your installation from your preferred workstation with 'ssh -l install $IPADDR'."
echo "Then 'su -' to become root as necessary."
echo "once you're settled in at the office (or whereever) start it up again:"
echo "screen -r install"

[edit] Config

For much of this tutorial the code supplied can be copy/pasted into your shell. If you create a slightly modified version of the file below, you will be able to run source /mnt/gentoo/root/install.conf and save yourself the time of typing it out in other parts of the tutorial.

File: /root/install.conf
#!/bin/bash
#/mnt/gentoo/root/config.vars


# The IP address of the target system
export IPADDR=`/sbin/ifconfig eth0 | grep "inet addr" | cut -f2 -d':' | cut -f1 -d' '`

# The hard disk to be partitioned
export DISK="/dev/hda"

# The name of the admin user account
export USER="vuhstech" 

# The snapshot & stage mirrors
export MIRROR_0="http://mirror.usu.edu/mirrors/gentoo"
export MIRROR_1="http://mirrors.acm.cs.rpi.edu/gentoo"

# Today's date
export DATE=`date +%Y%m%d`

# Time zone
export TIMEZONE="EST5EDT"

# Update system
export INIT_UPDATE="rc-update" #Which init system to use (sysvinit/rc-update or initng/ng-update)
Personal tools