Sites

Wikipedia
SlashDot
Gentoo Linux
Loop-AES Encryption
Geoiptool

Monday, June 8, 2009

Installing Gentoo Linux (x86)

Ok, so lets get down to installing the best linux distro available. Some things we will need:
  • Internet Connection
  • CD/DVD Burner
  • PC
  • Minimum 4GB of Space
  • One Human
Alright now we are ready to rock n roll. Get the gentoo Install CD from HERE.
There is also a list of mirrors available Here.
Burn this onto a blank CD-R and then insert the cd into the PC we are installing
gentoo on.

Make sure the Bios is setup to boot from the CDROM before the HDD's.
The Bios can usually be accessed by pressing one of these keys on bootup:
F1 , F2 , F10 , F12 , del
Usually the bios will say press BLANK to enter setup. That is the key you should press
to enter the bios and change the boot sequence.

Now the PC should boot off the Gentoo Install CD, If its working correctly you should see
This:














Press enter It will continue to boot the Gentoo Install CD.
Once its done booting you need to configure your ethernet card to access the internet, most common cards will be detected on bootup. Issueing the Command:
ifconfig -a should show atleast one ethX interface.

After You have configure your ethernet card and can access the internet you may continue on.

I like to finish the installed from another PC over a ssh terminal.(/etc/init.d/sshd start) This makes it easy to just copy and paste the commands I will be listing. If not you can manually issue them one at a time.
So lets get started.....

Preparing the Disks

Now we are going to partition and format the Disks.
livecd ~ # fdisk /dev/sda  (/dev/sda is the main
harddisk in this case, but it can be different,
forexmple PATA drives are labeled HDx instead of SDx.)


Your Output May Vary
but as you

can see here
this disk has
no partitons yet.




Now we are going to create a 7gigabyte Partition for gentoo.




Now we need to do the same but this time we are creating about a 1Gigabyte Partition
for the swap system. Follow the same steps as above but you will now be specifying a smaller Size and after you will need to issue these commands to change the partition type
to Linux Swap. After follow the steps in the image below, issuing the w saves the changes to the
disk drive.
















Next Step, Create the file systems and activate swap

livecd ~ # mke2fs -j /dev/sda1
(sda1 is the first partition we created)
livecd ~ # mkswap /dev/sda2 && swapon /dev/sda2
(sda2 should be your swap partition)

Mounting the file systems:

livecd ~ # mount /dev/sda1 /mnt/gentoo
livecd ~ #
cd /mnt/gentoo


livecd gentoo # wget http://distfiles.gentoo.org/releases/x86/2008.0/stages/stage3-i686-2008.0.tar.bz2

livecd gentoo #
tar xjpf stage3*
(this extracts the file we downloaded)
livecd gentoo #
cd /mnt/gentoo/usr


livecd usr # wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2

livecd usr # tar xjf portage-lat*
(same thing extracting the file)

livecd usr #
cd /
livecd / #
mount -t proc proc /mnt/gentoo/proc
livecd / #
mount -o bind /dev /mnt/gentoo/dev
livecd / #
cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / #
chroot /mnt/gentoo /bin/bash
livecd / #
env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...


Time To Set Your TimeZone
(Using US/Eastern as an example)


livecd / # cp /usr/share/zoneinfo/US/Eastern /etc/localtime

Now We need to edit the /etc/fstab file,
all we are doing here is replacing the parition
names where there are currently /dev/ROOT,
and /dev/SWAP.

Should look something like this:












Almost done, Now we need to set the root password again
At the prompt type passwd root, then enter your desired
password.

livecd #
emerge syslog-ng (this installs syslog)

One last step before we take out the Boot CD and
reboot the PC. We need a bootloader to
load linux and or other OS's.

I think lilo is the easiest to work with so,
issue: emerge lilo this will download
and install the latest version of lilo.

now we need to edit the lilo.conf located in /etc/
nano /etc/lilo.conf


#lilo.conf
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
compact
prompt
timeout=50
image=/boot/vmlinuz
label=Gentoo
root=/dev/sda1
read-only
other=/dev/sdb1
label=win
#end lilo.conf

now save it, and type lilo at the prompt
reboot and remove the CD and you are done.
Now you can move on to installing the
software you want.

Bookmark and Share

No comments:

Post a Comment