Installing Slackware and Gentoo

From LQWiki
Jump to navigation Jump to search

1.Introduction

In this guide we will install both Slackware and Gentoo. We will use Slackware to install Gentoo.Lets get started.

2.Obtain Install CDs

We are going to need two install CDs for this project.Lets get Slackware 10.1.

Slackware 10.1

Now lets get the Gentoo install CD

Gentoo x86 LiveCD

We don't really need this CD, but it is great to have around, just in case. The most important file to download is the stage file, also available at this location.

3.Installing Slackware

We only need the first Slackware cd to give us everything we need.We will have xorg,fluxbox and mozilla around if we need to ask for some help at

LinuxQuestions

or just surf the forums while gentoo is compiling.Here is a great guide for installing slackware.

Installing Slackware

Here is another good one

MadPenguin Handbook

When we set up the partitions we will need at least

  • /boot hda1 ext3 (32M)
  • / hda2 reiserfs (this is for slackware)
  • / hda3 (create it with fdisk,this is for gentoo)
  • swap hda4 swap (512M)

4.Installing Gentoo


This is in no way better than the Gentoo Install Guide just our take on it

  • (Make sure your time and date is correct. If wrong, set it with date MMDDhhmmCCYY )#date
  • (Make the directory for gentoo) # mkdir /mnt/gentoo
  • (Format the /root partition) # mkreiserfs /dev/hda3
  • (Mount the root partition) # mount /dev/hda3 /mnt/gentoo
  • (Create the boot mountpoint) # mkdir /mnt/gentoo/boot
  • (Mount the boot partition) # mount /dev/hda1 /mnt/gentoo/boot
  • (Go to the mountpoint) # cd /mnt/gentoo
  • ( download the latest stage3 tarball)

stages

  • ( ... and extract) # tar -xvjpf stage<your stage>.tar.bz2
  • (Copy over nameserver information) # cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
  • (Mount the proc filesystem) # mount -o bind /proc /mnt/gentoo/proc
  • (Flushing the environment)# env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash
  • (Load the necessary variables) # env-update; source /etc/profile
  • (update Portage) # emerge --sync

5.Creating /etc/fstab

Then edit your fstab to look similar to the one below making sure to compensate for differences in partition schemes and removable drives and media.

nano -w /etc/fstab

  • /dev/hda1 /boot ext3 defaults,noatime 1 2
  • /dev/hda4 none swap sw 0 0
  • /dev/hda3 / reiserfs noatail 0 1
  • none /proc proc defaults 0 0
  • none /dev/shm tmpfs defaults 0 0
  • /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,user 0 0

6.Installing the kernel

Gentoo kernel guide

We have gone this far,lets manually configure our kernel

Manual Configuration

#emerge gentoo-dev-sources
#cd /usr/src/linux
#make menuconfig
First Make sure we have support for our filesystem
This must be compiled directly into the kernel
 File systems
 CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS=y
 CONFIG_JBD is not set
#CONFIG_REISERFS_FS=y
 CONFIG_REISERFS_CHECK is not set
 CONFIG_REISERFS_PROC_INFO is not set
 CONFIG_REISERFS_FS_XATTR is not set
 CONFIG_JFS_FS is not set
 CONFIG_XFS_FS is not set
 CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS is not set
 CONFIG_QUOTA is not set
#CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS is not set
#CONFIG_AUTOFS4_FS=y
 Pseudo filesystems
#CONFIG_PROC_FS=y
#CONFIG_PROC_KCORE=y
#CONFIG_SYSFS=y
#CONFIG_DEVFS_FS=y
 CONFIG_DEVFS_MOUNT is not set
 CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS_XATTR is not set
#CONFIG_TMPFS=y
 CONFIG_TMPFS_XATTR is not set
 CONFIG_HUGETLBFS is not set
 CONFIG_HUGETLB_PAGE is not set
#CONFIG_RAMFS=y
Make sure your chipset and drives are compiled directly into the kernel. Don't forget to select networking and soundcard support"*"and your soundcard and ethernet card as modules"m"
Take your time and when ready compile your kernel. From here onwards we assume that the kernel you are installing is the 2.6.10-gentoo-r6 version.
#make && make modules_install
#cp arch/i386/boot/bzImage /boot/kernel-2.6.10-gentoo-r9
#cp System.map /boot/System.map-2.6.10-gentoo-r9
#mkdir /mnt/slackware
#mount /dev/hda2 /mnt/slackware
#cp /lib/modules/2.6.10-gentoo-r6 /mnt/slackware/lib/modules

7.Configuring your System

  1. echo tux > /etc/hostname (setting the hostname)
  2. echo homenetwork > /etc/dnsdomainname (setting the domainname)
  3. rc-update add domainname default (adding the domainname to the default runlevel)

8.Configuring your Network

Too much to cover here,check this out;

Configuring your Network

Automatically Start Networking at Boot

rc-update add net.eth0 default

If you use dhcp lets emerge it now

emerge dhcpcd

9.Install additional tools

(Install system logger; choice: sysklogd, metalog, msyslog, syslog-ng)

emerge syslog-ng 

(Have the systemlogger automatically started at boot)

rc-update add syslog-ng default

(Install cron daemon; choice: vixie-cron, dcron, fcron)

emerge vixie-cron

(Have the cron daemon automatically started at boot)

rc-update add vixie-cron default   

(install hotplug)

emerge hotplug

(have hotplug automatically started at boot)

rc-update add hotplug default

(reiserfsprogs)

emerge reiserfsprogs

For udev

Next we will be using udev so check this out

Gentoo udev guide

  1. emerge coldplug
  2. rc-update add coldplug default
  3. emerge udev

edit /etc/conf.d/rc

(Set root password)

passwd

(Create a user)

useradd your_user -m -G users,wheel,audio -s /bin/bash

(Set password for that user)

passwd your_user

(Set the hostsfile, ex:"127.0.0.1 localhost mymachine")

nano -w /etc/hosts

(Configure basic system settings; follow comments)

nano -w /etc/rc.conf

(Setup networking; dhcp-users should set iface_eth0="dhcp")

nano -w /etc/conf.d/net

Now lets make sure we didn't forget anything

  • Check it here

Gentoo install reference

(Exiting the chroot)

exit; cd /

(Unmounting partitions)

umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo

(Reboot)

reboot

Setting Up lilo
Note: Lilo is not the default boot loader for Gentoo.

O.K. almost done,now the easy part,reboot into Slackware

open up /etc/lilo.conf

pico -w /etc/lilo.conf

add this to the bottom

image = /boot/kernel-2.6.10-gentoo-r6

root = /dev/hda4

label = Gentoo

read-only

ctrl o plus enter to save ctrl x to exit

Make sure to run /sbin/lilo

Sources