Gentoo MythTV

25. 08. 08

quick roundup about how to install gentoo on the epia m9000 or similar cmov-less c3 boards

Filed under: Main — Tags: , , , — niko86 @ 3:03

since the emerging is on fast-forward right now (thanks to icecream/crossdev)
i thought it might be a good idea to sum up what i have done to get gentoo running on an epia m9000 board featuring a cmov-less c3 ezra (933mhz).

you should at first make sure that you are able to efficiently cool the c3 and the northbridge since it becomes really hot in a closed case with these small 40x40mm fans.
i read about a maximum temperature of about 75°C.
ok, now get yourself the gentoo minimal install cd for x86.
Here is the Link.

boot into the cd (no boot options needed)
i assume you are using dhcp so you do not need to care about network settings right now.
in case you want to test it, here is a neat one-liner:
[ $(ping -c1 -W1 -w1 | awk '/received/ {print $4}') ] && echo "ONLINE" || echo "OFFLINE"
let’s you easily know wether you are online and wether dns resolving works.

ok now it’s time to partition your harddisk, take a look at what we got right now:
fdisk -l

we need a boot, a swap and a root partition.
i like to do it this way:
boot = 32M (space to store different kernels for testing around)
swap = half the size of the RAM
root = what’s left

fdisk /dev/yourDevice

well, no need to explain really as fdisk is kinda self-explaining.

after you set up your disk, it is time to make some filesystems.
i like to use ext2 for the boot and reiserfs for the root partition.
choose what you like best.

mke2fs /dev/sda1
mkreiserfs /dev/sda3
mkswap /dev/sda2
swapon /dev/sda2

now we want to mount our new partitions, so we can use them and finally chroot.

mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot

now we want to download a portage snapshot and a stage3 image.

cd /mnt/gentoo
wget \
&& wget \ && \
tar xvjpf stage3-*.tar.bz2 && \
tar xvjf portage-latest.tar.bz2 -C /mnt/gentoo/usr

you should choose another mirror which is geographically near to you.
notice how i chained the commands together, this way we do not have to sit there and wait, enter some commands, wait…
we just enter this chain and everything is fine.

ok proceed with the make.conf located in /mnt/gentoo/etc/make.conf
set your options and save.

for the c3 it should look like this:
CFLAGS="-march=c3 -mmmx -m3dnow -fomit-frame-pointer -Os -pipe"

parallel-fetch tells portage to fetch the next tarball while compiling.
the chost and cflags settings are the ones i chose after failing several times.
so this should work on cmov-less c3s. (look at this post)

ok next step would be to copy our dns resolution config to the new root.
we need this because we are not getting a new ip adress via dhcp after chrooting.
cp -L /etc/resolv.conf /mnt/gentoo/etc/

now we need to mount the /proc and /dev dirs to let the new chroot environment know about our hardware.
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev

ok, thats enough.
let’s enter the new root
chroot /mnt/gentoo /bin/bash
source /etc/profile

now sync your portage tree
emerge --sync --quiet

you may want to set your timezone
cp /usr/share/zoneinfo/GMT /etc/localtime
in /usr/share/zoneinfo/ there are several timezones, choose an appropriate one.

ok, lets configure the kernel
emerge gentoo-sources
cd /usr/src/linux
make menuconfig

you will now see a nice ncurses based menu.
if you like, you could use my kernel .config, it is for the 2.6.25-r7 version.
take a look at this post
this one includes every feature of the epia m9000 and some other features that might be interesting for the use of mythtv.
just save it as /usr/src/linux/.config
and call make menuconfig
now you can look through the options to modify things.

if you are ready you could start building the kernel:
make && make modules_install
cp arch/i386/boot/bzImage /boot/kernel-2.6.24-gentoo-r5

do not forget to modify the /etc/fstab to fit your new partitons.

add the ethernet device to default startup
rc-update add net.eth0 default

set a root password with

set your keymaps:
nano -w /etc/conf.d/keymaps

if your network uses dhcp you should consider this:
emerge dhcpcd

if you like to continue working via ssh after you rebooted you should autostart the ssh daemon:
rc-update add sshd default

let’s get to the end:
install the bootloader (i chose grub) and edit the config
emerge grub
nano -w /boot/grub/grub.conf

if you only use one hdd it will most likely be (hd0,0)
this is my grub.conf:

default 0
timeout 10
fallback 1
title=Gentoo Linux 2.6.25-r7
root (hd0,0)
kernel /boot/kernel-2.6.25-gentoo-r7 root=/dev/sda3 video=vesafb:ywrap,mtrr,1024:768-16@85 panic=10
title=Gentoo Linux 2.6.24-r4
root (hd0,0)
kernel /boot/kernel-2.6.24-gentoo-r4 root=/dev/sda3 video=vesafb:ywrap,mtrr,1024:768-16@85

if you are ready let’s continue with making it permament:
grep -v rootfs /proc/mounts > /etc/mtab
this is required for grub (remember we are in a chroot

grub-install --no-floppy /dev/sda

that’s it
lets reboot:

cd && umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo && reboot


1 Comment »

  1. […] public links >> opsys quick roundup about how to install gentoo on the epia m9000 or … Saved by Melita on Sat 04-10-2008 Linux en PS3! Saved by kenspeckle on Fri 03-10-2008 [News] […]

    Pingback by Recent Links Tagged With "opsys" - JabberTags — 06. 10. 08 @ 15:15

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: