Monday, April 06, 2009

TIme Machine on network drive

To map a network drive as a backup destination for TM is necessary to set the following parameter (I have Leopard on my Macbook):

defaults write TMShowUnsupportedNetworkVolumes 1

After that a strange behavior happens. I connected the afp share, mounted the Image file (Sparse File) and when I tried to do a full backup the system responded with an error (I didn't remember what was). The strange thing is that the day after the systems automagically start to work correctly. Time Machine mounted the afp disk, mounted the image disk and begin the backup. 6 hour laster the first full backup was done (via utp cable). Now each hour via wifi my backup start automatically.

Great !!

Friday, April 03, 2009

Mac file system on NSLU2

Next step for a network Time Machine.

I formatted an external disk (MyBook 500GB) with the Macbook. I chose the "Mac OS Etended (Case-sensitive)" volume format from the Disk Utility.

That volume format is the only that I was able to mount in R/W on the NSLU2.

After that I created the "Disk Image" that will be used by Time Machine for the backup. For the disk image I used the following command to create it directly on the external disk:

hdiutil create -type SPARSEBUNDLE -size 450g -fs HFS+J -volname "Backup Drive" MacBook_MACNUMBER.sparsebundle

The MACNUMBER is the MAC address of en0.

"Eject" of the external disk, an attach to the NSLU2 usb port 2.

NB: remember to change the user and group of the HFS file system when mounted on the NSLU2 with the once that access it with the netatalk.

Sunday, March 29, 2009

How to compile netatalk on NSLU2

I'm trying to use TIME MACHINE on NSLU2, someone on the blogosphere claims it works.

So I have a spare hard drive and I want to try.

First problem AFP on NSLU2. After a lot of googling I realize that the better choose to have an afp implementation that works ok is to compile it by yourself.

I followed the following blog to do this:

BTW, here are my steps:

1# Login on NSLU2 as root

2# apt-get source netatalk

3# apt-get install devscripts fakeroot libssl-dev cracklib2-dev libpam-cracklib

4# apt-get build-dep netatalk

5# cd netatalk-2.0.3

6# DEB_BUILD_OPTIONS=ssl debuild

7# dpkg -i ../netatalk*.deb

8# echo userpassword > /home/username/.passwd

9# chown username /home/username/.passwd

10# chmod 600 /home/username/.passwd

11# use of in the afpd.conf

This way afp works great between NSLU2 and my Macbook.

I'll try the TIME MACHINE setup ....

Sunday, September 07, 2008

How to move the Wubi installation in a new Disk/Partition

Boot in windows and move all the ubuntu directory (the name of the wubi directory is ubuntu for "ubuntu 8.04 hardy" and wubi for "ubuntu 7.10 festy") to the new disk/partition. 
Then edit the file D:\ubuntu\disks\boot\grub\menu.lst (change the disk letter to the letter of the destination disk/partition). Is necessary to change the root disk parameter and the UUID identifier to match the new disk/partition.
For example: 
I have moved the wubi installation from C: to D: and then I have changed the following lines: 
root        (hd0,0)/ubuntu/disks
kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=9A7006E17006C44B loop=/ubuntu/disks/root.disk ro quiet splash

root        (hd1,0)/ubuntu/disks
kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=763CE3323CE2EBD5 loop=/ubuntu/disks/root.disk ro quiet splash

To know the UUID of the different disk/partition is enough to boot the system from an Ubuntu LiveCD and use the vol_id /dev/<sda?>.

How to create a Wubi virtual disk from physical disk

I have played around with wubi and after a little I decided to migrate it in a real partition. I didn't see a real speed improvement with the new configuration and so I decided to roll back to the previous status, Ubuntu with Wubi. I know that the physical installation is more secure and so on, but the virtual disk allows to have some benefits of the installation in a virtual machine and some benfits of a real installation.

I searched with google if it was there some procedure to do it automagically, but I didn't find anything.

So here it is my procudure to do it.

First of all I have used wubi installer to create a new installation of ubuntu inside windows ("dummy wubi"). That step is needed to have the normal structure of the wubi enviroment: ubuntu line in the boot loader of Windows, directory tree of wubi, root disk, swap area, boot directory, etc.

Then I used a Ubuntu LiveCD inside a Vmware VM, but it can work also with a directly boot from livecd, as work environment to do the following steps.

Inside the VM I have mounted the physical partition of my old ubuntu installation (mounted on /media/disk) and I created a virtual disk for wubi on the internal disk of the VM (mounted on /home/ubuntu/discoapp):

# sudo dd if=/dev/zero of=root.disk bs=1MB count=1 seek=29000

# sudo mkfs.ext3 -F root.disk

Then I mounted the new formatted virtual disk:

# sudo mkdir vdisk

# sudo mount -o loop /home/ubuntu/discoapp/root.disk ./vdisk

and I copied all the files from the physical one to the virtual one:

# sudo rsync -av /media/disk/ ./vdisk

the last step was to copy the fstab of the "dummy wubi" in the new virtual disk. This step is required because the fstab copied from the physical partition is related to the physical environment. I mounted the disk of the "dummy wubi" on ./volddisk and did the file copy.

That's all. I have unmounted all the disks, closed VM, deleted the root.disk of the "dummy wubi" and moved the new virtual disk with all the data in the wubi directory (\ubuntu\disks).

I rebooted the system, chose the ubuntu voice in the boot menu of windows and ... incredible, it works !!

Maybe is possible to reduce the number of steps and optimize all the procedure, but for the moment I am very satisfied of the results.

Monday, January 28, 2008

I tried to use this device as my home server. Today I had some problem when I tried to install the Samba package and some other stuff.
I used the apt-get clean and the apt-get check command more than ones to be able to install the software.
Until now I was not able to prepare a stable system with that machine and the various different problem seem related to the disk. I'm thinking to change the external 2.5 " disk ( a WD 250GB ) with a more traditional external 3.5" disk. The external power can help to resolve this strange behavior, I think.

Monday, February 12, 2007

New year, new system, new blog title.
Virtual Lab is so common now .... so a change is required for this blog. I will always post what happen in my digital little word obviously and always whit my terrible english .
This post from my new linux installation, this time Ubuntu 6.10. It's a very strange name, but they have a very incredible community, I think that only now I know what a community is. Incredible .....

Saturday, July 01, 2006

Gentoo first Installation

Obviously the first approch had some problem. In a stege3 installation, the first kernel compiled hang up with this error:

VFS: Cannot open root device "root=/dev/sda3" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel Panic - not syncing: VFS Unable to mount root fs on unknown-block(0,0)

After some googling and more tests I find the error. It was a missing scsi driver in the kernel. In vmware the scsi interface can be LSILogic or BisLogic. The default is the first one and it need to compile the MPT driver in the kernel.