Friday, September 29, 2006

How to edit /etc/fstab during startup

Two days ago, I made a mistake in /etc/fstab file on a server that has installed Fedora Core 4. This made the machine could not boot. The system asked me to log in as root. Then I had to correct /etc/fstab before rebooting the machine. But when I edited the file, It could not be saved because at that time it was a read-only file.

I searched for solutions of this problem. And I found that I had to remount the filesystem before editing the file. These are the commands:

#mount /proc
#mount -o remount /

Or remount all filesystem. Using these commands:

#umount -a
#mount -w -a

Then I could edit /etc/fstab :D

Friday, July 14, 2006

Theory of Relativity

The theory of relativity, or simply relativity, refers specifically to two theories: Albert Einstein's special relativity and general relativity. [1]

Special relativity
Albert Einstein's 1905 paper "On the Electrodynamics of Moving Bodies" introduced the special theory of relativity. Special relativity considers that observers in inertial reference frames, which are in uniform motion relative to one another, cannot perform any experiment to determine which one of them is "stationary". This is actually Galileo's principle of relativity; Einstein's contribution was to explicitly include electromagnetism within this principle, which required that the Galilean transformations be replaced by the Lorentz transformations. The resultant theory has many surprising consequences. In particular, it requires that the speed of light in a vacuum be the same for all these observers, regardless of their motion, or the motion of the source of the light, since the invariance of the speed of light is a consequence of Maxwell's equations of electromagnetism. [1]

Einstein's theory of special relativity results from two statements [4]:

1. The speed of light is the same for all observers, no matter what their relative speeds.

The first postulate -- the speed of light will be seen to be the same relative to any observer, independent of the motion of the observer -- is the crucial idea that led Einstein to formulate his theory. It means we can define a quantity c, the speed of light, which is a fundamental constant of nature.

2.The laws of physics are the same in any inertial (that is, non-accelerated) frame of reference. This means that the laws of physics observed by a hypothetical observer traveling with a relativistic particle must be the same as those observed by an observer who is stationary in the laboratory.

This second postulate is really a basic though unspoken assumption in all of science -- the idea that we can formulate rules of nature which do not depend on our particular observing situation. This does not mean that things behave in the same way on the earth and in space, e.g. an observer at the surface of the earth is affected by the earth's gravity, but it does mean that the effect of a force on an object is the same independent of what causes the force and also of where the object is or what its speed is.

General relativity
General relativity was developed by Einstein in the years 1907 - 1915. General relativity replaces the global Lorentz symmetry of special relativity with a local Lorentz symmetry in the presence of matter. The presence of matter "curves" spacetime, and this curvature affects the path of free particles (and even the path of light). General relativity uses the mathematics of differential geometry and tensors in order to describe gravitation as an effect of the geometry of spacetime. This theory is based on the general principle of relativity, which requires all observers to experience the same laws of physics, not just those moving with uniform speed, hence its name. [1]

[1] http://en.wikipedia.org/wiki/Theory_of_relativity
[2] http://en.wikipedia.org/wiki/Special_theory_of_relativity
[3] http://en.wikipedia.org/wiki/General_relativity
[4] http://www2.slac.stanford.edu/vvc/theory/relativity.html

Monday, May 15, 2006

Thai Windows XP's files on FreeBSD

I have installed FreeBSD 6.1 and Windows XP in the same harddrive and I tried to mount the drive that Windows is installed. But there was a problem with the files that named with Thai.

So I have got some suggestion from my friend, Gapy. He told me to use "thailocale" package. Therefore, I can mount the drive by this command

#mount_msdosfs -L th_TH.TIS-620 /dev/ad0sX /mnt/XXXX

But it still had a little problem. The drive could not be mounted without exporting path from "/usr/local/share/locale/", Then I have got another suggestion from this webboard. Khun j_piriya suggested that I should create a new file in "/usr/local/etc/rc.d/", such as "mount_window.sh" and then add these line in the file

#!/bin/sh
export PATH_LOCALE=/usr/local/share/locale/
mount_msdosfs -L th_TH.TIS-620 /dev/ad0sX /mnt/XXXX

Then change the file to be executable.

Thank you very much, Gapy and Khun j_piriya ;)

Saturday, May 13, 2006

Thai Language in GNOME 2.12

I use FreeBSD with GNOME desktop environment. Yesterday I tried to install FreeBSD 6.1 and also GNOME 2.12. But I found the problem about switching between English and Thai languages. I could not find the "Keyboard Layouts Switcher".

Now I know that I can be set with Xorg configuration. After choosing keyboard type and layout it will ask "Do you want to select additional XKB options (group switcher, group indicator, etc.)?" Answer "y" to select the key for changing group of language.

Then login to GNOME desktop and add "Keyboard Indicator" to panel. In "Layouts" tab, add Thailand.

Thank you Gapy for suggestion.
But now I have a new problem... I cannot read files that named with Thai :(

Thursday, March 30, 2006

New Zealand - Mar 20-26, 2006

I, my sister and also my dad went to visit my aunts and uncle in New Zealand, last week (Mar 20 - 26).
We were arrived Auckland On Tuesday, 21st.
In the first and second day We stayed with my uncle's family.
Then, we joined the local tour to travel to Rotorua and Taopu in two days later.
On Saturday, my uncle guided us to the Bay of Islands to see wild dolphins. (We had a bad luck. We could not find any whales.)

Let's see the pictures and video clips here.

Monday, February 20, 2006

Snake!! Snake!! Snake!!

This was happened in the afternoon of the last Saturday...

First, I have to let you know that my new home has a little pond for raising some craps and 4 or 5 meters from the pond is my house.

At that time, as I was raising the carps, I heard some noise. At first I thought it was a dog but when I turned to see...It was a snake!!!

This snake is about 1 to 1.5 meters long, dark gray and I saw some white on its nack. I don't know what kind of it and I don't know weather it has poison. Moreover, I saw it was gulping a prey!!!

I don't know what was that prey because I couldn't see it clearly. I think it may be a little bird or a tree shrew.

This makes me so excited. It's a scene of life that I have only seen on TV or in a zoo. But this was happened in my house!

I waited and saw the snake gulped its prey quitely. When it finished its lunch it quickly crawled into a hole under my house. - -'

Thursday, February 16, 2006

I'm still Alive

Nothing much.
I'm just so busy because I'm writing my thesis and gonna have an exam. :(
So, Fight! Fight! Fight!!

Monday, January 02, 2006

Narnia...Narnia...

The Chronicles of Narnia: The Lion, the Witch and the wardrobe,
I have not read the story but I just watched it yesterday.

I like Lucy... She is very nice, innocent and good girl. ^^

I like Edmund... He has his own idea and do anything up to his thought. So he looks so contumacious. But he has responsibility to the things he had done. As at last, he still disobeyed his brother's command because he tried to save him.

I like Susan... She is pretty. She is a girl that gonna be a woman. So she does not have an imagination like when she was young. But I think she still have it because she finally defered to her little sister.

I like Peter... He is a very nice and very kind brother. He really love his brother and sisters, though he so stricts with Edmund. I think that because he love his brother but his brother is really contumacious.

I like Aslan... He is so dignified. I want to hold him in my arms. ^^

I like the white witch... She looks so cold. No comment...

I like all animals in this story. Of course, including those from fairy tale. ^^