Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
My Install Procedure OR The things I learned from Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Pindrop
Apprentice
Apprentice


Joined: 09 Jul 2002
Posts: 165
Location: Virginia, USA

PostPosted: Thu Sep 26, 2002 5:00 am    Post subject: My Install Procedure OR The things I learned from Gentoo Reply with quote

After, about 7 or 8 installs I have a completely functioning Gentoo Linux 1.4 system and I love it! And since I had a tough time installing and fixing things, I decided to document my procedure and the things I learned along the way.

My Computer:
Athlon 950mhz CPU
Asus A7A266 Motherboard
Acer 20x10x40 CD-RW
512MB PC133 RAM
2 HDs 60GB Maxtor (hda) and 80 GB Western Digital (hdb) both 7200 RPM
hda1 - Windows XP (/mnt/win_c) - Fat32 - 40GB
hda5 - /boot - ext3 - 100MB
hda6 - / - ext3 - 16.1GB
hda7 - swap - 1GB
hdb1 - Windows XP Storage (NTFS, which I regret since writing to it in Linux = bork)
LNE100TX Version 2.0 NIC
Sound Blaster Live! 5.1
Abit Geforce 4 Ti 4400
PS/2 Standard Keyboard
USB Microsoft Intellimouse Optical
Mindspring.com ADSL

Prolouge:
I had a working 1.2 system with gcc3.2, and I finally got around to installing ALSA and it borked my system beyong my knowledge of repair, so I opted to install from 1.2 again from scratch, and then use the scripts to upgrade to 1.4.

I booted from the 1.2 CD, loaded the kernel and isntalled. Since this process is well documented: See the 1.2 Build Guide and the 1.4 Build guide for full documentation, I will just list the changes I used for my setup.

Code:
modprobe tulip
ifconfig eth0 192.168.1.10 broadcast 192.168.1.255 netmask 255.255.255.0
route add -net default netmask 0.0.0.0 metric 1


I omitted the 'gw $Gtway' section because I do not have a default gateway. It returns an error something like 'SOCADDR: Not Found' at the submission of the route configuration but I have not had any problems with my network. I then set up my partitions, mounted them, and extracted the system tarball. In order to get my internet up to 'emerge rsync' I had to install ppp and rp-pppoe. I burned them to a CD earlier and popped it in, copied them over, and got my internet working. Here's the process for that:

Code:
# umount /mnt/cdrom
//Insert PPP CD-ROM
# mount /dev/cdroms/cdrom0 /mnt/cdrom -o ro -t iso9660
# mkdir /mnt/gentoo/usr/local/pppoe
# cp /mnt/cdrom/ppp-2.4.1.tar.gz /mnt/gentoo/usr/local/pppoe
# cp /mnt/cdrom/rp-pppoe-3.5.1.tar.gz /mnt/gentoo/usr/local/pppoe
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# mknod /dev/ppp c 108 0
# chmod 600 /dev/ppp
# cd /usr/local/pppoe/
# tar -zvxf ppp-2.4.1.tar.gz
# cd ppp-2.4.1
# ./configure
# make
# make install
# cd /usr/local/pppoe/rp-pppoe-3.5
# tar -zvxf rp-pppoe-3.5.tar.gz
# ./go

Username: you@your-isp..com
On Demand: no
DNS Information: Your ISP DNS IP Here
DNS Information: Your Secondary ISP DNS IP Here
Password: yourpass
Standalone Firewalling
Code:
# exit
//To exit the chrooted environment
# ifconfig eth0 up
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# adsl-start
//Optional, just to make sure you're connected
# exit
# ping SomeIPHere
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile


The 'adsl-start' will most likely timeout, but you should be connected. Continue the install as normal with 'emerge rsync.' I used metalog for my system logger, vcron for my cron package, and the 2.4.19-r9 gentoo-sources kernel. The following are items that are enabled in my kernel that I think could/should be used on just about any desktop system.

For starters make sure you enable these as indicated in the Install Guide:
Code maturity level options --> Prompt for development and/or incomplete code/drivers
File Systems --> /dev file system support (EXPERIMENTAL)
File Systems --> Virtual memory file system support (former shm fs)

Here's the suggested list:

For USB Mice:
Input Core Support --> Input Core Support (I loaded as a module)
Input Core Support --> Mouse Support (Module)
Input Core Support --> 1024 Horizonal 768 Vertical Resolution
USB Support --> Support for USB (Module)
USB Support --> Preliminary USB device filesystem
USB Support --> OHCI (Module)
USB Support --> HID (Module)
USB Support --> HID Input Layer Support

For Kernel Sound:
Sound --> Sound card support (Module)
Sound --> Creative SBLive! (Module)

For Hard Drive Access:
File Systems --> Kernel Automounter
File Systems --> Ext3
File Systems --> DOS FAT fs support
File Systems --> VFAT (Windows-95) support
File Systems --> NTFS file system support (read only)
File Systems --> /proc file system support
File Systems --> Second extended fs support (ext2)

CD-RW Support:
ATA/IDE Support --> IDE, ATA, and ATAPI --> Include IDE/ATAPI CD-ROM support
ATA/IDE Support --> IDE, ATA, and ATAPI --> SCSI Emulation Support
SCSI Support --> SCSI Support
SCSI Support --> SCSI Disk Support
SCSI Support --> SCSI CD-ROM support
SCSI Support --> SCSI generic support

Console Frame Buffering:
Console Drivers --> Frame-buffer support --> Support for frame buffer devices (EXPERIMENTAL)
Console Drivers --> Frame-buffer support --> VESA VGA graphics console (Since my card didn't have a driver listed)

I also set my Grsecurity at Medium, to those that set it to High: you're going to need chpax to run X11. You can get it here: http://pageexec.virtualave.net To compile it use:
Code:
cd /path/to/chpax/dir
gcc chpax.c -o chpax
./chpax -p /usr/X11R6/bin/XFree86


To enable the modules specified before I added these lines to my /etc/modules.autoload file.

soundcore
emu10k1
usbcore
hid
usb-ohci
input
mousedev

Another note on kernel compiliation: I've had problems kernels when using only 'make clean' to reset the kernel files after a compile, and I've been using 'make clean && make mrproper' and have had no problems. I've been told this is an AMD Athlon only problem. Beware that 'make mrproper' will delete your kernel config file, I always back mine up. The option to save your kernel config file is in the 'make menuconfig' at the very bottom called 'Save Kernel Configuration to an Alternate Dir' or something along those lines.

My Grub Setting for Dual Boot with XP:
Code:
$ grub
grub> root (hd0,5) //my boot partition
grub> setup (hd0)
grub> quit


Now make your /boot/grub/menu.lst

Code:
$ nano -w /boot/grub/menu.lst


default 0
timeout 15
splashimage=(hd0,5)/boot/grub/splash.xpm.gz

title=Gentoo Linux
root (hd0,5)
# This is your boot drive
kernel /boot/bzImage root=/dev/hda6

# Below needed only for people who dual-boot
title=Windows XP Professional
root (hd0,0)
chainloader +1

I unmounted my drives, and rebooted my shiny new Gentoo System. After the reboot was completed, I added my personal user, since using root is bad for day to day activites.

Code:
$ mkdir /home/user
$ adduser -d /home/user user
$ usermod -G audio,cdrom,cdrw,console,floppy,man,usb,users,wheel user


I didn't want to download a bunch of apps and have to compile them twice since I was planning on doing an 'emerge -e world' to recompile my system after I ran the 1.4 upgrade scripts. I emerged lynx and pine (What can I say, I like Pico :P )
Then I grabbed the 1.4 upgrade scripts, and ran them.

Code:
$ lynx http://www.gentoo.org/~carpaski/system_update/
Downloaded the scripts and chmodded them.
$ chmod u+rwx update-step1.sh
$ chmod u+rwx update-step2.sh
$ chmod u+rwx update-step3.sh
$ chmod u+rwx update-step4.sh


I actually had step 1 fail, I'm still not sure why but I said forget it, it just backs up my old GCC, glibc, binutils, ncurses, gettext, and texinfo anyways. I had no problems as a result of starting at step 2. After completing step 2, I edited my /etc/make.conf with the GCC3.2 flags.

USE="-gnome -gnome-libs -alsa"
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=athlon -O3 -pipe -fomit-frame-pointer -fforce-addr"
CXXFLAGS="$CFLAGS"

I did however encounter a problem during step 3 where step 2 did not completely install the GCC C++ compiler correctly and I had to run 'emerge gcc' to fix it. Then step3 ran successfully. After that I ran step 4, then 'emerge -e world' and made the mistake of having CONFIG_PROTECT="" which overwrote all of my config files in /etc. Needless to say that line is now gone from my /etc/make.conf :D The 'emerge -e world' took about 14 and 1/2 hours total, I started it at 11PM and it ended at 1:30 PM right as I got home from school.

After getting tired of typing 'adsl-start' after every reboot I made a simple rc script for it, based on the one on the RC Scripts Guide

Code:
$ nano -w /etc/init.d/adsl


#!/sbin/runscript
start() {
ebegin "Starting ADSL"
/usr/sbin/adsl-start
eend $? "Connection Failed"
}

stop() {
ebegin "Stopping ADSL"
kill $(cat /var/run/ppp0.pid)
kill $(cat /var/run/pppoe.conf-adsl.pid)
kill $(cat /var/run/pppoe.conf-adsl.pid.pppd)
kill $(cat /var/run/pppoe.conf-adsl.pid.pppoe)
eend $? "Failed to stop ADSL"
}

Code:
$ chmod u+rwx /etc/init.d/adsl
$ /etc/init.d/adsl start
$ rc-update add adsl default


Next on the list was GPM, so I could have cut and paste capabilites while I moved around in console that day, since I planned on compiling X, KDE, and Blackbox overnight. I ran 'emerge gpm' and edited my /etc/conf.d/gpm file, started gpm, and set it to start at boot. My /etc/conf.d/gpm

MOUSE=imps2
MOUSEDEV=/dev/input/mice

and starting and setting it to start at boot.

Code:
$ /etc/init.d/gpm start
$ rc-update add gpm default


Later than night I ran 'emerge kde blackbox' and let it run all night. I didn't do anything special for the setup of X or KDE, I just followed the Desktop Guide and had no problems, except in the instance of setting up kernel sound. My sound would play in /dev/sound/dsp using 'cat /usr/kde/3/share/sounds/pop.wav > /dev/sound/dsp' but I didn't have a /dev/dsp which is needed, so I made a symlink using

Code:
$ cd /dev
$ ln -s sound/dsp dsp


and it worked like a charm, and even stayed after a reboot.

After emerging Mozilla, the default fonts were very choppy and broken looking so I did some forum browsing and found out how to set up anti-alias fonts for the web. First I ran the KDE Control Center and went to System > Font Installer and copied all my fonts over from my Windows XP partition. I used Administrator Mode so the fonts would be installed system wide and not in my /home dir. After that I emerged sharefonts and freefonts and edited my /etc/X11/XF86Config and my /usr/lib/mozilla/defaults/pref/unix.js files like so:

/etc/X11/XF86Config

Section "Files"
FontPath "/usr/X11R6/lib/X11/fonts/local"
FontPath "/usr/X11R6/lib/X11/fonts/misc"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
FontPath "/usr/X11R6/lib/X11/fonts/truetype"
FontPath "/usr/X11R6/lib/X11/fonts/TTF"
FontPath "/usr/X11R6/lib/X11/fonts/sharefont"
FontPath "/usr/X11R6/lib/X11/fonts/freefont"

/usr/lib/mozilla/defaults/pref/unix.js

// TrueType
pref("font.FreeType2.enable", true);
pref("font.freetype2.shared-library", "libfreetype.so.6");
// if libfreetype was built without hinting compiled in
// it is best to leave hinting off
pref("font.FreeType2.autohinted", true);
pref("font.FreeType2.unhinted", true);
// below a certian pixel size anti-aliased fonts produce poor results
pref("font.antialias.min", 6);
pref("font.embedded_bitmaps.max", 1000000);
pref("font.scale.tt_bitmap.dark_text.min", 64);
pref("font.scale.tt_bitmap.dark_text.gain", "0.1");
// sample prefs for TrueType font dirs
pref("font.directory.truetype.1", "/usr/share/fonts/truetype");
pref("font.directory.truetype.2", "/usr/X11R6/lib/X11/fonts/TTF");
pref("font.directory.truetype.3", "/usr/X11R6/lib/X11/fonts/truetype");
pref("font.directory.truetype.4", "/usr/X11R6/lib/X11/fonts/sharefont");
pref("font.directory.truetype.5", "/usr/X11R6/lib/X11/fonts/GhostScript");
pref("font.directory.truetype.6", "/usr/X11R6/lib/X11/fonts/freefont");

HDParm Tweaks

Enabling DMA on your hard drives almost always boosts performance. Here's how you do it. First test your hard drives to see if DMA is already enabled, as it might be if you compiled it into your kernel.

Code:
$ hdparm -Tt /dev/hdax


With DMA enabled I get about 33MB/sec, without it I get about 8MB/sec for the buffered disk read. I'd say that's quite a boost. To enable DMA use

Code:
hdparm -d1 /dev/hdx


There's also several other options that can boost performance such as Multicount and IO_support. I use

Code:
hdparm -m 16 -d1 -c1 -k1 /dev/hdx


-m is for multicount, -d for dma, -c for IO support (32bit), and -k to keep my settings after a reboot. Alternatively, these commands can be added to your /etc/conf.d/local.start to start at boot.

That's all for now! Feel free to let me know of any typographical errors or corrections that need to be made. Hope this helps![/b]


Last edited by Pindrop on Sun Sep 29, 2002 2:51 am; edited 5 times in total
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Sep 26, 2002 6:39 am    Post subject: Reply with quote

Thanks for taking the time to write this. A couple of minor things: "make mrproper" includes "make clean", in fact it's "make really really clean". So "make clean" before "make mrproper" is unneeded. And whenever I mention "make mrproper", I try to add a warning that it will kill your .config file, so it's often a good idea to copy it somewhere safe first, run make mrproper, and then copy it back over.

And you're missing the http://gentoo.org/doc/en/rc-scripts.xml link in there.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
fmalabre
Guru
Guru


Joined: 19 Jun 2002
Posts: 376
Location: Chicago

PostPosted: Thu Sep 26, 2002 3:35 pm    Post subject: Reply with quote

Yep, that's very nice to write this.
The Gentoo doc is very good, but giving sample like you do is great.
Let us know when you find new stuff!
Back to top
View user's profile Send private message
Pindrop
Apprentice
Apprentice


Joined: 09 Jul 2002
Posts: 165
Location: Virginia, USA

PostPosted: Thu Sep 26, 2002 6:03 pm    Post subject: Reply with quote

Thanks for the corrections, I went ahead and updated.
Back to top
View user's profile Send private message
yavor
n00b
n00b


Joined: 19 Sep 2002
Posts: 3

PostPosted: Fri Sep 27, 2002 2:47 pm    Post subject: Reply with quote

rac,
You are wrong about the make mrproper and make clean
Try this:
Backup your kernel sources and build modules before trying it!

#emerge vanilla-sources
#cd /usr/src/linux
#make dep bzImage modules modules_install
#make mrpromer
#emerge unmerge vanilla-sources
#find /usr/src/linux

And you will see some headers left.
Now try this.

#emerge vanilla-sources
#cd /usr/src/linux
#make dep bzImage modules modules_install
#make clean
#make mrpromer
#emerge unmerge vanilla-sources
#find /usr/src/linux

There are no files left.

So make mrproper doesn't call make clean
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7695
Location: Pelotas, BR

PostPosted: Fri Sep 27, 2002 3:07 pm    Post subject: Reply with quote

Yes, it kills .config. And yes, it is annoying 8)

rac wrote:
<snip> I try to add a warning that it will kill your .config file, so it's often a good idea to copy it somewhere safe first, run make mrproper, and then copy it back over.
Back to top
View user's profile Send private message
Pindrop
Apprentice
Apprentice


Joined: 09 Jul 2002
Posts: 165
Location: Virginia, USA

PostPosted: Fri Sep 27, 2002 5:44 pm    Post subject: Reply with quote

I went ahead and edited 'make clean && make mrproper' back in, and a note to backup your config file. Make clean takes a whole 2 seconds so I don't think it matters a whole lot :D
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Fri Sep 27, 2002 6:46 pm    Post subject: Reply with quote

yavor wrote:
rac,
You are wrong about the make mrproper and make clean [...]
So make mrproper doesn't call make clean

I haven't tried your test yet, but I did have a look at the top-level Makefile:
Makefile wrote:
mrproper: clean archmrproper

...and I thought that meant that mrproper depends on clean, so clean should get called. Am I misunderstanding the Makefile? Is it lying to me?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Pindrop
Apprentice
Apprentice


Joined: 09 Jul 2002
Posts: 165
Location: Virginia, USA

PostPosted: Sun Sep 29, 2002 2:38 am    Post subject: Reply with quote

I forgot to add the good ole hdparm tweaks. Edited once again :P
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Fri Oct 04, 2002 4:43 am    Post subject: Reply with quote

Of course there will be headers there, headers aren't deleted with mrproper, nor clean.
the object files (*.o) are removed with clean, in order to facilitate a clean compilation of the kernel without any stale object files being around. mrproper wipes everything architecture-specific.. including object files. and .config :D (ugh... I hate that.. but I guess it's like complaining that a knife cuts)
Back to top
View user's profile Send private message
Bosnian[X]
n00b
n00b


Joined: 12 Jul 2002
Posts: 66
Location: Sweden, Malmö

PostPosted: Tue Oct 08, 2002 10:53 pm    Post subject: Reply with quote

When i exec the command for HD boost i get this msg. Is it ok or what...

#hdparm -d1 /dev/hda

dev/hda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Wed Oct 16, 2002 8:36 pm    Post subject: Reply with quote

Bosnian[X] wrote:
When i exec the command for HD boost i get this msg. Is it ok or what...

#hdparm -d1 /dev/hda

dev/hda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)


Ensure that your system's BIOS is set to either DMA or AUTO for the channel that your drive is located on. Also make sure you have the kernel option to Use DMA if Available. I believe it's in the section with the other IDE settings.
Back to top
View user's profile Send private message
eivinn
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 219
Location: Norway

PostPosted: Sat Oct 19, 2002 8:25 am    Post subject: Reply with quote

How do I change password of the "normal" user added?

Code:
bash-2.05a# su - eivinn
eivinn@bgo eivinn $ passwd
Changing password for eivinn
(current) UNIX password:
passwd: Authentication token manipulation error


Should have thought I was added with a blank password, but I cannot change it when just pressing enter at the (current)...
Back to top
View user's profile Send private message
Pindrop
Apprentice
Apprentice


Joined: 09 Jul 2002
Posts: 165
Location: Virginia, USA

PostPosted: Sat Oct 19, 2002 9:04 pm    Post subject: Reply with quote

I just use root and type 'passwd username' to change another users pass.
Back to top
View user's profile Send private message
KiTaSuMbA
Guru
Guru


Joined: 28 Jun 2002
Posts: 430
Location: Naples Italy

PostPosted: Sat Oct 19, 2002 10:34 pm    Post subject: Reply with quote

OdinsDream wrote:
Bosnian[X] wrote:
When i exec the command for HD boost i get this msg. Is it ok or what...

#hdparm -d1 /dev/hda

dev/hda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)


Ensure that your system's BIOS is set to either DMA or AUTO for the channel that your drive is located on. Also make sure you have the kernel option to Use DMA if Available. I believe it's in the section with the other IDE settings.

One other thing in the kernel: make sure you enable the driver for your mobo chipset.

my 2 cents
_________________
Need to flame people LIVE on IRC? Join #gentoo-otw on freenode!
Back to top
View user's profile Send private message
Bosnian[X]
n00b
n00b


Joined: 12 Jul 2002
Posts: 66
Location: Sweden, Malmö

PostPosted: Sat Oct 19, 2002 10:52 pm    Post subject: Reply with quote

i did that and it seems like my kernel does not support Via Kt333 CE chip. I have installed latest "beta" kernel 2.5.44 and it works like a charm...
Back to top
View user's profile Send private message
spyder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2002
Posts: 121

PostPosted: Sun Nov 17, 2002 1:19 pm    Post subject: Reply with quote

i don't have a /dev/input/mice...

i cannot get my optical usb mouse working for the life of me
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7695
Location: Pelotas, BR

PostPosted: Sun Nov 17, 2002 2:48 pm    Post subject: Reply with quote

I can list a couple of threads about it

this looks interesting, for example.

BTW, it does not make any difference if it's optical or not.

spyder wrote:
i don't have a /dev/input/mice...

i cannot get my optical usb mouse working for the life of me
Back to top
View user's profile Send private message
spyder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2002
Posts: 121

PostPosted: Sun Nov 17, 2002 2:57 pm    Post subject: Reply with quote

worked great...thanks
Back to top
View user's profile Send private message
joehni
Apprentice
Apprentice


Joined: 27 Jul 2003
Posts: 175

PostPosted: Thu Oct 30, 2003 4:56 pm    Post subject: Reply with quote

BTW: It is not necessary to write an own rc-script for ADSL. The package has one included, it's unintenionally called "rp-pppoe" :)
Back to top
View user's profile Send private message
Vard
n00b
n00b


Joined: 08 Jan 2004
Posts: 45

PostPosted: Sun Jan 11, 2004 5:05 am    Post subject: Alsa giving trouble Reply with quote

Hmmm... let say someone did accidentally remove the config file for the kernel with the 'make mrproper' command. How would you go about restoring it?

Do I have to start at the begining?
Back to top
View user's profile Send private message
swgeckoman
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2003
Posts: 79
Location: Springfield, MO USA

PostPosted: Thu Jan 15, 2004 5:32 pm    Post subject: Reply with quote

Unless you made a copy of your .config file in your /boot partiton (some of us do that) you will have to start over. Sorry, bummer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum