Archive for the ‘Linux’ Category

moving servers ftl

Wednesday, September 16th, 2009

drdelaney@ganondorf ~ $ uptime
20:28:35 up  1:14,  1 user,  load average: 0.01, 0.03, 0.08

=(

One Year!

Tuesday, September 15th, 2009

Its real this time!  one year!

top – 15:05:05 up 367 days, 20:27,  4 users,  load average: 0.00, 0.00, 0.00

eeePC Touchscreen!

Saturday, July 18th, 2009

So as some of you may know already, I bought an eeePC, for fun and to mess around with.  Well my latest fun with it was adding a touchscreen, and adding internal bluetooth!

Well, I purchased the Hoda Technology 8.9″ Solderless Easy and Fun TouchKit Touch Screen Kit, which came with a touchscreen, the controller board (with added USB hub) and the wires to connect it solderlessly to a internal USB header (I had one as I do not have a built-in cam, though even if you do, you can still use this!)

— The following pictures and more are available in my gallery –

Below is a quick guide on what I did to add in the touchscreen:

Included parts in the touchscreen kit

Here is the contents from the kit, included a dual pen/stylus!

Netbook taken apart Netbook taken apart

First I took apart my machine following the many guides to make sure I did not break anything I shouldn’t.

Finding a smooth path for wires

Next I tried to find the best path for the wires to go, without making new holes or pinching the wires.

JST SR04 and JST SR05 Connectors JST SR Jack removed Correct pinout for JST SR04 Connection

Whoops, the included wire to go from the controller to the motherboard is too short for where I am placing the controller.  Time to make a mod to the mod!  I had to very carefully take apart the JST SR04 jack and swap it with a longer wire.  Good thing they provided all the needed parts. Note the correct pin layout to make sure its recognized (the included cable had the pinout backwards!)

USR bluetooth adapter

Next, the bluetooth adapter.  The kit also had two JST SR05 to USB connector. After removing the plastic housing to my already small bluetooth adapter, I could easily fit it inside the case. Now I have all 3 external USB adapters free again, and nothing to forget or lose. Now I can tether to my cell and still look cool!

Touchscreen Controller and USB Hub

A Better view of the touchscreen controller.

Touchscreen

Fitting the touchscreen.  This was a PITA to get correctly centered, but I got it eventually.

Turn Camera on in BIOS Linux dmesg

After putting everything back togeather, I had to first turn the “camera” port on in the BIOS, then Fedora recognized the controller and USB devices on boot!

Now, even though I am running Fedora 11, which has support for just about every product under the sun, I still had to install drivers for the controllers, which was easier done then said.

First, I had to make a generic Xorg config, as Fedora does not make one now (its made on the fly)

[root@localhost ~]# Xorg -configure :1
~~ some output from Xorg ~~
Your xorg.conf file is /root/xorg.conf.new

To test the server, run 'X -config /root/xorg.conf.new'
[root@localhost ~]# mv xorg.conf.new /etc/X11/xorg.conf

Second I had to download and install the latest (2.06.2905 [beta]) drivers from the website [Local Copy of Drivers].

Then extract, and run the setup utility:

[root@localhost ~]# cd /tmp/
[root@localhost tmp]# tar xzvf ~drdelaney/Download/eGalaxTouch-2.06.2905-32b-k26.tar.gz
eGalaxTouch32/
eGalaxTouch32/readme
eGalaxTouch32/Guide/
eGalaxTouch32/Guide/How to rebuild kernel.pdf
eGalaxTouch32/Guide/How to build module.pdf
eGalaxTouch32/Guide/Driver Guide.pdf
eGalaxTouch32/eGalaxTouch.tar.gz
eGalaxTouch32/eula.pdf
eGalaxTouch32/setup.sh
[root@localhost tmp]# cd eGalaxTouch32/
[root@localhost eGalaxTouch32]# sh ./setup.sh 

(*) Linux driver installer for eGalax Touch controller 

(I) Check user permission: root, you are the supervisor.
(I) Begin to setup the eGalax Touch driver.
(I) Found and removed previous eGalax Touch driver.
(I) Extract eGalax Touch driver archive to /usr/local/eGalaxTouch32.
(I) Create eGalaxTouch utility shortcut in /usr/bin.
(I) Create TKCal tool shortcut in /usr/bin.
(I) Check X window version: 1.6.x
(I) Copy X module: x16/egalax_drv.so to /usr/lib/xorg/modules/input.

(Q) Which interface controller do you use?
(I) [1] RS232 [2] PS/2 [3] USB : 3
(I) Using interface: USB
(I) Found a HID compliant touch controller.

(I) Found X configuration file: /etc/X11/xorg.conf.
(I) Removed touch configuration from /etc/X11/xorg.conf.
(I) Add touch configuration into /etc/X11/xorg.conf.

(I) Please reboot the system for some changes to take effect.
(I) After booting, type "eGalaxTouch" to do calibration.

eGalaxTouch Utility

After rebooting,  running eGalaxTouch, and calibrating, I had full touchscreen support!

touch my eee

Tuesday, July 14th, 2009

Coming soon, a touchscreen for my eeePC!  http://spedr.com/5h0ci

Renaming files in CVS – and keeping the history

Sunday, May 31st, 2009

So I am working on a personal project, and decided to rename the file.  Now, I know from experiance that you cannot rename a file in cvs, and keep its commit history, but I decided to see if someone found a way.  Well, someone did, partially… http://www.eyrie.org/~eagle/notes/cvs/renaming-files.html

He shows the way I used to do it, mv local file, cvs delete old file, cvs add new file, commit changes. – This deletes the cvs commit history

He also mentions about modifying the raw RCS file and renaming that, but apparently, cvs doesnt like that since cvs itself isnt aware of any changes.

So I tried a mixture of them, heres my process:

  • Find the raw RCS file:  cat CVS/Root CVS/Repository – in my case, /cvs/projects
  • Copy that file somewhere: cp /cvs/projects/currentfile.sh,v /tmp
  • Rename the file in the current checked out sources:  mv currentfile.sh newfile.sh
  • Delete, Re-add, and commit changes: cvs delete currentfile.sh; cvs add newfile.sh; cvs commit currentfile.sh newfile.sh
  • Move the Attic’ed file from cvs: mv /cvs/projects/Attic/currentfile.sh,v /tmp/ currentfikle.sh,v-Attic
  • Copy the old RCS file to the new name: cp /tmp/currentfile.sh,v /cvs/projects/newfile.sh,v
  • Re-cvs up: cvs up

Now you have a renamed file in CVS, that CVS is aware of, and keeping your old history!

Please comment if you find this helpful or if you have any other information to add!

VMWare ESXi, Linux, and Sub Interfaces

Monday, April 13th, 2009

So I thought it was time to add something useful again to my blog.

Working with something for work, I had to configure a FC4 box with multiple IPs on different subnets, binding them to a sub nterface (eth0:1, eth0:2 and so on)

When we first got everythng on, only the primary IP address were working (bound to eth0 and eth1).  All other interfaces were resolving to the physical ESXi servers MAC address on the switch, which is no good.  After looking around, I found out there wasn’t support for this, everyone was saying to configure a Brige, or NAT everything through the local machine, which would NOT work out in our situation.

So after thinking a bit, I remembered the other issue we had with older OpenBSD 3.8 machines and the native VIC driver which was making the machines randomly crash reporting an unsupported mode.  Well the resolution for that was to shut down the guest, and add in ethernet0.VirtualDev = “e1000″ and ethernet1.VirtualDev = “e1000″ to the guest-name.vmx file.  So I figured I would try this on the Fc4 machine too, figuring I couldn’t lose anything.  Well, I didn’t lose anything, but I gained a working ssystem, with sub-interfaces!

So for all of those out there with weird networing issues on an ESXi (ESX as well) guests, try changing the network emulation from built-in VIC to intel e1000!

Kernel Lock outs?

Monday, December 22nd, 2008

So I am sitting here, upgrading my servers (mostly gentoo) and on the world (full system) update, its telling me it wants to install a different version of the kernel.

Let me jump back for a second.  Gentoo has very good customizations on what you can do, and for instance, I originally installed the gentoo-sources-2.6.26-r1 on one of my servers, and told it not to upgrade anything newer.  Everythings been going fine, until today, when its like “oh, you can install 2.6.25-r9!”  But wait, thats a downgrade.  So I tell Gentoo not to install anything older then 2.6.26-r1, and then it complains.  “!!! Ebuilds for the following packages are either all masked or don’t exist: sys-kernel/gentoo-sources.”  Well, whatever.  So I undid those changes, and decide to remove “gentoo-sources” from the world file, which basically says that its installed.  So now it works as intended.  But if I go to install an application dependant on the kernel source, then it will try to re-emerge them.  So I told the system that I’ve provided the software and specific version, which is basically saying “pretend its installed.”   And it still works.  So WTF

Long story short, if you use Gentoo, and its wanting to upgrade or downgrade the kernel, try removing gentoo-sources fromthe world file, but adding the exact version to the portage/packages.mask and portage/profile/packages.provided.

As a side note, on Fedora/Redhat/CentOS/YUM based systems, add a line stating “exclude=kernel*” to the /etc/yum.conf file (or the .repo files) and it will lock out kernel upgrades on those systems.

SSH Tab completion!

Saturday, November 29th, 2008

So I was using stuble upon and I found a cool one.  Adding tab completion to SSH/SCP!

The original code is at http://drawohara.com/post/6584031/life-changing-shell-function

But I propose a slightly different egrep line, which helps me at work (as our hostnames have numbers in them)

Basically, edit your .bash_profile or .bashrc files ( I prefer .bash_profile ), and add in the following lines:

SSH_COMPLETE=( $(cat ~/.ssh/known_hosts | \
sed -e 's/ .*//g' -e 's/,.*//g' | \
uniq | egrep -v "^([0-9]{1,3}.){4}$") )
complete -o default -W "${SSH_COMPLETE[*]}" ssh
complete -o default -W "${SSH_COMPLETE[*]}" scp

Once added, type source ~/.bash_profile (or ~/.bashrc)

This will parse the ~/.ssh/known_hosts file on login, and find any hostnames (but not IPs) and store them in a temporary variable.  This variable is parsed to add tab completion to the ssh and scp commands.

To use, type ssh dan-[tab] and it will auto complete the domain (if it was previously listed in the known_hosts file!)

VMware Dual booting?

Sunday, November 16th, 2008

So, there is this interesting youtube video which explains how to use VMware Workstation to boot a Dual boot system into a virtual machine.

For those who are unaware, Dual booting allows you to boot either Windows or Linux.  You have to choose one or the other when you turn the system on.

With this setup, you can boot linux (my preferred OS) and use VMware, software used to emulate hardware of a computer, to run your Windows install just like you booted it normally.

Though you don’t get full functionality out of it, you get the basics, which allows me to do what I would normally do in windows (download and play games).

Also, while working with this, I ran into a problem with the current kernel in Fedora 9 (2.6.27.5-37.fc9.i686) and VMware Server 1.0.8.  I had to use the vmware-update-2.6.27-5.5.7-2.tar.gz file from this post to get the drivers to compile.  Though I did not get the Perl API libraries installed (I think its related to the drivers update, I did not look into it further yet), everything seems to be working fine.

Gentoo, sys-libs/com_err, sys-libs/ss, and e2fsprogs blockings

Saturday, November 15th, 2008

This is a repost of a new common topic, but its an important one.  There have been a few blocked packages in the gentoo portage tree recently which causes problems.  You all know what I mean…


[ebuild     U ] sys-fs/e2fsprogs-1.41.2 [1.40.9] USE="nls (-static%)" 4,263 kB
[ebuild  N    ] sys-libs/e2fsprogs-libs-1.41.2  USE="nls" 479 kB
[ebuild     U ] app-crypt/mit-krb5-1.6.3-r4 [1.6.3-r1] USE="-doc -krb4 (-ipv6%*) (-tcl%)" 11,636 kB
[blocks B     ] sys-libs/ss (is blocking sys-libs/e2fsprogs-libs-1.41.2)
[blocks B     ] <sys-fs/e2fsprogs-1.41 (is blocking sys-libs/e2fsprogs-libs-1.41.2)
[blocks B     ] sys-libs/e2fsprogs-libs (is blocking sys-libs/ss-1.40.9, sys-libs/com_err-1.40.9)
[blocks B     ] sys-libs/com_err (is blocking sys-libs/e2fsprogs-libs-1.41.2)

The problem lies in if you remove sys-libs/ss or sys-libs/com_err, you have a HUGE problem.  You cant do anything online, you cant download new updates, and if you reboot, you cant mount filesystems.  Sounds like a huge bug, and I am supprised it hasnt been fixed via portage yet.

Anyways, there is a workaround for it (not that we should have to use it), and here it is.

# First, grab the files with the fetch command
emerge -DufvN system
# Next, Make a backup of com_err and ss
quickpkg com_err ss e2fsprogs
# Remove offending packages
emerge -aC com_err ss e2fsprogs
# Compile the correct and updated packages
emerge -DuavN system
# And check for broken packages
revdep-rebuild

# Alternatively if you do not wish to use system, you can use:
emerge -avf =sys-libs/e2fsprogs-libs-1.41.2 =sys-fs/e2fsprogs-1.41.2
quickpkg com_err ss e2fsprogs
emerge -aC com_err ss e2fsprogs
emerge -av sys-libs/e2fsprogs-libs sys-fs/e2fsprogs
revdep-rebuild

NOTE:  If you dont have revdep-rebuild, then install app-portage/gentoolkit
NOTE:  If you have to re-install your previous com_err and ss, then use:
emerge -av /usr/portage/packages/All/com_err-1.40.9.tbz2 /usr/portage/packages/All/ss-1.40.9.tbz2 /usr/portage/packages/All/e2fsprogs-1.40.9.tbz2 && revdep-rebuild
Making sure to match your version if not the same, and running revdep-rebuild afterwards.