Difference between revisions of "Gentoo Installation"
Line 98: | Line 98: | ||
Modify make.conf as follows: | Modify make.conf as follows: | ||
{{warning| Do not modify the CHOST, this will cause problems!}} | {{warning| Do not modify the CHOST, this will cause problems!}} | ||
+ | |||
+ | {{code|text= | ||
+ | CFLAGS="-fstack-protector-all -fforce-addr -Os -pipe -march=native" | ||
+ | CXXFlags="${CFLAGS}" | ||
+ | |||
+ | |||
+ | FEATURES="metadata-transfer sandbox candy parallel-fetch" | ||
+ | |||
+ | USE="gtk truetype postgres freetype jpg jpeg png gif imap ttf winscp passwd scp X gnutls mysql v4l2 extras lisp threads ithreads acpi bash-completion bzip2 crypt cracklib css ctype apache2 curl curlwrappers dbus encode ftp gcj gd geoip udev ipv6 lua ncurses nsplugin python readline sockets socks5 sqlite sse sse2 ssl suid unicode vim-syntax xml php perlsuid" | ||
+ | |||
+ | #Replace Y with the output of the grep command and X with the returned number +1. For one core, you'd have "--jobs=1" and "-j2". | ||
+ | |||
+ | MAKEOPTS="-jX -s" | ||
+ | # Only use the below line if you have a multicore CPU or multiple processors | ||
+ | # EMERGE_DEFAULT_OPTS="--jobs=Y --load-average=1.5" | ||
+ | PORTAGE_NICENESS="12" | ||
+ | |||
+ | # ^x Y Enter to save and quit, this is CTRL+X -> Y -> RETURN KEY | ||
+ | }} |
Revision as of 20:32, 24 November 2011
Gentoo is a source-based linux distribution.source-based means every application is compiled locally.
You can download a copy of gentoo Here
To install gentoo you will need to create a bootable LiveCD or LiveUSB.
There are many ways one could create a LiveCD or LiveUSB, but that is outside of the scope of Gentoo Installation
Virtual Machine Setup
If you want to set up Gentoo within a virtual machine you will need at least:
- Around 512MB to 1GB of RAM
- At least 10GB HDD
- Networking features enabled
And preferably multiple cores on an x86_64 processor
Hard Drive Setup
ls /dev | grep sd cfdisk /dev/sda
cfdisk will then bring you into an ncurses gui.
Use cfdisk to:
- Create 100MB Partition Bootable at the Beginning
- Create 2048MB Partition at the beginning
- Create remaining free space partition at the beginning
Choose to Write tables to disk, and then exit.
mkfs.ext2 /dev/sda1 mkswap /dev/sda2 mkfs.reiserfs /dev/sda3 mount -t reiserfs /dev/sda3 /mnt/gentoo ; cd /mnt/gentoo wget http://gentoo.arcticnetwork.ca/releases/x86/current-stage3/stage3-i686-20110614.tar.bz2
for the below line, you can simply press the TAB button after stage3 and it will automatically complete the command, just press enter to confirm it
tar xvpjf stage3* swapon /dev/sda2 cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
Okay, now you've set up your hard drives, downloaded a copy of gentoo on your live environment, and copied resolv.conf over.
Before continuing make sure you can access the internet.
you can test this by pinging google:
ping -c 2 google.com
if it isn't working, try the following:
you might need to do this each time you reboot |
ifconfig eth0 down && ifconfig eth0 up dhcpcd eth0
Base installation and Configuration
Remember the number in the output of this command, you will need it later. |
grep -ci "processor" /proc/cpuinfo
Download & Extract portage to /mnt/gentoo/usr/
cd /mnt/gentoo/usr/ wget http://gentoo.arcticnetwork.ca/releases/snapshots/current/portage-latest.tar.bz2 tar xvjf portage-latest.tar.bz2
Open make.conf in nano.
cd /mnt/gentoo/etc/ nano make.conf
Modify make.conf as follows:
Do not modify the CHOST, this will cause problems! |
CFLAGS="-fstack-protector-all -fforce-addr -Os -pipe -march=native" CXXFlags="${CFLAGS}"
FEATURES="metadata-transfer sandbox candy parallel-fetch" USE="gtk truetype postgres freetype jpg jpeg png gif imap ttf winscp passwd scp X gnutls mysql v4l2 extras lisp threads ithreads acpi bash-completion bzip2 crypt cracklib css ctype apache2 curl curlwrappers dbus encode ftp gcj gd geoip udev ipv6 lua ncurses nsplugin python readline sockets socks5 sqlite sse sse2 ssl suid unicode vim-syntax xml php perlsuid" #Replace Y with the output of the grep command and X with the returned number +1. For one core, you'd have "--jobs=1" and "-j2". MAKEOPTS="-jX -s"
PORTAGE_NICENESS="12" # ^x Y Enter to save and quit, this is CTRL+X -> Y -> RETURN KEY |