Showing posts with label SwitchToDebian. Show all posts
Showing posts with label SwitchToDebian. Show all posts

Friday, December 11, 2009

Debian - Out of disk space on /tmp

I suspected I was out of disk space, due to some corrupted JAR files, while compiling NHIN CONNECT 2.3

How do I tell on Debian?

$ sudo df

shows 0% available in /tmp

What's taking up this space?

$ sudo du /tmp

Shows recursively, what is where.

This appears to be a difference between GlassFishESB and GlassFish 2.1, but I'm not sure.

Wednesday, November 18, 2009

Git on a Flash Drive

Had some serious trouble figuring this one out...

The Idea: Use Git for source control on my Debian laptop, and keep a copy of the repository on a USB Flash Drive.

It should work something like this:

on flash drive:
mkdir project
cd project
git --bare init
on desktop:
git clone /path/to/usb/drive
make changes
git add .
git commit -m "did something"
git push origin master
But it didn't quite work that way

git clone resulted in the error messages "unable to chdir or not a git archive"
and "The remote end hung up unexpectedly"
The problem here is one of case-sensitivity. Git looks for a file named HEAD.
ls
branches config description head hooks info objects refs
but HEAD is lower case on the flash drive.

Attempts to Fix:
  • Renaming it to head results in an error (its already there).
  • Renaming to a temporary name and then to HEAD results in head showing up again.
So I look around on the drive and find out that NOT every file which has its name downcased. I check properties, and the flash drive is mounted using VFAT. In my configuration (Applications/System Tools/Configuration Editor) I check the VFAT settings (system/storage/default_options/vfat) and see a mount option of shortname=lower. I change this to mixed, remount the floppy and head is now HEAD.

Go google shortname=lower to find the world's opinion of this default...

Anyway, Git works on USB Flash Drives!

Friday, October 30, 2009

Installing Nokogiri gem on debian

sudo aptitude install libxml2-dev
sudo aptitude install libxsl1-dev
sudo gem install nokogiri

This fixes the "could not find libxml2" error

Wednesday, October 7, 2009

Mounting Windows Shares from Debian

Next in my Switch to Debian, I had to mount a shared windows drive. This requires smbfs:

$ sudo aptitude install smbfs

Then I create a dir for this host and share (as root because its a root-owned dir):

$ sudo mkdir /mnt/winhost
$ sudo mkdir /mnt/winhost/sharename

Then I mount the dir. Since I am not using an LDAP login, I have to specify my LDAP credentials:

$ sudo mount -t smbfs -o userame=myLDAPuser,password=myLDAPpass //winhost/sharename /mnt/winhost/sharename

Problem Solved. If I could only print!

Tuesday, October 6, 2009

Configuring sudo on Debian

Next in the Switch To Debian, is the ability to use the sudo command.

This is needed, for example, to install many programs, which install to root-protected directories.

I edited the /etc/sudoers file with visudo and added this line

jeff ALL=(ALL) ALL

What this means, I have no idea.

Tuesday, September 15, 2009

Running Rails On Debian

During my Switch To Debian, I had to get rails runnning on my laptop. My first try, I could not get the rails command to work - had the classic write_inheritable_attribute problem. However, this time, the problem was not the iconv library, as activesupport loaded fine.

Instead, it appeared to be a missing require 'rubygems' from the script.

I got it working, but could not start the server. It said my version of rubygems was out of date and I needed to update it with gem update --system. Nice, except I ran it and got:

ERROR: While executing gem ... (RuntimeError)
gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.


I found the answer, to build rubygems 1.3.1 from source, and then gem update --system worked. See the post here.

Friday, September 11, 2009

Debian: Mounting USB Drives

During my Switch To Debian, I was unable to use a USB drive.

When plugging it in, I got an error:

Error: org.freedesktop.DBus.Error.AccessDenied.

This was because my user, who started X was not a member of plugdev.

I added my user in /etc/group and bingo. Solved

Thursday, September 10, 2009

Debian: Perhaps HAL Requires Bluetooth

During my Switch To Debian, one thing which we changed by manually starting Dbus, HAL, and wicd was that these now are started later relative to other startup processes.

I noticed Bluetooth in the startup logs (when it all failed) started immediately after HAL. No more, Bluetooth is now started when I start Dbus.

Perhaps HAL is dependent on Bluetooth by its configuration?

DBUS is on Fire

While Switching To Debian, we had an error initializing HAL, which is related somehow to dbus. On a related note, wicd was not starting, nor the wicd-client.

Solution - boot into console mode. Start dbus, then wicd, then hald.

Problem solved.

Debian Extremely Slow - When Not Connected

The first problem to overcome in the Switch To Debian was that startup is slow - Extremely so. 10 minutes of pain. But this only happens when NOT wired to my company's LAN.

Checking the syslogs, we found there were numerous DNS requests going out. We disabled DHCP, and the problem went away.

Now it fails quickly.