0

Informal review of Apple Time Capsule

Posted by admin on Sep 22, 2009 in Uncategorized

[Updated 2010-06-20] 

overview_timecapsule_20080115

The Apple Time Capsule is a very nice package that for $300 includes a 500GB Hard Disk (now 1TB or 2 TB), an 802.11n Wireless gateway and router and a USB port where you can hook up either your printer or a hard disk to serve as backup of the internal hard disk.

I have been using this little guy for over a year and it has performed well in several fronts and not so well in others. Here’s my summary of observations, which of course apply to last year’s model.

Highs:

  1. Neat 802.11n router, with options for setting up standard things like internal router, gateway, NAT and port forwarding. Additionally it has options for setting up the Time Capsule as a file server either using per user shares / accounts or a global share / device account.
  2. Works very well with OS-X either as a File server, a Time Machine backup volume or a Print Server.

Ok:

  1. In order to share printer to Windows machines you need to install Apple’s Bonjour for Windows, otherwise Windows will not see the printer attached to the USB port in the Time Capsule.

Lows:

  1. SMB Server works with Samba, but does not work reliably with Windows. In fact, with Firmware newer than higher than 7.3.2 it won’t work with windows. Even with Firmware 7.3.2,  connections are often dropped.
  2. Transmission speed is between 500KBytes/sec to 1.5 MBytes / sec in the best case, when operating two or three rooms away 20+ feet. This happens in both the SMB server as well as the Appletalk server.

    Note: Probably the new version performs better here as the 802.11n WiFi transmitter is now dual band.

 

Tip: You can buy the Time Capsule refurbished form Apple and you will save yourself $50 and get the same warranty as new.

 
0

Relocating Ubuntu to a different partition on your hard drive

Posted by admin on Sep 17, 2009 in Uncategorized
Disclaimer: This article discusses serious tweaking of the partition table and SHOULD NOT be performed unless you have serious Linux experience. Even then, do your backups if you want to be safe. I will not be responsible if you inflict any damage to you machine as a result of using this document.

Last week I was cleaning up a machine where I have a multi-boot installation of Windows Vista and Ubuntu 8.04. That installation, was quite messy with respect to the size of its partitions, and where things were located, because I have used the machine to try every possible flavor of Windows Vista as well as Linux and what is now in the machine is whatever survived the test of time. The partition table reflected this and thus the layout of my hard disk was something like this:

Partition Contents Size Comment
Physical partition 1 OEM OS install recovery 10 GB Somewhat of a waste, but makes it easy to recover the software.
Physical partition 2 Windows Vista 100 GB Has data in it.
Extended Partition 100 GB
Logical partition 1 15 GB Stale partition, some OS lived in here at some point.
Logical partition 2 Ubuntu 30 GB Ubuntu x64 partition I want to keep using. Reinstalling is annoying due to difficult hardware drivers configuration.
Logical partition 3 Ubuntu swap 2 GB
Free space 38 GB Wasted space some other OS lived here at some point.
Free space 40 GB Wasted space.

In order to tidy up things, I needed to re-layout things in the disk. My initial plan for the new layout was:

  1. Make more room for the windows partition. In this case I wanted to give it some 80+ GB additional contiguous space. No, I did not want to use additional volumes as that simply adds to the management mess.
  2. Reclaim free space.
  3. Put the Ubuntu partition somewhere where it would not block contiguous space.
  4. Play with the tools and see how far I could go? – If there’s no fun, what’s the point?

Getting to work…

Ubuntu comes bundled with a fantastic tool called GParted, that allows you to resize the partitions on  the disk. This is the best tool I have found so far to manage multi-boot installations. In fact GParted is the one that allowed me to get in such a bad disk layout, because it allowed me to do lots of fancy resizing and even moving OS’s around in the disk.

Like any tool however, play long enough and you hit the limits and so in some cases GParted has a hard time accommodating our wishes and more so when using it in a machine which has data that we care to preserve. This is where imagination comes into play.

So, I booted my machine from the Ubuntu install CD, which is also a LiveCD and thus allows booting Ubuntu off the CD. From that point I was able to launch GParted as well as mount either Windows or Linux partitions which is what I needed.

My first attempt then was to simply to delete logical partition 1 and then slide the Ubuntu partition towards the beginning using the move resize function of GParted. These two operations worked, but the slide operation was slow because GParted does not look inside the partition to see what is data or not and simply copies byte by byte the entire partition. This meant that it took some two hours to do the slide of 30 GB of which 27 GB was free space. It would have been more efficient to first resize the Ubuntu partition to some 5 GB and then slide it, but…often times experience is the comb we get when we’re bald!

The layout of the disk was now:

Partition Contents Size Comment
Physical partition 1 OEM OS install recovery 10 GB Somewhat of a waste, but makes it easy to recover the software.
Physical partition 2 Windows Vista 100 GB Has data in it.
Extended Partition 100 GB
Logical partition 1 Ubuntu 30 GB Ubuntu x64 partition – Note that this is now LP1, which means that it will have a different number for the boot loader.
Free space 30 GB Wasted space, some OS lived in here at some point.
Logical partition 2 Ubuntu swap 2 GB
Free space 38 GB Wasted space some other OS lived here at some point.
Free space 40 GB Wasted space.

Next thing, I deleted the swap partition. Given the time the slide of the previous partition took I figured I could recreate swap when needed and where needed. I think I had to issue a swapoff command prior to deletion, but I am not sure; remember that I am on the LiveCD. After this, the layout of the disk was:

Partition Contents Size Comment
Physical partition 1 OEM OS install recovery 10 GB Somewhat of a waste, but makes it easy to recover the software.
Physical partition 2 Windows Vista 100 GB Has data in it.
Extended Partition 100 GB
- Logical partition 1 Ubuntu 30 GB Ubuntu x64 partition I want to keep using. Reinstalling is annoying due to difficult hardware drivers configuration.
- Free space 70 GB Wasted space, inside extended partition. some OS lived in here at some point.
Free space 40 GB Wasted space.

Next, I tried to resize the extended partition with GParted to reclaim the free space after it. This did not work.

I also tried to slide the extended partition towards the end of the disk. This way although I would not reclaim the wasted space in the extended partition, I could at least reclaim the one at the end of the disk. But, this did not work either.

So, the only alternative was to delete the extended partitions and the Ubuntu partition and re-create the partition table from that point on.

This is the point I needed to backup my Ubuntu install.Tongue out

Luckily, Ubuntu does not hardcode information which would prevent things from working, except for some knowledge of which volumes to mount in /etc/fstab and similar knowledge in the boot loader area. In this case I did not care about the Ubuntu resident boot loader definition in /boot/grub, because the boot loader I was using to boot Ubuntu is NeoGrub and it’s command file is inside the Windows partition. So, the trick then was that after backing up Ubuntu, creating new partitions and restoring Ubuntu to some other partition, I would have to re-point the NeoGrub boot loader to load the Linux image from somewhere else.

Note on boot loaders:

  1. I left the Vista boot loader as the primary boot loader, because I use Vista as my primary desktop. Why not XP? – That’s a different and long story of… drivers, and is out of scope here.
  2. The vista boot loader chain loads NeoGrub which is the one whose files I need to tweak to get my restored Ubuntu to load.
  3. NeoGrub is equivalent to Grub, so the changes you do in Grub should similar to what I did in Grub.
  4. I grabbed NeoGrub when initially setting up this machine using the excellent and concise multi-boot guides at APC Magazine. Those guides also encourage you to use EasyBcd, which is another jewel for tweaking the Windows boot manager configuration.

Ok, so now the next tasks at hand are backing up the Ubuntu partition, then fiddling with Gparted first delete the extended partition and finally create at the end an extended partition where I would install Ubuntu.

So, to backup the Ubuntu partition into the Windows partition as a compressed file I used the following commands:

sudo su
mount /dev/sda5 /mnt
mkdir /mnt2
mount /dev/sda2 /mnt2
cd /mnt
tar cpjf ../mnt2/Ubuntu_backup.bz2 *
cd ..
umount /mnt

Note that instead of using the Windows partition I could have used a flash drive, as long as it has space.

Next I went again to GParted and deleted the existing extended partition, and created a new one at the end of the disk. I gave that partition enough space to accommodate a 20GB Ubuntu and 2 GB swap space. I finally created the two partitions just mentioned.

The resulting and final partition as far as Ubuntu is concerned was:

Partition Contents Size Comment
Physical partition 1 OEM OS install recovery 10 GB Somewhat of a waste, but makes it easy to recover the software.
Physical partition 2 Windows Vista 100 GB Has data in it.
Free space 120 GB
Extended Partition 22 GB
- Logical partition 1 Ubuntu 20 GB Ubuntu x64 partition.
- Logical partition 2 Linux swap 2 GB Swap

So now I restored the saved Ubuntu backup to the newly created partition with the following commands:

sudo su
mount /dev/sda5 /mnt
cd /mnt
tar xjf ../mnt2/Ubuntu_backup.bz2

The next step was to fix the NeoGrub boot loader command file, such that NeoGrub would look for the Linux kernel in the volume that Ubuntu resides now.

In order to do this, I need to find the UUID that identifies the volume where Ubuntu resides. The most reliable way that I know of to do this is to use the utility blkid, as in the following command line:

blkid /dev/sda5
/dev/sda5: UUID="daa31e2f-c7f8-4d8b-8f1d-a4868f553629" TYPE="ext3"

With this data I now can edit the NeoGrub menu.lst file. In my machine, this file is located in C:\NST, so given that my Windows volume is currently mounted in /mnt2, I can edit the file using the path /mnt2/NST/menu.lst using nano, which is present in the Ubuntu LiveCD.

The line that you need to modify is the kernel line, which looks like this

kernel		/boot/vmlinuz-2.6.24-24-generic root=UUID=f7764841-9745-4cf8-835c-75b1f490c7bf ro

What you need to do is replace the UUID value there by the one blkid returned.

One more change to this file is that I needed to modify the root line,  which specifies the “root device” according to the Grub manual. The reason I had to change this is because my Ubuntu partition went from being located in the secons logical partition in the extended partition to the first one. I thought this would be unnecessary given that I have a UUID for the volume, but I was wrong and needed it. So, anyway, my final menu.lst looked similar to this one:

title		Ubuntu 8.04.1, kernel 2.6.24-24-generic
root		(hd0,3)
kernel		/boot/vmlinuz-2.6.24-24-generic root=UUID=f7764841-9745-4cf8-835c-75b1f490c7bf ro quiet splash iommu=soft
initrd		/boot/initrd.img-2.6.24-24-generic
quiet

Ok, the final and possibly optional step is to prevent my previous swap from being loaded by Ubuntu at boot time. Although I have created a swap partition, I want to enable swap manually after I boot Ubuntu from the hard drive.

So, in order to do this change I need to edit the file /mnt/etc/fstab, remember /mnt is where my new Ubuntu volume is mounted and comment out the line where the swap area is mounted. The line in question should look like this after commenting it with a ‘#’:

#UUID=daa31e2f-c7f8-4d8b-8f1d-a4868f553629 none            swap    sw

and now the moment of truth, you need to umount your drives, reboot and make sure that everything works.

Some references:

Grub manual

APC magazine multi-boot guide

Heliode’s article on how to backup Ubuntu

Tags: , , ,

Copyright © 2009-2010 Elusive bits All rights reserved.
Desk Mess Mirrored v1.6 theme from BuyNowShop.com.