Archive for the howtos Category

Howdy!

I’m currently adding support for SLES11 on the IBM Installation Toolkit (http://www14.software.ibm.com/webapp/set2/sas/f/lopdiags/installtools/home.html), and was stuck on some network configuration issues. In SLES10 we used to bind the network configs to a certain interface by using the interface’s MAC address to create the ifcg-eth-id-* files under /etc/sysconfig/network/.

This type of binding is necessary because the kernel gives names to the devices based on the order it loads the modules. Imagine you have a machine with 2 NICs, one using the e1000 module, and the other using tg3. If you do

[code]
#modprobe e1000
#modprobe tg3
[/code]

then you’ll have eth0 -> e1000, and eth1 -> tg3. If you change the modprobe order, then eth0 -> tg3 and eth1 -> e1000. This is a big issue when dealing with devices that can be hotplugged (or when running some strange types of installation, which is my case :D).

Beginning on OpenSuSE 10.3 they stopped using the ifcfg-eth-id-* approach and moved on to udev. With udev it is possible to rename the devices by using udev rules, and this is extremely useful to give persistent names to network interfaces, based on their MAC address, for instance. See http://www.reactivated.net/writing_udev_rules.html for more details.

Ok, so far so good, but this change broke my code that I used on SLES10 to configure network interfaces :P

Now, there are only ifcfg-<device> files under /etc/sysconfig/network. Inside each ifcfg-<device>, there’s an option called LLADDR, that is the MAC address for the interface. Also, the autoinst.xml file changed a little bit – below is the <interface> part of one SLES11 autoinst.xml file, note that there’s a <lladdr> entry there :) :

[code]
<interface>
<bootproto>dhcp4</bootproto>
<device>eth0</device>
<lladdr>aa:bb:cc:dd:ff:00</lladdr>
<name>Ethernet Network Card</name>
<startmode>auto</startmode>
</interface>
[/code]

This autoinst.xml config will result on file /etc/sysconfig/network/ifcfg-eth0, containing a LADDR variable with value aa:bb:cc:dd:ff:00, along with the correct udev rules to bind the name eth0 to the correct interface.

Hope this is useful to someone else!

See you :)

Hey, how’s it going? :P

My 6210 just arrived, and the first thing I did was install Garmin Mobile XT, as it is a navigation tool way better than Nokia Maps (blah blah blah :P)

Follow the steps found here http://nimrag.forumbrasil.net/tutoriais-f3/instalando-e-desbloqueando-o-garmin-mobile-xt-no-n95-t83.htm (sorry folks, portuguese only… but straightforward enough to do without understanding a word in portuguese :D)

A big thanks to Marcio Freitas, the guy who wrote the tutorial. Nice job.

Converting ape files to ogg/mp3

| January 27th, 2009

Yeah, I like music soooo much ;) Here’s a nice article on how to convert an .ape (Monkey’s Audio file) to either MP3 or Ogg formats.

http://gimpel.gi.funpic.de/wiki/index.php?title=Howto:convert_ape_to_wav/mp3/ogg_on_Linux

I used the cueape.sh script, and to be honest, it does the work pretty well!

This is a summary of what I did to get my iPod (80G Video – Black) working inside KDE. Please, feel free to send comments and  questions ;)

First of all, I installed these applications:

  • DBus
  • HAL
  • Pmount
  • Amarok

And made sure KDE was compiled with HAL support, and Amarok with ipod support. As I use Gentoo, I did:

[code]#USE="hal ipod" emerge dbus pmount hal amarok kdebase [/code]

Then I put my user on the plugdev group (pmount mounts things using this group), and set HAL and DBus services to start upon system boot. In Gentoo we can use the rc-update tool:

[code]
#gpasswd -a trustlix plugdev
#rc-update add hald default
#rc-update add dbus default
[/code]

Great! After that I started both hald and dbus, and restarted my X.

[code]
#/etc/init.d/dbus start
#/etc/init.d/hald start
#/etc/init.d/xdm restart
[/code]

To make sure my KDE was working with HAL support, I went to Control Center -> Peripherals -> Storage Media -> Advanced.  The option “Enable HAL backend” must be marked.

After all these steps, I finally plugged the iPod on the USB port and started Amarok, which automatically recognized it.

Last thing I did was to click on the “Connect” button, that showed me a window asking for the mount/umount commands I’d like to use, and I put:

  • pmount %d
  • pumount %d

For both mount and umount commands, respectively.

And that was it. Hope it helps someone! :)

Recently I updated the ghostscript-gpl package and since then started to get the following error when trying to convert ps files to pdf:

Fontmap entry for Proxy has an invalid file or alias name!

I tried to remove any references for Proxy from the Fontmap file (/etc/fonts/Fontmap), but it didn’t work. After some searching I found the genfontmap.ps file, inside the ghostscript-gpl source package. This script can be used to create a new Fontmap file:

 # gs -q -sFONTPATH=/usr/local/share/fonts \
/tmp/ghostscript-8.62/toolbin/genfontmap.ps > \
/etc/fonts/Fontmap

Just thought it would be nice to share this tip :)