Gentoo MythTV

28. 08. 08

handy emerge status tool

Filed under: handy tools — Tags: , , — niko86 @ 14:14

since i am using this right now, i want to show it to you real quick.
this is a tool that comes in very handy while compiling on slow systems or while compiling many packets.
it shows you the estimated remaining time of the current ebuild.

what do you need:
genlop
hddtemp
lm_sensors

(emerge -av genlop hddtemp lm_sensors)

just configure lm_sensors.

i use this script to cycle me through the info screens:

clear;
while :
do
genlop -c;
sleep 5;
clear;
tail /var/log/emerge.log -n 4
sleep 5;
clear;
echo "load 1min, 5min av:"
uptime | awk '{print $10,$11}'
echo; echo "Temps:"
sensors | awk '/CPU Temp|Int/{print $1,$2,$3}'
hddtemp /dev/hdb
sleep 3
clear;
done

that’s it.
if your sensors in /etc/sensors.conf are named different than “CPU Temp” and “Internal Temp” just change it in the script.

have fun

PS: the Output looks like this:

27. 08. 08

if i only knew this many hours ago…

Filed under: configuration — Tags: , , — niko86 @ 15:15

there is an overlay for portage which includes all the openchrome patches to make xvmc work with mplayer.
you can find an article about it here: click
i will report about how this works out after the re-emerging has finished.

update:
I did not do much yesterday, just came back home and evaluated the situation.
what i can say right now is that you should re-emerge every xorg module you got.
currently the X-Server is not able to start because of some x264 library which i did not recompile.
Since i got some kind of “failsafe” setup which makes X restart in case of a failure of X Server or mythfrontend, the system currently tries to restart X Server over and over again…
i will report on this later.
i will also wite a quick how-to about making X restart after a failure of mythfrontend.

second update
this is important to know:
since the article above suggests using ACCEPT_KEYWORDS=”~x86″ to install the ebuilds from the overlay (you might as well add the ebuild to /etc/portage/package.keywords), portage will pull in all ebuilds masked with the ~x86 keywords that are more up-to-date than the one installed right now.
this means that if there is a newer ebuild in the official portage tree masked with ~x86 than in the openchrome overlay you will end up installing a new masked ebuild which is not from the openchrome overlay.
to avoid this you should look in your openchrome overlay dir for the newest ebuild available and mask all newer ebuilds.
in my case i had to mask:
>media-video/mplayer-1.0_rc2_p26258
in /etc/portage/package.mask because this version is the newest in the openchrome overlay.

mystery with sshfs

Filed under: configuration, Main — Tags: , , , — niko86 @ 10:10

since a friend told me about sshfs i was keen to test it.

so i set up passwordless authentication for a user that has read permissions on my storage server.

in order to let mythtv frontends view videos from the storage server i had to mount.

i do not like cifs or samba, neither nfs, so i thought to myself: “well let’s go with sshfs!”

simple as that:

just enable the fuse option in the kernel (i do not remember the exact name, you can find it under filesystems, userland support or something)

emerge -av sshfs-fuse

and your ready.

mounting is easy:

sshfs -o some,mount,options user@server:/path/to/storage /your/local/mountpoint

you can also use sshfs in /etc/fstab:

just add this line:

sshfs#user@server:/path /mount/point fuse some,mount,options 0 0

now you can just type:

mount /mount/point

to mount sshfs at startup you have to setup passwordless authentication though.

i will not explain this, a quick google search should do the trick if you are not already using this.

looks fine, ain’t it?

well, there certainly is one flaw with this nice sshfs thingie.

on shutdown or reboot gentoo tries to unmount the filesysems, it also tries to unmount our sshfs mounts.

it simply fails, i don’t know why, but the systems just kinda stops to shutdown and will stay in a state where it has no network connection and no prompt at all.

i came up with a quick dirty fix for this.

just add this to your /etc/init.d/shutdown.sh and /etc/init.d/reboot.sh:

#dirty fix for sshfs problems on shutdown
sleep 1 && echo "Unmounting SSHFS"
for i in `/bin/awk '/sshfs/ {print $2}' /etc/mtab`; do /usr/bin/fusermount -u $i; done
sleep 1 && echo "Done"

that will solve the kinky problems on shutdown.

25. 08. 08

temperature problems

Filed under: Main — Tags: , , , — niko86 @ 6:06

wow, in the progress of emerging i eventually got to lm_sensors, so after that finished i fired up sensors-detect and got a shock:
load 1min, 5min av:
4.03, 3.11,
Temps:
CPU Temp: +70.5
Int Temp: +37.0
/dev/hdb: 34 C
these are the temperatures while compiling.

as you can clearly see the airflow is not the problem, that’s why the mainboard and hdd temperatures are ok.
after 2 minutes without stressing the system, the temperatures drop like this:
load 1min, 5min av:
0.49, 2.24,
Temps:
CPU Temp: +34.8
Int Temp: +36.0
/dev/hdb: 34 C

so this surely is a problem with the cpu heatsink.
it looks like it simply is not capable of cooling the thermal dissipation loss of the c3.
i just measured the heatsink and it seems to be standard chipset cooler size, so any chipset cooler should fit.

if anybody has an idea which chipset cooler to get, feel free to leave a comment or mail me at
nikosch86 [at] gmail [dot] com

thanks

update
just found a couple of promising looking coolers.

Enzotech CNB-S1

Enzotech CNB-S1


Enzotech CNB-R1

Enzotech CNB-R1


Pichtures Copyright © PC – Cooling GmbH

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 http://www.google.com -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 http://gd.tuwien.ac.at/opsys/linux/gentoo/releases/x86/2008.0/stages/stage3-x86-2008.0.tar.bz2 \
&& wget \
http://gd.tuwien.ac.at/opsys/linux/gentoo/snapshots/portage-latest.tar.bz2 && \
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.
http://www.gentoo.org/main/en/mirrors2.xml
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.
(more…)

24. 08. 08

speeding up the build on the c3

Filed under: configuration — Tags: , , , , , — niko86 @ 21:21

it finally worked out really well and i managed to overcome all the gcc problems i previously had by following this guide: Click.
In fact i did not change my chost on this system, after endless problems i did a reinstall with the right chost, but gcc, glibc and binutils where broken anyways…
after some hours (you really should prepare yourself for endless compiling) the compilers did work.
so i could focus on the main task, setting up mythtv.

Well, as i already experienced while dealing with the gcc stuff, compiling takes ages on this little bird.
That’s why i thought about using the other machines at home as compiler nodes.

In other words:
How to do distributed computing and cross compiling on Gentoo using icecream and crossdev

I am using Icecream (sys-devel/icecream) and crossdev (sys-devel/crossdev)
The decision for icecream was easy, it supports its own “scheduler” which distributes the compile jobs to the machine which is capable of compiling the required arch and has the least cpu load.
so if you plan on distributing compile jobs across several hosts with different arches, and if you know that your nodes won’t be online all the time, use icecream.
if you plan on using machines which will be on all the time and you don’t care about the load, you should use distcc.

In my opinion icecream is more simple and “plug and play”.
You could just setup icecream on any host, start it, it will broadcast for the scheduler on your net, announce its compiling capabilities and start receiving jobs.
simple as that.

ok, prerequisites:
(more…)

22. 08. 08

problems…

Filed under: configuration — Tags: , , , , , , — niko86 @ 18:18

after compiling gcc and glibc, i just found out that apparently i386 is not supported anymore. XX
this is interesting, because every packet seemed to be ok with i386 chost, only glibc complained..
it might be useful to tell people that they are using a deprecated chost before they compile packets for hours….
however, i changed the chost to i586 and started recompiling binutils, gcc and glibc.
just follow this guide:
http://www.gentoo.org/doc/en/change-chost.xml
i am quite happy that i documented every little pitfall there is when installing gentoo on via c3 ezra cpus….
if i have to reinstall some time it will be usefull.

as promised here is the kernel config for the epia m9000 board with everything enabled what this board supports.
Download

update:
after several hours of compiling, i decided to do a fresh install, which did not solve the problem as you can read in the next post.

getting my hands dirty!

Filed under: configuration — Tags: , , , , , , , , — niko86 @ 1:01

after several hours of trying different myth distributions and livecds, i got to the point where i just put the gentoo minimal install cd into the drive and start compiling away.

unfortunately the c3 i got on the m9000 board is an older one which labels itself as i686 but is missing the cmov instruction.
that’s why most of the distributions won’t work because they can’t tell that it is in fact an i586 processor and is lacking the cmov instruction.
so all you get are some nasty segfaults…

so got back to good’ol gentoo:
this is what i used for CHOST and CFLAGS:


CHOST="i386-pc-linux-gnu"
CFLAGS="-mtune=i586 -march=c3 -m3dnow -mmmx -Os -pipe \
-fomit-frame-pointer

just specified mtune as well because some people reported about some nasty errors where the compiler looked for the mtune or the deprecated mcpu flag, didn’t find it and just assumed an i686 which resulted in…. you guessed it: segfaults

i will put the kernel config for the ezra c3 m9000 board online later so if someone comes here while searching for this it will save them alot of time….

it actually was not that easy to find out that the older ezra / samuel c3’s do not support cmov instructions but the nemehia and newer c3’s do so.
the fact that a sticker on my board said “nemehia” did not make it any easier.

another conclusion i’ve come to is that the morex cubid 2600 is not a particularly good case when it comes to cooling and air circulation.
it has some air intakes on both sides and two 40x40mm fans sucking air out behind the harddrive mount, but the mounting bracket for the pci card and the slot for the slim drive in combination with the IDE cables are doing a good job of preventing some good airflow.
after some hours of compiling, i measured 70°C CPU and 50°C Harddrive Temperature, the Northbridge was too hot to touch and so was the RAM.

So i quickly “engineered” a new cover for the case out of some cardboard, did a 120x120mm cut out and put a nice 120mm fan in it.
“mounted” the cardboard cover instead of the original case cover and now i got some good airflow, i also did disable the 2 40×40 fans to stop the noise they where making.

well, im right at compiling the basic needs of the system and all i can say is: roughly 1ghz and a tiny Cache are not exactly speeding up the process of compiling.
it takes ages to compile….

hopefully this baby will be capable of being a nice frontend….

21. 08. 08

finally the missing frontend parts arrived!

Filed under: Main, shopping — Tags: , — niko86 @ 22:22

this morning the morex cubid 2600 itx case arrived, including an external powerbrick, riser card and 3 40x40mm fans.

of course i got right to it and started assembling it all together.
it is really a tight fit, even with this small mainboard.
the itx case is about the size of a dvd player.

some pictures will follow soon

18. 08. 08

quick wake-on-lan howto

Filed under: configuration — Tags: , , , — niko86 @ 22:22

Quick breakdown:

Required Software:
ether-wake

Useful:
arp (part of net-tools)

install:

bunker ~ # emerge -av net-tools

look@comment (ether-wake is now part of net-misc/ethercard-diag)

The Syntax is:
usage: ether-wake [-i ] [-p aa:bb:cc:dd[:ee:ff]]
 00:11:22:33:44:55

so you need the mac adress of the host you want to wake-up, which is not very handy since i assume you do not want to remember every MAC Adress.

ether-wake can however read from the file /etc/ethers
this file stores MAC/Name pairs, so you can ether-wake by name.

this is how you create this file:


#create MAC/Name pairs for every host on your network \
that is currently in the arp cache
bunker ~ # arp | awk '{print $3,$1}' >> /etc/ethers

after you have done this you are almost there.
some machines do not even need to be setup to wake them up.
you should however look for some WOL option in the BIOS of the machine you want to wakeup, commonly found under “Power Management”.

As far as I know there are no additional Kernel Paramters/Modules needed (it flawlessly worked for me on 5 machines without even looking for BIOS otions.)
It could not hurt however if you take a peak.

With Windows it is another story, boot the machine up, go to your device management panel, select your network adapter, if there is an “advanced” tab you can look for some wake-on-lan options there.

waking up a machine by its name works like this:



bunker ~ # ether-wake machinename

if machinename is not specified in /etc/ethers ether-wake will complain.
if you got multiple network interfaces in your machine (the one you are using to wake-up the others), you have to specify the interface to use:


bunker ~ # ether-wake -i ethX machinename

if something does not work, it may well be, that it will work if you set everything back to default, as i said, it worked for me with 2 windows and 3 linux machines without touching any bios or software options.

ether-wake is capable of HEX Style passwords which are recognized by the clients to prevent abuse, but since i do only use this at home i did not bother to much )

if you want to use ether-wake as non-root user you may have to set the suid-root bit on the application because it requieres you to be root to execute.


bunker ~ # chmod u+s /usr/sbin/ether-wake
« Newer PostsOlder Posts »

Blog at WordPress.com.