Help

VirtualBox Multiple TCP Port Forwarding

December 19th, 2008  |  Published in FYI, Help, Tutorial

When I need to test some Django code, I find it much easier to just run or install a copy of Turnkey Linux and grab the appliance that I need. They have a few different types of appliances and if you need to do any code testing for Django, Rails, Drupal, and more, I suggest you give this a shot if you don’t want to sit there and configure a server just for testing.

One thing with the Turnkey Django appliance, there are 2 HTTP ports. One is 80 for the Django administration interface and the other is 10000 for the Webmin administration interface. One problem I just ran across was how do I forward 2 TCP ports with Virtual Box. Easy, just do this:

$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort" 8888
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort" 80
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" TCP

To connect to your guest OS via Firefox, you would go to the following URL in your web browser: http://localhost:8888

This works great for one port, but what if I need 2 HTTP ports? Then try this:

$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/HostPort" 8889
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/GuestPort" 10000
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/Protocol" TCP

To connect to your guest OS via Firefox to this port, look above on how I explained the connection via port 8888. Just change the 8888 to 8889.
Adding more than this, well that I will have to dig in to further, but for this case, I only needed to forward the 2 HTTP/Apache ports.

Now if you would like to SSH into your guest, try this:

$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

You can now SSH into your guest box by typing the following at the command line:

$ ssh -p2222 username@localhost

Or you could add the following to your ~/.ssh/config:

Host guest
        Hostname localhost
        Port 2222
        User username

And now to connect you would just do:

$ ssh guest

Rodent Hunting

November 29th, 2008  |  Published in Dear Lazyweb, Help, KDE, Kubuntu

Hey my fellow lazy webbers! I am looking at getting a new mouse that is elegant, sleek, and super mobile. Right now there are 3 models that fit this category that I like pretty well:

  1. Logitech VX Nano
  2. Logitech V550 Nano
  3. Logitech V450 Nano

What I like about these 3 is that they have the super small USB dongle that doesn’t stick out much from the side of my laptop, therefore allowing me to keep it plugged in at all times, even while transporting it. I know that with the VX Nano, the middle mouse button click doesn’t work like typical middle mouse buttons. Instead of doing what I am used to, it changes the type of scrolling action. Click it down and you have typical wheel scroll with the little clicking action. Click it down again and you have that super smooth non-clicking action scroll, which is by far my favorite and the reason I have been using Microsoft rodents for the past couple of years.

My question is do the V550 and V450 do the same with the middle mouse button for you owners out there? If you have any of these rodents, please tell me which one you have and if you like it or not. Right now I can pick up the V450 at the local Circuit City for $35 USD. $45 for the VX and I think around $50 for the V550 (maybe cheaper).

I have found a how-to page for the VX and getting all of the buttons to work, even in KDE. Do any of you use one these rodents in KDE/Kubuntu as well?

EDIT: I picked up the VX Nano and I am using it now. All I can simply state about this rodent is WOW!!! I paid $45 at Tiger Direct for it, definitely worth every penny I paid for it. Simply amazing. Thanks to everyone who left a comment pushing the VX Nano and the VX line. You all totally rock!

Ant, RPM, why do my dashes become underscores?

October 30th, 2008  |  Published in Help

Just wanted to throw this out and see if anyone else is experiencing this, has experienced this, or knows how to fix this. I only know of one way to reproduce this and it is using Ant to create RPMs. I have my directory structure like the following:

/home/username/folder/sub-folder/foo

When I run Ant in sub-folder, it will break complaining that there is no such file or directory. It is there! For real it is. But after further review, I noticed it wasn’t lying, but it was looking for a different directory. It was looking for the following:

/home/username/folder/sub_folder/foo

That’s right, it is trying to do work in the sub_folder instead of the correct sub-folder. I am going nuts trying to figure this out.

My work around right now is to rename the sub-folder to sub_folder and then everything works out. Any ideas?

Note: This just started happening in Intrepid, worked fine earlier in Intrepid and worked in Hardy.

Non-RAID Hot Swapping Help Needed

July 10th, 2008  |  Published in Help

OK, since the lazyweb totally owned in helping me locate a killer portable media device, I can use your help once again.

I have Googled and Googled until my eyes have exploded, and I have yet to find the answer I am looking for.

The question….Can you hot swap, not warm swap, SATA drives in Linux without having them a) setup in RAID, and b) not using a hardware RAID controller card? Someone told me that you can and the kernel works out of the box that way. Well, whoever told me was wrong. I have tried it in Red Hat, CentOS, Ubuntu, and SUSE. No go, the kernel panics and blows up and I have to call the Chicago Fire Department :)

Warm swapping works just fine, where I unmount the drive, pull the drive, put in a new drive, configure drive, and then mount the drive. That works, but when a drive fails that isn’t on a RAID controller, or is on one, and isn’t configured with RAID, I want to a) know about it, and b) pull it out without unmounting and what not first.

So, I know there are some of you wizards out there that can help me, so please, any information you may have or questions, please comment or feel free to email me directly (nixternal kubuntu org). Thanks!

Kickstart and custom partitioning help needed

June 19th, 2008  |  Published in Dear Lazyweb, Help

OK, here is the scoop. We have one appliance that gets a custom partitioning via kickstart and a bit of Python love. Once the partition is complete, we install the base packages and then our appliance package. During the installation of the appliance package, it reads in the size of the multiple partitions it has available and their sizes. This all works like a charm. Side note, our Kickstart scripts are being run through Anaconda from CentOS.

As it stands, when the partitions are created, there is 5% by default that is utilized with every partition for super user access. This way here, it saves you from running out of space and being unable to access the drive. This is great on directories such as /boot, /var, /, /home, and etc. But when we partition our 750GB drives, we want a large growing space that doesn’t need this 5% reserved blocks percentage. Typically when you use mke2fs to create the partitions, outside of Kickstart and Anaconda, you would pass the -m flag with 0 (zero) as the variable. This would get rid of any reserved space, therefor allowing you to utilize the entire space. With the default 5% on 4×750GB hard drives, we lose a total of 150GB of space. That is a lot of space to lose, especially when our appliances main duty is storage.

I know we could add a %post section to our Kickstart scripts, call tune2fs -m 0 /partition/location, and then reinstall our appliance package so it can read the new drive partitioning, but is there any other way to do this? Someone said to use mke2fs.conf for this, however Kickstart and Anaconda documentation is far from good when it comes to tricky configurations, and it seems nobody else in the world is doing this. Does anyone know how to go about using the /etc/mke2fs.conf with Kickstart so I can have the drives partitioned with the -m 0 flag from the get go?

/me wishes we used Debian/Ubuntu with FAI!

Ubuntu Chicago and Ubuntu development classes

May 5th, 2008  |  Published in Chicago, Community, Development, Event, Free Software, Help, LoCo, Ubuntu

Right now I am working with the members of the Ubuntu Chicago LoCo team on creating a solid proposal for developing “Ubuntu Development Courses” that members of the Chicago community will lead. Right now we are looking for those that are in the Chicago land are that may be interested in such events. As it stands, I have come up with a basic, college-like, course layout.

Ubuntu Development 101 – Familiarization of Ubuntu development tools
This session will provide the attendees with a breakdown and brief run-through of the tools involved with Ubuntu development. These tools would include: Launchpad, mailing lists, IRC, development applications and scripts, and more.

Ubuntu Development 102 – Bug Triage
This session will provide the attendees with the knowledge necessary to help triage Ubuntu bugs. Attendees will learn the basics as well as some of the advanced topics with triaging bugs on Launchpad.

Ubuntu Development 103 – Packaging I
This session will provide the attendees with the knowledge necessary to build their very own package. Topics covered will include development applications, scripts, setting up development environments, creating the package, and more.

Ubuntu Development 104 – Packaging II
This session will provide the attendees with the knowledge necessary to merge, sync, and request merges/syncs for Debian packages into Ubuntu’s latest development cycle. Topics covered will include those mentioned as well as proper utilizing of certain development scripts as well as how to properly fill out a request, create a debdiff, and more.

Ubuntu Development 105 – Packaging III
This session will provide the attendees with the knowledge necessary to work with Debian on patches, request backports properly, how to do Stable Release Update requests, and anything else not covered by Packaging I or II.

Obviously none of this is set in stone at this time, as we are working on getting an infrastructure in place. One thing I would like to do, is keep these away from local LUG meetings as to not a) disturb the meeting process, or b) have our session disturbed due to socializing. We are currently looking for an ideal venue for this that will a) be easy to access, b) be free, c) have a projector, and d) have Internet. There are many places in the Chicago land area that fits this bill, so now we are just looking for the best place.

We figure that each event would take anywhere between 4 to 6 hours per session and may possibly be separated into mini-sessions. If we get this off the ground and have enough interest, we could keep it going and turn it into its own little BuntuCamp (BarCamp style) just for Ubuntu!

The reasoning behind this is not only teach interested individuals Ubuntu development, but also provide them the tools necessary to properly advocate the use of Ubuntu and its partner projects. I think once our members understand as many of the aspects involved with the development of Ubuntu, they will be able to better portray to future users the importance of Ubuntu and free software. Also, you get to learn Ubuntu hacking, what could be more fun?

If you are interested in such an event, I urge you to track the Ubuntu Chicago mailing list and let us know. If other LoCo teams are interested, feel free to contact me at nixternal – kubuntu – org.