Thursday, June 27, 2013

Making room on your SSD

Here is a quick and dirty method for making more room on your Solid State Drive (SSD). Most people have a SSD for the OS and a Hard Disk Drive (HDD) for data. Since the "Program Files" folders in Windows have a big footprint, and not every program needs the extra speed of running on SSD, we can move the files to the HDD and link them from the SSD. This is transparent to the programs, but your SSD should see some space savings. Let's get started!

First we need to "backup" the data from our "Program Files" folders. We can use xcopy to do this:

xcopy /S /H "C:\Program Files" "E:\Program Files"
It will ask you if "Program Files" is a file or a directory. Press 'D' to select directory.
If you have a 64-bit system, then do the same thing for "Program Files (x86)".

Now all we need to do is set up hard links on the folders in "Program Files" to point to the folder on the HDD instead. You can pick what programs you want to do this to. I leave my games on the SSD (because I like the performance), and other programs like Skype get moved to the HDD.

To link a folder all you have to do is delete the current one (be certain you've backed it up properly!) and create a hard link with the same name:

rmdir /S /Q "C:\Program Files\Adobe"
mklink /J "C:\Program Files\Adobe" "E:\Program Files\Adobe"

Related reading: LifeHacker - Move the Users Dir in Win 7

Other copy options include windows robocopy:
robocopy /S /Z /R:0 /W:2 /V /MT:4 "D:\Program Files" "E:\Program Files"
or a Linux Live CD:
cp -ar <source> <dest>

Set Linux Server screen resolution in VirtualBox

After a bit of headache, I came across the magic combination that finally worked.
I'm using OSX as a host, and Ubuntu 10.04 as a guest.

First install guest additions. Run
sudo apt-get install virtualbox-guest-additions
OR
Click 'Devices'->'Install Guest Additions...', and mount the cdrom:
sudo mkdir /media/cdrom
sudo mount /dev/cdrom /media/cdrom
sudo /media/cdrom/VBoxLinuxAdditions.run

Add the following to /etc/default/grub
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD_LINUX=keep

After editing the /etc/default/grub run:
sudo update-grub
sudo reboot