betweenGo

OS

Cygwin 1.7.x, mounts and /etc/fstab

by Frank Kim on Feb.08, 2010, under Cygwin

Sunrise Heron Silhouette on FlickrSunrise Heron Silhouette by Brandon Godfrey

A few days I installed Cygwin on a new laptop.  I saw the warnings that Cygwin 1.7.x is new but I chose to ignore it for now.

I soon noticed that Cygwin was not remembering my mounts.  After reading this on the Cygwin front page I realized I needed to do some more research.

… the mount point storage has been moved out of the registry into files. User mount points are NOT copied into the new user-specific /etc/fstab.d/$USER file. Rather, every user has to call the /bin/copy-user-registry-fstab shell script once after the update.

Next I looked at the /etc/fstab file which pointed me to the Cygwin Mount Table documentation.  Using this documentation I did the following steps so that my mounts are always remembered.

  1. Manually mounted the C: drive.
    $ mount c: /c
  2. Ran mount to determine what to add to my /etc/fstab.
    $ mount
    C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
    C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
    C:/cygwin on / type ntfs (binary,auto)
    C: on /c type ntfs (binary,user)
  3. Based on the output of mount I added this line to my /etc/fstab.
    C: /c ntfs binary,user
  4. Closed the Cygwin shell, opened a new one and verified the C: drive was properly mounted.
  • Share/Bookmark
Leave a Comment :, more...

Microsoft Windows Vista Error 0×80070091 and Cygwin

by Frank Kim on Sep.25, 2009, under Windows

In Windows Vista I installed JBoss.  When I then logged in as another user for some reason all the JBoss directories had no permissions, i.e. their permissions were 000.  I ignored this and went ahead and copied one of the server directories.  Then I tried to go into the copied server directory and could not.

Thinking something was funky I tried to delete the whole JBoss directory but got this maddening and uninformative window.

Microsoft Windows Vista Error 0x80070091

I googled for a long time but could not find a satisfying solution.  I gave myself full control permissions for all files and folders but that did not help.  Then I noticed that if I clicked on one of the directories that Windows Vista was not letting me delete I would be prompted for permission to enter this directory.  Then I would repeat this process for all directories within.  After doing this I could delete that directory.

I then looked in Cygwin and found out what Vista had done, it had simply given the directory read and write permission.

Therefore the simple solution was to do the following:

chmod -R 500 .

After doing that simple change I could remove everything.

  • Share/Bookmark
Leave a Comment :, , more...

Moving Your Cygwin Installation

by Frank Kim on Jan.29, 2009, under Cygwin

I was running out of space on one drive so I decided to move my Cygwin installation to another drive.

It turned out not to be too difficult thanks to this article Hints for Setting up Cygwin.  This is how I did it though there might be a simpler way.

  1. In a bash shell save the mount points as a batch script.
    $ mount -m > /c/cygwin-mount.bat
  2. Close the bash shell.
  3. Move the cygwin folder from one drive to the other.  In my case that was from C:\cygwin to D:\cygwin.
  4. Update all the short cuts for Cygwin in the Start Menu to use the new drive.
  5. Update  cygwin.bat, which is in the top level of your Cygwin installation, to use the new drive.
  6. Update your Windows environment variable to use the new Cygwin bin path, e.g. D:\cygwin\bin.
  7. Open a DOS cmd prompt.  Run umount to unmount the old Cygwin mounts.
    > umount
  8. Next run the mount points script.
    > C:\cygwin-mount.bat
  9. Open a Cygwin bash shell to make sure everything is working correctly.
  • Share/Bookmark
Leave a Comment more...

Mac Hibernate

by Frank Kim on Jan.07, 2009, under Mac

I tried to make the Mac hibernate based on this article, Make my Macbook Pro Hibernate. Unfortunately it did not work and I am wondering if it is because this article is older and maybe it does not work for Mac OS X Leopard.

In the end I have gotten used to not having hibernate on the Mac since start up and shutdown are so fast.

  • Share/Bookmark
3 Comments more...

NTFS Junctions

by Frank Kim on Sep.18, 2008, under Windows

Windows NTFS has a nice but relatively unknown feature called NTFS junctions.  It is like hard links in Unix except it is only for directories.  Microsoft has a KB article about it which points to several utilities.  However I have been using Mark Russinovich’s junction tool exclusively.

Using Junction

Usage: [-s] <directory or file name>

-s Recurse subdirectories

If you want to create or delete a junction, use Junction like this:

Usage: [-d] <junction directory> [<junction target>]

To delete a junction specify the -d switch and the junction name.

Here is an example of using junction.  Note that the order of arguments is opposite of the Unix ln command.

> junction foo d:\docs\foo

The above example will create a junction called “foo” in the current directory.  This junction will point to d:\docs\foo.

To do the same in Cygwin:

$ junction foo `cygpath -aw /d/docs/foo`

One tip is to use the DOS dir command.  It will display <JUNCTION> instead of <DIR> in directory listings for junctions.

  • Share/Bookmark
Leave a Comment more...

Microsoft Office 2008 update 12.1.0 will not install

by Frank Kim on Aug.29, 2008, under Mac

I tried many times to install the Microsoft Office 2008 update 12.1.0 but each time it would hang.

Finally I found this forum thread about the exact same problem, Msi Wind Forums • View topic – Microsoft Office 2008 update 12.1.0 will not install.

This is how to get the update to install.

Should have an option to edit……thing is it’s to late because your forced quit. Run the installer again and when the installer hangs move the installer window to one side…the error window noted above should be directly behind the installer and thats why you missed it in the first place…the installer has halted (and appears hung) as the error window is awaiting a response from you…..but you dont see it. All you have to do is click the edit button on the error window and then installer will continue…thats it. You can close the error window and the installer will continue.

  • Share/Bookmark
Leave a Comment more...

Cygwin Bash Scripts and Java

by Frank Kim on Aug.08, 2008, under Bash, Cygwin, Java

Running Java scripts in Cygwin bash scripts becomes a little tricky because you want to treat most paths in Cygwin as normal UNIX paths but Java expects DOS paths.  Therefore to get around this you can use the mixed option for cygpath.

For example:

if [ -e /usr/bin/cygpath ] || [ -e /bin/cygpath ]
then
  export FOO=`cygpath --mixed "e:\work\betweengo/target/foo"`
else
  export FOO="e:\work\betweengo/target/foo"
fi

The result on Cygwin is that FOO will be set to “e:/work/betweengo/target/foo” which will work both in DOS and UNIX.

  • Share/Bookmark
Leave a Comment : more...

What’s Running

by Frank Kim on Jul.30, 2008, under Windows

Previously I recommended TcpView to help figure out what ports are being used.  But today I was informed of an even better, more informative program called What’s Running.

  • Share/Bookmark
Leave a Comment more...

Sun’s VirtualBox

by Frank Kim on Jul.19, 2008, under Mac

Macworld has a column, A look at Sun’s VirtualBox, with a video about installing and using VirtualBox on a Mac.  I think it is exciting that a free open source solution like VirtualBox can be used to run Windows on top of Mac OS X (though in this video it was used for running OpenSolaris).  One has to believe this is a big issue for Parallels and Fusion.

  • Share/Bookmark
Leave a Comment more...

Maintaining your Mac

by Frank Kim on Jul.19, 2008, under Mac

Macworld has a series of articles that I found helpful on maintaining your mac.

  1. Essential Mac Maintenance: Get set up

    Perhaps the most important component to test is RAM…  Thankfully, it’s not difficult to do so, although a comprehensive test can take a while. Apple Hardware Test, included on the Mac OS X Install disc that comes with all recent Macs, has an Extended Testing option that tests your RAM.

  2. Essential Mac Maintenance: Rev Up Your Routines
  3. Five Maintenance Myths

    Myth #2: “You need to run the Unix maintenance scripts.”
    You may have heard about a collection of magical Unix maintenance scripts that OS X is supposed to run automatically. The story goes that because these scripts are scheduled to run in the middle of the night, putting your Mac to sleep or shutting it down prevents them from running—so you need to do so manually…

    An easy way to run the scripts manually is by using Mike Vande Ven Jr.’s free Maintidget 1.3, a Dashboard widget that shows you the last time each script was run and lets you manually run one or all with a single click. There are also innumerable tweaking utilities that provide similar functionality

  • Share/Bookmark
Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!