Friday 24 April 2009

Why does cygwin pick up 'f' as my home drive?

I installed cygwin on my new work laptop. For some reason when ever I ran cygwin it said:
mkdir: cannot create directory `/cygdrive/f': No such file or directory
Copying skeleton files.
These files are for the user to personalise
their cygwin experience.

These will never be overwritten.

/usr/bin/install: cannot create directory /cygdrive/f: No such file or directory

/usr/bin/install: cannot create directory /cygdrive/f: No such file or directory

/usr/bin/install: cannot create directory /cygdrive/f: No such file or directory

bash: cd: /cygdrive/f: No such file or directory
Your group name is currently "mkgroup_l_d". This indicates that not
all domain users and groups are listed in the /etc/passwd and
/etc/group files.
See the man pages for mkpasswd and mkgroup then, for example, run
mkpasswd -l -d > /etc/passwd
mkgroup  -l -d > /etc/group

This message is only displayed once (unless you recreate /etc/group)
and can be safely ignored.
cp: cannot create regular file `/cygdrive/f/group.mkgroup_l_d': No such file or
directory
So, I must have got something set up incorrectly. Looking at the environment variables I see:
$ set
...lots of stuff
HOME=/cygdrive/f
...more stuff
So where is HOME set? The work laptop is running Vista and I'm farily new to it. Looked in Control Panel >> System >> Advanced System Settings >> Environment Variables, but there was no reference to HOME. Next stop was Google, obviously. It told me to edit /etc/passwd. Sure enough there was a setting against my username for /cygdrive/f. I changed it to /cygdrive/c/dave and it all worked great.

No comments: