Monday, January 26, 2015

Installing Oracle Java in Ubuntu, Something I seem to do a lot!

I create Virtual Box Virtual Machines for just about every project, so I end up installing Java on them a lot. I like the Oracle JDK, but for licensing reasons, that install is not available as part of the "normal" apt repository.

I installed Java via a PPA (http://askubuntu.com/questions/4983/what-are-ppas-and-how-do-i-use-them) by webupd8team (http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html). I ran these commands to add the PPA to the apt-get repo and update that repo, install Java7, and set up the various java 7 environment variables.

add-apt-repository ppa:webupd8team/java

apt-get update
apt-get install oracle-java7-installer
apt-get install oracle-java7-set-default

This installs the java 7 version. Same commands work with 8 by changing the version number.

Saturday, January 24, 2015

Switching to an SSD

I switched over to an SSD to replace the HDDs on my Dell XPS laptop. What a speed improvement. And, this is way too easy.

I was a little nervous about going to an SSD for everything - I had read that there are limits to the number of write operations an SSD can support before failure. But a little online reading put my mind at ease - mostly the thinking that on a 3 year old laptop, the computer itself will be out of date before the SSD fails.  The laptop is an XPS 17. It has an I7 quad code CPU, 16GB of RAM, and dual 750GB HDD drives. So I went ahead.

I ordered a Samsung 850 1TB SSD from Amazon (http://www.amazon.com/gp/product/B00LF10KTE/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1). When it arrived, I also realized it did not come with a USB cable, so I ordered that next (http://www.amazon.com/gp/product/B00HJZJI84/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1).

Once I had both, I installed the Samsung migration tool that came with the SSD and ran the clone from my C: drive to the new SSD. It took about 3 hours to clone about 650GB. Word to the wise: make sure nothing else besides the migration tool is running or the clone might be incomplete.

After that was complete, I shut down the laptop, unscrewed that back panel and removed the #1 HDD. Then plugged in the SSD and screwed it in. It all fit perfectly. I booted the laptop, also no problems. And boot time was remarkably quick.

And that's it. I am thrilled with the speed.

Monday, April 21, 2014

VirtualBox Ubuntu Slow Shared Folders Under Windows

Often, especially with large file transfers, it seems that the shared folders facility in VirtualBox (running Ubuntu, but not sure that matters), running as a Windows guest, are very slow.

I added these lines

255.255.255.255        VBOXSVR #PRE
255.255.255.255        VBOXSRV #PRE


To this file:

\windows\system32\drivers\etc\lmhosts

And then restarted the VM. I saw a big improvement.

Monday, April 7, 2014

Shared Folders Issue on VirtualBox Ubuntu

I recently upgraded my VirtualBox Guest Editions to 4.3.10 and the shared mounts that I normally create stopped working. I was running this mount:

sudo mount -t vboxsf Dropbox /home/steve/Dropbox
And getting this error:

mount: wrong fs type, bad option, bad superblock on /home/steve/Dropbox,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail  ...

After some research, it turns out that after the Guest Editions upgrade, the symlink for mount.vboxsf was broken. Here's what I ran to correct it:
cd /sbin
sudo rm mount.vboxsf
sudo ln /usr/lib/x86_64-linux-gnu/VBoxGuestAdditions/mount.vboxsf mount.vboxsf
This did the trick. Thanks to this post for the tip:

http://superuser.com/questions/736024/cannot-share-host-directory-with-virtualbox-guest-mint-16-64-bit

UPDATE: this may be fixed in the next Guest Editions release:

https://www.virtualbox.org/ticket/12879