PDA

View Full Version : Installing Gentoo


wyrd_fish
22-04-2006, 11:05 AM
oops, this HDDs full


next time, i'll get a bigger one... :(



Hold onto your knickers people, i'm about to, for the second time, attempt a gentoo install...

i'm going to try and both document my progress and write a tutorial in the same prose

(gentoo's not for beginners btw, try ubuntu first ;) )

Stage 1:

aquire a live/install cd from www.gentoo.org, i went for the minimum install cd

Stage 2:

stick in in and boot it.

if your on a lappy you may want to pass "acpi=force" and "dopcmcia" to the kernel thus.

gentoo acpi=force dopcmcia

also, it'll attempt to detect the best vid res for you, my laptop supports a larger res than the monitor does, so i had to pass "vga=0x314" as well

gentoo acpi=force dopcmcia vga=0x314

table of vga codes, borrowed from here (http://www.linuxforums.org/forum/linux-tutorials-howtos-reference-material/3393-how-set-up-framebuffer-part-1-a.html):

| 640x480 800x600 1024x768 1280x1024
----+-------------------------------------
256 | 0x301 0x303 0x305 0x307
32k | 0x310 0x313 0x316 0x319
64k | 0x311 0x314 0x317 0x31A
16M | 0x312 0x315 0x318 0x31B

Step 3:

lets make sure that the network's ok...

now i'm on a network with dhcp, and a quick ifconfig tells me that've got an ip address and a ping to google.com makes sure that dns et al is working.

Step 4:

stop, it's formatting time!

for this we're going to use fdisk

in my lappy i've 1 HDD and a dvd drive

the HDD is hda and the dvd drive is hdc

so we type "fdisk hda" and are greated with a prompt.

first i'll delete all of my dads old rubbish, don't worry, this is an old drive. about 700 meg if i remember rightly

to type d folled by the number of the partition you want to remove

now we need some new partitions, so we type n.

followed by p, for a primary partiotion

and number it 1

and give it a starting cylnder of 1
and ending on 500

this'll be our system, i can't be bothered to seperate / and /home on a 722meg drive

and then another primary partition, numbered 2, with the default params, this'll be our swap partionton.


now we can use "w" to write the changes and exit fdisk :D

all/any data on the disk is now gone, forever, unless you want to get complicated...


Step 5:

lets finish our swap partion

"mkswap /dev/hda2"

and turn it 'on'

"swapon /dev/hda2"


Step 6:

it's time to format your data partition..

ext3 is my prefered filesystem, so lets give it a whirl with "mkfs.ext3 /dev/hda1"

it should now print out a load of stuff, have a quick scan for errors and lets move on

now we need to mount this hdd in /mnt/gentoo

make a sub dir if your want with "mkdir hdd"

"mount -t ext3 /dev/hda1 /mnt/gentoo/hdd"


Step 7:

now we need to get the kernel source tarball

for some reason the guide asks you to make sure that the computer's time's correct

this can be set and checked with date


Step 8:

we need to download the one we wantform the gentoo mirrors list (http://www.gentoo.org/main/en/mirrors.xml)

"wget http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/releases/x86/2006.0/stages/stage1-x86-2006.0.tar.bz2"

this is ~18meg


Step 9:

decompress the tarball

"bzip2 -d stage1*"

then extract the tarball to your newly mounted hdd

"tar -xf stage1*"


Step 10:

edit /mnt/gentoo/hdd/etc/make.conf, useing /mnt/gentoo/hdd/etc/make.conf.example to help you

Step 11:

then run these commands, one line at atime
mount -t proc none /mnt/gentoo/proc
cp /etc/resolv.conf /mnt/gentoo/hdd/etc/
chroot /mnt/gentoo/hdd /bin/bash
env-update && source /etc/profile
emerge --sync

this transfers you to your HDD... ooo...

Step 12:

Martinus
22-04-2006, 12:15 PM
Dude, stage 1 is entirely unnecessary and puts loads of people off Gentoo.

You can quite happily install stage three and then recompile all of the tools from inside a fully working install should you feel the need to optimise.

wyrd_fish
22-04-2006, 01:07 PM
martinus, i'm not doing this as a practical exersise, more an academic one

i've time to kill and a spare old HDD, what else am I going to do?

Lagmeister
22-04-2006, 01:21 PM
Have fun, last time I did the whole thing myself I got it to load into X11 once and never again after that.

Martinus
22-04-2006, 01:28 PM
I would advise you to post that at the top of your first post wyrd as I can guarantee you somebody might follow your guidelines and have a bash at it. I still don't see any point in doing a stage 1 or 2, particularly on a lappy which would be pushed pretty hard and for along duration crunching through the code.

I had two attempts at a stage 1 before I did more research and realised that it was all pretty needless. The stage 3 installs I did after that worked fine. :)