Archive for May, 2007

chan_mobile

Tuesday, May 29th, 2007

Not quite two weeks ago a new channel type was added to asterisk-addons. This new channel is called chan_mobile. It allows a user to connect their Bluetooth enabled cellphone or headset to Asterisk. When a cellphone is connected to Asterisk, Asterisk will then handle incoming calls and can also use the cellphone to make outgoing calls. When a headset is connected, Asterisk can send calls to it and possibly originate calls.

I personally find this to be very cool. I just ordered a Bluetooth USB device so that I can try this out for myself. I’ll report back with the results in the near future, hopefully.

Configuration Settings for the LVS Clusters

Monday, May 7th, 2007

In my last post I suggested that I might find time to post the configurations I used for the test run. Well, I hope to be able to do that this time. I’ll go over the kernel settings I used, the settings for the DHCP server, how the initrd was setup, the settings for PXELinux, and the packages I had installed for the root filesystem.

For the kernel, I used the 2.6.15.7 kernel. I needed to patch it with SquashFS and UnionFS. I turned off support for modules as I was only going to compile the drivers needed for the system. So my network driver and the filesystem drivers were all compiled into the kernel. I also needed to enable DHCP support in the kernel. The actual config file I used is in the ZIP file available at the end of this post.

For the DHCP server, I simply needed to define a subnet to hand addresses out for and then configure options in DHCP. This was simple to accomplish. For the DHCP server, I used dhcpd but almost any DHCP server will do. For my setup, I used the subnet of 192.168.201.0/24. I then set two options in the subnet configuration that tells the PXE client what to download and where to download from. These options are “filename” and “server-name”. The DHCP server config is also in the ZIP file.

I have limited experience with initrds. I did a couple things for the one I used for this one. First was that I needed a way to download the rootfs from the TFTP server. I decided to use curl but didn’t want to have to worry about the libraries for it, so I compiled curl with static linking. I created my own linuxrc that would be run on boot. The linuxrc handles downloading the rootfs, setting up the root with unionfs and then initiating the init process on the newly mounted rootfs. It could probably be more robust, but it works for my purposes. I’ve attached the entire initrd I used.

For PXELinux to be usable, I needed to install a TFTP server. I used the tfpd-hpa server and left it will default settings. I downloaded PXELinux and copied the file pxelinux.0 to the TFTP server root location. Also note, that the kernel, initrd and rootfs need to be copied here as well. I created a default config file for PXELinux and placed it in the TFTP root location in a directory called pxelinux.cfg.

The last thing to finish up is to create the root filesystem. I used a stripped down version of Ubuntu for my filesystem. I started by using debootstrap. I then customized it to reduce the size. Once I had that completed, I used mksquashfs to then create my “image” for the rootfs. I’ve placed a list of packages in the ZIP file for those interested.

Here is the ZIP file I promised. Have fun.