Linux

Mount an ISO image under Linux

$ sudo -s

# mkdir -p /mnt/disk

# mount -o loop disk1.iso /mnt/disk

# cd /mnt/disk

# ls -l

Use Rsync to Backup Data

Reference: http://www.mikerubel.org/computers/rsync_snapshots/

Below is a backup script for backing up /home to /mnt/usb1/backup using rsync.

Rip DVD Audio to MP3 or OGG

This article on ubuntugeek gives a nice tutorial on how to rip DVD audio to mp3 or ogg.

Besides apt-get, the packages lsdvd and transcode are available in yum and portage as well.

dev-java/sun-jdk-1.6.0.17 (masked by: dlj-1.1 license(s))

After upgrading the portage to 2.1.7, I started to get things like below when running emerge:

Remove a File Whose Name Starts with Dash in a Bash Shell

http://codesnippets.joyent.com/posts/show/30 tells us nicely how to remove a file that has a filename starting with dash "-".

The easiest ways are:

% rm ./-badfile

or

% rm -- -badfile

A more involoved way is to find the inode number and delete by the inode num:

% ls -li
% find . -inum 12345
% find . -inum 12345 -exec rm {} \;

 

Install and Setup Ubuntu Netbook Remix 9.10

Installation

First we followed the guide to create a USB flash drive for booting UNR. For older Ubuntu OS version, such as 8.04, we could follow http://ubuntuliving.blogspot.com/2008/11/usb-creator-for-hardy.html to install the usb-creator.

After the USB flash drive is created, we plug it into the new netbook, power on the netbook, and hit F2 (or whatever key for entering BIOS setup), and change the disk sequence to the USB drive first.

The installation was very smooth.

CONFIG_SYSFS_DEPRECATED

When you compile a program that need to include kernel sources, sometimes the compile might give you an warning message like below:

 *   CONFIG_SYSFS_DEPRECATED:     should not be set. But it is.
 *   CONFIG_SYSFS_DEPRECATED_V2:     should not be set. But it is.

To fix this, you will need to recompile your kernel using menuconfig, and find

Chinese in CentOS

Here is a good post on getting Chinese on CentOS/RedHat:

http://idolinux.blogspot.com/2008/10/chinese-support-on-red-hat-centos.html

Install KeepassX-0.4.1 on Gentoo

At the moment, there is a bug in keepassx-0.4.1 that prevents keepassx from installing. The problem is that qt3support doesn't have the version that matches the rest of the qt-xx packages. And as a result, we see ebuild "blocks" that we don't have a way to satisfy the dependencies.

It turned out that the solution is quiet simple. As stated in the bug report, qt3support is not needed at all. So all we need to do is to create a custom ebuild that doesn't depend on qt3support.