Format hard drive using fdisk

Got an ATA hard drive hooked to an external USB package and need to reformat the disk to ext3 system.

First, I run fdisk to see what content it has
fdisk -l /dev/sda1

Then, I re-partition it using
fdisk /dev/sda1
select option d to delete the old partion,
and then option n to add a new partition, where I choose the primary partition instead of the extended one. There will be complaint about it’s too large, but since this disk is not going to be used as a boot disk, so I don’t care

Next, I create the ext3 file system on the partition
/sbin/mkfs -t ext3 /dev/sda1

After it’s done, I can mount it to my Linux system
mount /dev/sda1 /disk3

Optionally, I can change the percentage of reserved blocks using tune2fs, e.g., from the default 5% to 3%
tune2fs -m3 /dev/sda

Install NTFS driver for CentOS

First, I download the driver by visiting http://www.linux-ntfs.org

Second, there are two versions of rpm files available for Redhat Enterprise 4, kernel 2.6.9-34.ELsmp, which I downloaded both. But none works. I found there installed locations by running rpm again

rpm -qpl kernel-module-ntfs-2.6.9-34.0.2.ELsmp-2.1.20-0.rr.10.0.i686.rpm

It showed the location is /lib/modules/2.6.9-34.0.2.ELsmp/, but the correct kernel library path is /lib/modules/2.6.9-34.ELsmp/. That’s why modprobe failed to find the installed file. So I copied the file to the correct path

cp -R /lib/modules/2.6.9-34.0.2.ELsmp/kernel/fs/ntfs /lib/modules/2.6.9-34.ELsmp/kernel/fs/

Then I successfully run
modprobe ntfs
dmesg | grep ntfs
mount /dev/sda1 /disk3 -t ntfs -r -o umask=0222

The problem is that the disk mounted is read only

GPG configuration

Configuration:

1) Copy all key files to the folder under the home directory called .gnupg.
2) Edit file gpg.conf, unmark and change the line
default-recipient me@hongyu.org

Encrypt:
gpg –encrypt-files *

Decrypt:
gpg –decrypt-files *.gpg

Install/Update Linux Kernel

Download and compile kernel

first, download kernel source, like kernel.***.src.rpm

after extract it, go to the /usr/src/linux***
make clean
make menuconfig
make dep
make bzImage
make modules
make modules_install
make install

yum update kernel

download from SRPMS
ftp://ftp.muug.mb.ca/pub/fedora/linux/core/5/source/SRPMS/kernel-2.6.15-1.2054_FC5.src.rpm

yum install kernel-source
yum update kernel-source

The perfect Husband

Several men are in the locker room of a golf club. A cell phone on a
bench rings and a man engages the hands free speaker-function and
begins
to talk.

Everyone else in the room stops to listen.

MAN: “Hello”

WOMAN: “Honey, it’s me. Are you at the club?”

MAN: “Yes”

WOMAN: “I am at the mall now and found this beautiful leather coat.
It’s only $1,000. Is it OK if I buy it?”

MAN: “Sure, ..go ahead if you like it that much.”

WOMAN: “I also stopped by the Mercedes dealership and saw the new 2006
models. I saw one I really liked”

MAN: “How much?”

WOMAN: “$90,000”

MAN: “OK, but for that price I want it with all the options.”

WOMAN: “Great! Oh, and one more thing … The house I wanted last year
is back on the market. They’re asking $950,000”

MAN: “Well, then go ahead and give them an offer of $900,000. They will
probably take it. If not, we can go the extra 50 thousand. If it’s
really a pretty good price.”

WOMAN: “OK. I’ll see you later! I love you so much!!”

MAN: “Bye! I love you, too.”

The man hangs up. The other men in the locker room are staring at him
in astonishment, mouths agape…..

He smiles and asks: “Anyone know who this phone belongs to?….”