Tuesday, July 14, 2009

Updating the file extension association in OSX

I wanted to change the association of the .avi extention on my MacBook Pro running Leopard to VLC.

To do it, right click on the file and click Get Info.  Then at the bottom of the drop down menu change the program from the list.  Then click "Change All" button if you want to change it for every file.


Sunday, July 12, 2009

Linksys WAP54G and DD-WRT

I am staying in a place that has a nice connection and wireless.  Perfect for my Macbook Pro, not so good for the desktop.  I found a v3 WAP54G and thought I would just hook it up as a wireless client and put my desktop behind that.  Well, it turns out that isn't as easy as one might hope.

All is not lost, welcome DD-WRT.  I went here: http://www.dd-wrt.com/wiki/index.php/Installation
and downloaded this firmware: http://www.dd-wrt.com/dd-wrtv2/downloads/stable/dd-wrt.v24%20SP1/Consumer/Linksys/WAP54G_v3/dd-wrt.v24_micro_generic.bin

I uploaded it on to the Linksys through their firmware upgrade page and when it was done I pulled the plug and waited about 15sec ( I was impatient! ).

After some trial and error ( and wondering ) I found it at http://192.168.1.1

I set wireless to be client, put in the house SSID, and under Wireless Security, I set the Security mode and entered the house WPA Shared Key.

I also made sure my internal LAN network ( 192.168.1.0/24 ) was NOT the same as the house LAN network.  The house is set to be 192.168.0.0/24 so I was okay, however I changed it to a 172.16.1.0/24 network just to make sure there wasn't any confusion.

I set up the DHCP server for the LAN, told it to use the House Router as it's primary DNS and then use OpenDNS http://opendns.com ( 208.67.222.222 and 208.67.220.220 ) as the second and third.  I've been very happy with OpenDNS and highly recommend it.

So now, my workstation is behind the WAP54G which is acting like a firewall/router to the house network and all is happy.

I'll probably set up some port forwarding so I can talk to my workstation from the office but that is trivial under DD-WRT.

I am very pleased with how well it is working and how easy it was to set up.  There is a tone of info in the interface and I'm going to enjoy playing around with it.


Friday, July 10, 2009

Clock setting in Linux

In almost all applications time being in sync is very important. Even simple logging needs accurate time to keep the logs in tune.

Servers have a hardware clock and an OS software clock and both need to be in sync as well as in sync with a certified time source.

If you already use NTP to keep your software clock in sync with a certified time source it is pretty easy to keep your hardware clock up to date with the OS time.

Here are some basic commands:

To set the syste/OSm clock from the hardware clock:
#> sudo hwclock --hctosys

Likewise if your hardware clock is set incorrectly (for example, if you replaced the
CMOS battery on your motherboard), you can set the hardware clock from your system clock as follows:

Likewise, set the hardware clock from the software/OS clock:

#> hwclock --systohc

As always, there are a lot more options available so check out the man pages.

Tuesday, July 7, 2009

How to add a disk to a vmware linux guest without rebooting

I have a whole series of linux guests running on some ESX hosts off NFS shares.

Today I wanted to add another disk to a running guest and couldn't reboot it.
ESX let me add the disk but the CentOS 5.3 guests didn't see it automatically.

I ran this command:
echo - - - > /sys/class/scsi_host/host0/scan

"That is echo dash space dash space dash /sys/class/scsi_host/host zero /scan"

and then the disk showed up under fdisk -l

Put a new LVM on it, added a filesystem, and mounted it.

Vlan tagging between HP and Cisco switches

I needed to get some vlans between a couple HP and Cisco switches and ran into some problems with it. After some digging I found the solution:

  • On the HP set traffic on the trunk port to be tagged for every VLAN you want to propagate
  • Allow access to the VLAN on the non-trunk ports but set them to be untagged
Good luck!

Monday, July 6, 2009

Solaris 10u6 on HP DL185's

Trying to get Solaris 10u6 on an HP DL185 can be thought of as an adventure to put it mildly.

Here is a brief idea of the steps that are needed. I'll add more detail as I have time.


1. Get the 10u5 miniroot.
2. Unpack the miniroot and install the Disk Array drivers into the miniroot.
3. Use that miniroot to PXE boot the 10u6 install.
4. Do the install ( I like using the flar install ).
5. During the install, tell it to NOT automatically reboot.
6. When it is finished with the install, drop into a shell.
7. You need to install the HP drivers package. You can bring up the network to install it, copy it off CD, or get it some other way.
8. Reboot the box.
9. When it gets to the grub prompt, Edit the entry and add a -r on to the end to tell it to reconfigure it's devices.
10. Chances are it won't boot correctly and will have it's filesystem read only.
11. Check it's disk numbering and you may find that it went from c0t0d0 to c1t0d0.
12. If it did, adjust /etc/vfstab and reboot.


Update: I made a flar of the finished product and it installs much easier. It doesn't reorder the disk, controllers, etc.