Sunday, October 26, 2008

upgrade a linux hard disk

reason:
my 2GB SD card very soon run out of spaces that i need a bigger SD card
goal:
transfer my 2GB card system to a 16GB card
references:
http://encodable.com/tech/blog/2006/10/30/Ubuntu_Linux_Hard_Drive_Upgrade
http://tlug.dnho.net/?q=node/91
http://www.togaware.com/linux/survivor/Upgrade_Hard.html
my steps (assume root or sudo...)
0. # check existing partitions
sfdisk -l /dev/sdg
sfdisk -d /dev/sdg > sdg.out
# the next line wouldn't work because i have different size of card
sfdisk /dev/sde < sde.out # need to edit sdg.out to get sde.out
1. # partitionng the new disk
fdisk /dev/sde
# some extra stuff might be useful:
mount -t ext3 /dev/sdg1 oldd/
mount -t ext3 /dev/sde1 newd/
2. # format new partitions
mkfs.ext3 /dev/sde5
mkswap /dev/sde6
3. # (remote) copy linux directories from old disk to new disk
rsync -av --delete --exclude oldd/home/ oldd/ newd/
rsync -av oldd/home/ newd/home/
4. some directories not copied..
5. so umount then run
fsck.ext3 -p /dev/sde1
6. still not work...
mkfs.ext3 -c /dev/sde1
to be continue...

at last:
7. mount disk
8. find uuid of partitions in /dev/disk/by-uuid/
9. use new UUIDs in /etc/fstab and /boot/grub/menu.lst
10. grub
> find /boot/grub/stage1 i.e. see help

grub> setup (hd0) (hd0,0)

...which installs grub into the MBR of hd0 (hda) using the boot files that were already in /boot on hd0,0 (hda1).

Saturday, October 25, 2008

pc report - my harddiskless linux box! :)

according to xubuntu's minimum system requirement only 1.5GB is required for the system installation. therefore, my 2GB SD card is good to replace the hard drive, at least for the moment.

by using an atom dual core, the performance is actually not bad. it's not as fast as my amd quad, but it costs me only 1/6 of the price.

it has no hard drive, there is no sound besides the fan... well, the stock fan is really noisy though. ;P i need to get rid of it later.

the installation guided me using 141.2 MB for the swap. although i don't think it will ever be used coz i have 2 GB ram on board, i couldn't get installation complete without partitioning a swap area. the "dividing" left me 1,761,100 bytes for the file system. and right after the system reboot, i see 89% used and only 200MB free space for the coming media player, codec, etc.

it feels the SD disk is slower than the boot-from-CD system. i have no idea. system monitor reads 10% usage of cpu in average, while the firefox is up. i assume it's good enough to be a web browsing machine.

linux to see samba folder

a sweet thing about nautilus is that it supports lots of plug-ins.
>sudo apt-get update
>sudo apt-get install lib-gnomevfs-extra

in nautilus, smb:///, or
smb:///
i.e. it will ask for the password afterward.

however, i couldn't have drag-and-drop working yet in xubuntu. i remember ubuntu did it ok...
so, getta do it in the clumsy way - ftp.
let me know if you hv any clever tricks. ;)

format usb drive

# partitioning
fdisk /dev/sdb

# format as vfat. i.e. remember to umount first
mkdosfs /dev/sdb

Sunday, October 19, 2008

cgoban + gnugo on maemo

finally get them running. yaahoo!!!!!
i can carry this tiny 19x19 board around from now on. :D
the info is quoted as below:
*************************
Hello,
I've compiled cgoban1 for OS2008. I've started from debian SID package, then replaced the source files from the maemo OS2006 port, but without hildon libs. Using hildon breaks IGS (empty games window, games boards don't open), don't know why. So the window won't resize and no text input (at least on n800, on n810 hardware keyboard may work, but I don't have one to test), to insert your igs username and password you may edit /home/user/.cgobanrc or copy it from your desktop.
You have to install the package from xterm as root with "dpkg -i /path/to/file.deb". You can download the debian package from:
http://www.digitaldruid.net/download/cgoban-n8x0_1.9.14-14_armel.deb
and source from:
http://www.digitaldruid.net/download/cgoban-n8x0-1.9.14.tar.gz
Gnugo from OS2006 port is still working, download it from:
https://garage.maemo.org/frs/download.php/382/gnugo_3.7.10m1-1_armel.deb
Marco
*************************

Sunday, October 05, 2008

connect to Samba server

in Nautilus,
smb://user:passwd@hostname/sharename

Saturday, October 04, 2008

ubuntu 64-bit + usb harddive + 3D visual effect

can't help that I am so excited...

Originally my amd64 quad comes with vista that i don't want to mess it up (it's messy enough); so i decided to install ubuntu on an external usb hard drive. The idea is simple: I have the BIOS configured to look for any external USB harddrive. If the linux drive is there, load ubuntu; else, load vista from my local hard drive. For this purpose, the motherboard must support booting from USB.

tried google earth. it crashed my x-window. probably b'coz of 64 bit.

Enabled compiz fusion effect
simple steps are available from
http://lhansen.blogspot.com/2008/04/3d-desktop-compz-fusion-on-ubuntu-804.html

the rotating cube is so SWEET!