Rabu, 14 November 2012

3rd Party Repository: Google Chrome


This repository is available for: Stable 

Title:Chrome browser in Google repos
Description:Google Linux repository on dl.google.com.
Daily Build:no
Setup key with:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 

Setup repository with:
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
Setup package with:
sudo apt-get update 
sudo apt-get install 
where is the name of the package you want to install.

Sabtu, 17 Mac 2012

Khamis, 15 Mac 2012

enable mod userdir under apache2

Apache2 mod userdir give each user in Ubuntu system have access their home folder under public_html. All web files, web system, etc must be put under this public_html. User or anybody can access that files/web system in any web browser using http://localhost/~username (locally) or http://ip-address/~username (in the network/intranet). Below is the command to enable the userdir mod.

1. sudo a2enmod userdir
2. service apache2 restart

To enable php you need to comment out ifModule userdir in php5.conf

Selasa, 3 Januari 2012

Mount qemu harddisk image in linux

1. Check the image format
qemu-img info image.img
image: image.img
file format: qcow2
virtual size: 2.0G (2147483648 bytes)
disk size: 201M
cluster_size: 65536
2. second step is to convert the image format to RAW format:

qemu-img convert –f qcow2 image.img –O raw image-raw.img

3. get the offset for mount option

fdisk -u -l image-raw.img

Disk image-raw.img: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders, total 4194304 sectors
Units = sectors of 1 * 512 = 512 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
image-raw.img1 * 16065 4192964 2088450 83 Linux

Then I have the sector size (512 in my case) and the offset (16065, start sector of my partation), so the offset should be 512*16065= 8225280 (btw, you can calculate with bc: echo ‘512*16065’ | bc)

4. Create mount point mkdir /mnt/image

5. mount the image

mount -t ext4 -o loop,offset=8225280 image-raw.img /mnt/image

file type (-t ext4 ) can be identify from fdisk output above. System -- Linux. alternatively you can run the image under qemu to see the OS. i.e qemu image-raw.img