Friday, July 15, 2011

Rename eth devices in Ubuntu

Been swapping PC units recently (because of hardware failure) and noticed that it's kinda annoying trying to remember the new eth numbering everytime the hardware changes. Did a little research on how to rename the eth to a better name.

First open the config file using vim (my preferred editor or you may use your own)
# vim  /etc/udev/rules.d/70-persistent-net.rules

Then you should see a sample below
# PCI device 0x10de:0x03ef (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:1d:61:50:1f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth20"
 I colored the sample text above green to indicate that it is the one that I wish to change. Note that if the old config lines are not to be used anymore feel free to delete them. Don't worry because upon reboot the system should auto-detect them again if the need arises.

Now the new name I like is displayed below...

# PCI device 0x10de:0x03ef (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:1d:61:50:1f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="OptimusPrime"


Now I changed the /etc/network/interfaces to match the new name above.
auto OptimusPrime
iface OptimusPrime inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1

or if you like dhcp...

auto OptimusPrime
iface OptimusPrime inet dhcp


Reboot and hope it works!!! (just kidding)

Wednesday, July 6, 2011

Adobe Flash not detected in Firefox

I just installed the Firefox 5 tar file from Mozilla and extracted it to /opt directory and everything loaded fine but the Adobe Flash is not seen though it is loading in the other browser.

My OS is a 64 bit Ubuntu Karmic and found out that Firefox did not use the old flash plugin so I did a little research and this is what I found...

The old plugins in my system is found in /usr/lib64/mozilla/plugins/ but the downloaded firefox does not look there instead it looks in the...
/usr/lib/mozilla/plugins/

so I just symlinked the flash plugin from /usr/lib64/mozilla/plugins/ to /usr/lib/mozilla/plugins/ and it just worked!