PDA

View Full Version : A Complete Gentoo Install - Gentoo 2.6.19-r5


carpenike
Feb 25, 2007, 01:37 PM
Hello,

Figured some people may find this helpful... I just installed Gentoo Linux inside my Parallels Desktop for MAC... Running this on a Core Duo Macbook Pro with 2GB RAM and 80 gig hdd. Recompiled the entire system twice (emerge -e world, emerge -e world) to match the following /etc/make.conf:

# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -march=nocona -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="-midi mmx nptlonly sse sse2 zlib"
PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles
PKGDIR=${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
PORTDIR_OVERLAY=/usr/local/portage
# This sets what to log
PORTAGE_ELOG_CLASSES="warn error log"
# And this is how to do it
PORTAGE_ELOG_SYSTEM="save"
MAKEOPTS="-j2"
GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
RSYNC_RETRIES="3"
RSYNC_TIMEOUT=180
PORTAGE_NICENESS=3
AUTOCLEAN="yes"
FEATURES="distlocks sandbox userpriv usersandbox"
CCACHE_DIR="/var/tmp/ccache/"
CCACHE_SIZE="4G"
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="parallels"


Therefore, this install has the latest stable branch packages as of 2/25/2007. Outside of the base install packages, these packages were installed:

syslog-ng
vixie-cron
slocate
rcs
alsa-utilities

The kernel was built to allow alsa to work and also networking. Alsa was built as modules and loads correctly.

A link to the kernel config can be found Here. (https://www.holthome.net/ryan/parallels/gentoo/config.gz)
- Roughly 9kb

A link to the image files (Parallels) can be found Here. (https://www.holthome.net/ryan/parallels/gentoo/gentoo_2.6.19-r5.tar.bz)
- Roughly 1GB

The Parallels configuration has 10GB of space allocated to the install, and uses 512MB RAM. Partition layout is as follows:

rytoo ~ # fdisk -l

Disk /dev/hda: 10.7 GB, 10737893376 bytes
16 heads, 63 sectors/track, 20806 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 195 98248+ 83 Linux
/dev/hda2 196 1188 500472 82 Linux swap / Solaris
/dev/hda3 1189 10877 4883256 83 Linux
/dev/hda4 10878 20806 5004216 5 Extended
/dev/hda5 10878 15722 2441848+ 83 Linux
/dev/hda6 15723 20806 2562304+ 83 Linux

System uses reiserfs for all partitions... Fstab is as follows:

rytoo ~ # cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1 /boot reiserfs noauto,noatime,notail 1 2
/dev/hda3 / reiserfs noatime,notail 0 1
/dev/hda2 none swap sw 0 0
/dev/hda5 /usr reiserfs notail,noatime 0 1
/dev/hda6 /var reiserfs notail,noatime 0 1
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0

# NOTE: The next line is critical for boot!
proc /proc proc defaults 0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0


The root password is root.

This is a completely minimal install. I'm sharing it because I planned on backing it up to allow easy "do-overs" and the ability to add multiple server OS's as I saw fit. From here you should be able to build XORG and than install a WM. I walked through the Gentoo Install procedures and it worked fine for me; followed advice I found from other posts on the forums regarding CHOST and CFLAG options... This should save you time as everything was recompiled for those CHOST and CFLAG options... Hopefully this is helpful for some. I love Gentoo and the ability to now run it on my Mac Book Pro is awesome!

Thanks Parallels for an excellent piece of software.

Quillz
Feb 25, 2007, 06:53 PM
Thanks, this will come in handy, as I plan to install Gentoo Linux alongside my Ubuntu Linux virtual machine.

carpenike
Mar 3, 2007, 02:11 PM
A few changes to my previous post...

You have to use the vesa or vga drivers for the Xorg, which I'm sure is in the documentation. :)

Therefore I changed my make.conf file to this...

# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -march=nocona -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="hal kde -midi mmx nptlonly qt3 qt4 sse sse2 zlib"
PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles
PKGDIR=${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
PORTDIR_OVERLAY=/usr/local/portage
# This sets what to log
PORTAGE_ELOG_CLASSES="warn error log"
# And this is how to do it
PORTAGE_ELOG_SYSTEM="save"
MAKEOPTS="-j2"
GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
RSYNC_RETRIES="3"
RSYNC_TIMEOUT=180
PORTAGE_NICENESS=3
AUTOCLEAN="yes"
FEATURES="distlocks sandbox userpriv usersandbox"
CCACHE_DIR="/var/tmp/ccache/"
CCACHE_SIZE="4G"
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="vesa vga"



And here's my xorg.conf file; it works... I found it on the Gentoo forums... This works for my MacBook Pro Core Duo 15.4"... It won't work on other sizes unless you modify the Modeline and resolution options...

Section "Monitor"

Identifier "My Monitor"

HorizSync 31.5 - 100
VertRefresh 59.0 - 75.0

Modeline "1440x900_60.00" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync

EndSection


Section "Device"
Identifier "* Generic VESA compatible"
Driver "vesa"
#VideoRam 4096
EndSection


Section "Screen"
Identifier "Screen 1"
Device "* Generic VESA compatible"
Monitor "My Monitor"
DefaultDepth 24

Subsection "Display"
Depth 8
Modes "1440x900"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1440x900"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1440x900"
ViewPort 0 0
EndSubsection
EndSection


I saw another post here:

http://ryos.vox.com/library/post/installing-ubuntu-on-my-mbp-via-parallels.html

That recommended a different HorizSync and VertRefresh... I'm not sure if that one is better than this one or not... But mine works as is so I didn't bother messing with it...

Installing KDE now...

Also, I get a kernel panic if I try to add more RAM to the VM before starting it up... Is this normal? Is there anyway I can add more RAM without re-installing the OS?

majestico
Mar 5, 2007, 05:59 PM
Thanks a lot for this, very, very helpful.

Is there an easy way to re-size these partitions? I started emerging x and near the end i realized i was at 100% on hda5.

carpenike
Mar 7, 2007, 03:38 PM
I was thinking about my problem and I remembered this backup script that I found before... This *should* work... Just backup the installed files and than re-create the Parallels image... You could hypothetically build it however you want at that point and just use this stage 4 install to re-create it how you want to...

http://blinkeye.ch/mediawiki/index.php/GNU/Linux_System_Backup_Script_(stage4)

This would be a very long way to fix my problem of not being able to increase the RAM, but would fix it... This would allow you to make your partitions as large as you'd like...

I got X and KDE installed now and here's my df...

rytoo ryan # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 4883044 81412 4801632 2% /
udev 257376 2684 254692 2% /dev
/dev/hda5 2441712 2301236 140476 95% /usr
/dev/hda6 2562220 200376 2361844 8% /var
shm 257376 0 257376 0% /dev/shm

Really wish I would have gotten a larger hard drive on my mac book pro... It voids the warranty to try to replace it yourself too. :(

runelind
Mar 25, 2007, 02:45 AM
What did you enable in the kernel to get the networking going? It worked during the install, but not after the first reboot...I didn't change any of the options in the kernel config.

troyhanson
Apr 2, 2007, 06:59 PM
The link doesn't seem to work anymore, for the image files in carpenike's original post.

carpenike
May 10, 2007, 09:46 AM
Link should be back up.

I don't know why the kernel config doesn't work though; it works in one of my VMs but not in a second one that is a backup...

carpenike
May 12, 2007, 06:21 PM
It appears that after cloning my original install the Ethernet interface doesn't properly come up as eth0 any longer... It comes up, but it's usually eth1 I believe...

Enter this command and you'll find it:

ifconfig -a

Odd... I think I'll look at some custom udev rules to fix it...

teilo
May 19, 2007, 08:02 PM
Your CFLAGS are not correct for Core Duo. You should be using -march=prescott. Nocona would only be appropriate for a Core 2 Duo machine running a 64 bit kernel. Nocona supports the 64-bit instruction set. Core Duo does not.

See: http://gentoo-wiki.com/Safe_Cflags

carpenike
May 21, 2007, 04:27 PM
Ah interesting... That's where I pulled my CFLAGS off of...

Eh... emerge -e world && emerge -e world.

:-P