[ << ] [ < ] [ Home ] [ > ] [ >> ]

11. Finalizing your Gentoo Installation


11.a. User Administration

Setting a root Password

Before you forget, set the root password by typing:

Code listing 1: Setting the root password

# passwd

If you want root to be able to log on through the serial console, add tts/0 to /etc/securetty:

Code listing 2: Adding tts/0 to /etc/securetty

# echo "tts/0" >> /etc/securetty

Adding a User for Daily Use

Working as root on a Unix/Linux system is dangerous and should be avoided as much as possible. Therefore it is strongly recommended to add a user for day-to-day use.

For instance, to create a user called john who is member of the wheel group (be able to change to root using su), users group (default for all users) and audio group (be able to use audio devices):

Code listing 3: Adding a user for day-to-day use

# useradd john -m -G users,wheel,audio,tty -s /bin/bash
# passwd john
Password: (Enter the password for john)
Re-enter password: (Re-enter the password to verify)

If a user ever needs to perform some task as root, they can use su - to temporarily receive root privileges. Another way is to use the sudo package which is, if correctly configured, very secure.

11.b. Reboot and Enjoy


Congratulations! Your Gentoo system is now ready. Exit the chrooted environment and unmount all mounted partitions. Then type in that one magical command you have been waiting for: reboot.

Code listing 4: Rebooting the system

# exit
# cd /
# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
# reboot

Of course, don't forget to remove the bootable CD, otherwise the CD will be booted again instead of your new Gentoo system.

OldWorld PPC users will boot in MacOS since their bootloader isn't installed yet. Those users should read Optional: Configuring BootX. MIPS users will have to do some more tweaking in their MIPS PROM to get Gentoo to work. Those users should read Optional: Getting Gentoo/MIPS to Work.

GRP users can continue with Optional: Install GRP Packages, all the rest can finish up with Where to go from here?.

Optional: Configuring BootX

Important: This subsection is only for PPC users who want to use BootX as bootloader. All other readers should skip this subsection.

Now your machine is booted in MacOS, open the BootX control panel. Select Options, and uncheck Used specified RAM disk. When you return to the BootX main screen, you will now find an option to specify your machine's root disk and partition. Fill these in with the appropriate values.

BootX can be configured to start Linux upon boot. If you do this, you will first see your machine boot into MacOS then, during startup, BootX will load and start Linux. See the BootX home page for more information.

If you are a GRP users you can continue with Optional: Install GRP Packages, otherwise go to Where to go from here?.

Optional: Getting Gentoo/MIPS to Work

Important: This subsection is only for MIPS users! All other readers should skip this subsection.

When you are rebooted, go to the System Maintenance Menu and select Enter Command Monitor (5). If you want to test your new Gentoo installation, you can just run boot -f <kernel name>. To have your system permanently boot into the Gentoo installation, you need to set some variables in the MIPS PROM:

Code listing 5: Configuring the PROM to Boot Gentoo

1) Start System
2) Install System Software
3) Run Diagnostics
4) Recover System
5) Enter Command Monitor

Option? 5
Command Monitor.  Type "exit" to return to the menu.

(<root device> = Gentoo's root partition, e.g. /dev/sda3)
>> setenv OSLoadPartition <root device>

(To list the available kernels, type "ls")
>> setenv OSLoader <kernel name>
>> setenv OSLoadFilename <kernel name>

(Declare the kernel parameters you want to pass)
>> setenv OSLoadOptions <kernel parameters>

(Provide the location of the Volume Header)
>> setenv SystemPartition scsi(0)disk(1)rdisk(0)partition(8)

(Automatically boot Gentoo)
>> setenv AutoLoad Yes

(Set the timezone)
>> setenv TimeZone EST5EDT

(Use the serial console - graphic adapter users should have "g" instead of "d1" (one))
>> setenv console d1

Now you're ready to enjoy Gentoo!

Optional: Install GRP Packages

Important: This part is for GRP users only. Other users should skip this part and continue with Where to go from here?.

Now that your system is booted, log on as the user you created (for instance, john) and use su - to gain root privileges:

Code listing 6: Gaining root privileges

$ su -
Password: (Enter your root password)

Now we need to change the Portage configuration to look for the prebuilt binaries from the second CD (Gentoo Packages CD). First mount this CD:

Code listing 7: Mount the Packages CD

(Put the Gentoo Packages CD in the CD tray)
# mount /mnt/cdrom

Now configure Portage to use /mnt/cdrom for its prebuilt packages:

Code listing 8: Configuring Portage to use /mnt/cdrom

# ls /mnt/cdrom

(If there is a /mnt/cdrom/packages directory:)
# export PKGDIR="/mnt/cdrom/packages"

# export PKGDIR="/mnt/cdrom"

Now install the packages you want. The Packages CD contains several prebuilt binaries, for instance KDE:

Code listing 9: Installing KDE

# USE="bindist" emerge --usepkg kde

The USE="bindist" is needed when you install XFree (either directly or as a dependency). It prevents the downloading of Microsoft's core fonts (which we cannot distribute on our LiveCDs).

Be sure to install the binaries now. When you do an emerge sync to update Portage (as you will learn later), the prebuilt binaries might not match against the ebuilds in your updated Portage. You can try to circumvent this by using emerge --usepkgonly instead of emerge --usepkg.

Congratulations, your system is now fully equiped! Continue with Where to go from here? to learn more about Gentoo.

[ << ] [ < ] [ Home ] [ > ] [ >> ]