Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Thursday, November 18, 2010

Motherboard failure today

We have a Zimbra mail server at work running on top of a 64bit Ubuntu 8.0.4 OS. The computer is a Dell Precision 380 and after a power outage last night, (yes it is connected to a UPS) the motherboard got fried. Luckly, I have another Precision 380 I could swap all the drives, memory and network interfaces to. When I booted up, all went as planned until I realized that my internal network card eth0 was not found. Eth0 is an on-board card, so I new it was working but Ubuntu was not finding it. I ifconfig’ed to check for eth1, eth2, eth3…etc…finally I found it…it was not eth4…weird, I thought. So then I went to /etc/network/interfaces to change eth0 to eth4 and all would be well. Correct? Not so fast. I could not get eth4 to come up with the static ipaddress that is listed in /etc/network/interfaces. What the heck…..did some more digging and found a udev rule that ties the mac address to the network card. So I had to edit the udev rule to reflect the new mac address of eth0 and then restart the udev service and what do you know…eth0 came up again. Awesome!

Rule to edit:
/etc/udev/rules.d/70-persistent-net.rules

eth0 was the first defined rule and all thast was needed was to modify the mac address to reflect the onboard nic in the new computer.

Thursday, January 28, 2010

VNC Access on Ubuntu or Redhat

I typically use shell access on all my linux servers but sometimes I need to load X and use GNOME or KDE in either Ubuntu or Redhat/Fedora/Cent OS. The problem is  that the vncserver file resides in different places depending upon the distribution you are using. I like to modify the vncserver file to increase the resolution of the virtual server to match my 20” monitor.

Ubuntu:
/etc/alternatives/vncserver

edit the global variable to tweak the vncserver resolution.
$geometry = "1280x1024";

Redhat/Fedora/Cent OS:
/etc/sysconfig/vncservers

Different variables to tweak how the vncserver daemon runs. Tweak the variable below to adjust the resolution.
VNCSERVERARGS[2]="-geometry 1280x1024"

Read the comments at the beginning of each distributions vncserver file for other settings and tweaks.

Want KDE or GNOME to load when your virtual terminal loads. Then you need to edit the .xstartup file for the user that the vncserver will run as.
For instance if you login to your linux box with “Fred” then you need to go to edit the xstartup file in the .vnc folder in your home directory. I like the joe editor but vi works also.

vi /home/fred/.vnc/xstartup

make sure this is at the end of the file for GNOME
exec gnome-session &

or
for KDE use the following
startkde &

If you see
twm &
you will need to either remove it or comment it out.
#twm &

Enjoy