I just switched off my VPS that was serving rinta-aho.org. I decided to start using a “web hotel” (http://www.louhi.fi) instead, to reduce the maintenance load on myself. I hope you won’t see a difference in this website or my e-mail. So far, I don’t, and I am happy.
On Git
I am starting to like Git. Check out what it is here.
This is more like a note-to-myself kind of post, but also a crash introduction how to replace a shared CVS repository with Git.
Assume you have Git binaries installed and a directory full of files (maybe tracked with CVS, Subversion, some other version control tool, or not at all – it really doesn’t matter). Jump into the directory and type:
> git init .
Now you have a Git repository. You can do local commits, you can clone the repository with the ‘git clone’ -command, and so on. However, I want to have a central point, which is backed up, and which is a “hub” for the other repositories. An example is a “Documents” -directory, which I just want to:
a) store “the state” on a server,
b) sync between different machines,
c) store the history of changes,
d) store the checksum of each file,
e) be able to do simple ‘git push’ and ‘git pull’ without extra magic
Here is how to set it up (check out the command explanations from man pages if you care):
On the server, create a bare Git repository:
> mkdir ~/Documents.git
> cd ~/Documents.git
> git init --bare .
On a machine with the existing Documents directory:
> cd ~/Documents
> git init .
> git add *.txt
> git commit -m "Added all old .txt -files."
> git remote add server ssh://server/home/user/Documents.git
> git push server master
> git branch --track m2 server/master
> git checkout m2
> git branch -d master
> git branch -m m2 master
On all other machines, simply:
> git clone server ssh://server/home/user/Documents.git Documents
> cd Documents
> vim foo.txt
> git add foo.txt
> git commit -m "Edited foo.txt."
> git push
After these steps, you can just keep doing ‘git commit’, ‘git push’ and ‘git pull’ on all of the machines, and the “hub” at the server is easy to backup.
Playstation 3, USB backup, and error 80010006…
After a long time I decided to backup my Playstation 3. All I would need to connect a FAT32-formatted USB drive, and go to “System settings”/”Backup” in the PS3 menu. Easy? Right..
However, trying with two different USB drives, I got error 80010006 shortly after the backup had started. I could manually copy videos and game settings to the same drive so I did not understand what could have been wrong. After a little Googling, I found out that PS3 might be somewhat picky on how the USB drive is formatted. I used Mac OS X (10.6) to partition and format the drive to “MS-DOS” format (i.e. FAT32). It seems that PS3 does not like FAT32 drives formatted with a Mac. So, I booted up my Ubuntu PC and formatted one of the USB drives there (used system type 0x0c
(W95 FAT32 (LBA)) instead of 0x0b
(W95 FAT32)). And then it just worked…
So, it goes approximately like this (of course you may have a different device name and fdisk menus, but you get the idea):
# fdisk /dev/sdb Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-12161, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-12161, default 12161): Using default value 12161 Command (m for help): p Disk /dev/sdb: 100.0 GB, 100030242816 bytes 255 heads, 63 sectors/track, 12161 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 12161 97683201 83 Linux Command (m for help): t Selected partition 1 Hex code (type L to list codes): c Changed system type of partition 1 to c (W95 FAT32 (LBA)) Command (m for help): p Disk /dev/sdb: 100.0 GB, 100030242816 bytes 255 heads, 63 sectors/track, 12161 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 12161 97683201 c W95 FAT32 (LBA) Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. # mkfs.vfat -v /dev/sdb1 mkfs.vfat 3.0.7 (24 Dec 2009) Auto-selecting FAT32 for large filesystem /dev/sdb1 has 255 heads and 63 sectors per track, logical sector size is 512, using 0xf8 media descriptor, with 195366402 sectors; file system has 2 32-bit FATs and 32 sectors per cluster. FAT size is 47674 sectors, and provides 6102219 clusters. Volume ID is 3d0a6e1a, no volume label.