Sunday, July 18, 2010

MeeGo!

I don't want to use my laptop provided by the company any more: 1) it's 4 years old. 2) overheating problem. I decided to buy a device with my own money. I don't want to invest much because any computer becomes out of dated very soon. The requirement are: light, fast to start, energy efficient. iPad is not my choice because I need do some coding occasionally.

Finally I chose a netbook ViewSonic VNB 102p, it is based on Intel N450 Atom platform, the price is reasonable (less than RMB2000). I evaluated several OSes and installed MeeGo and Ubuntu Remix 10.04, these are designed for netbooks. Amazingly, all devices work out of box on these 2 OSes.

When I started to use this new netbook, I found I spent more time on MeeGo than Ubuntu. It might be because everything is fine on Ubuntu but I need some time to make some applications work on Meego. And Meego looks more simple, faster to start. I installed and customized thunderbird (for mail), openoffice 3.2.1 and skype (for voice chat), compiled Shrew (for VPN) and Shotwell 0.6.1 (for managing photos and online albums). Now I have used it for one month and this netbook can meet my demands for daily use.

Thursday, June 17, 2010

Why flying east takes shorter time

I'm not a frequent traveler. Some years ago I found flying from west of U.S to east U.S. took 1 hour less time than return trip, I didn't find answer at that time. Recently I decided to investigate this by the help of google search.

The answer is simple: WIND . But wait, why do most people in the world find flying east takes shorter time, does the wind over Earth surface always flies east? Then I studied some flights schedule around the equator such as Singapore to Tokyo and some flights in South America, there's no significant difference in flying time between goes and come-backs. After I read some articles, below factors should be considered:

- Wind and Earth Rotation or Prevailing Winds .  You know the directions of the winds in different areas of the world.

- The locations of most cities with flights. Open the world map, you can find the much more cities are located between lattitude 30 and 60, in this area, the direction of wind is from the west to the east.

- You should consider long distance flights (>3 hours), otherwise the airplane may not spend most of time at cruise speed, and many other factors (such as reserving time for air traffic control) can affect the flying time.

- Coriolis effect. Yes, it affects the direction of the wind and it also affects the trails of airplanes, i.e. when the airplane flies from low lattitude to high lattitude, the plane will be deflected to the east. However, Coriolis itself nearly does not affect the differences of flying time between goes and come-backs. For example, if you fly northwest from Singapore to North Eurpoe, the real flying distance may be longer than you imagine from the map, the return trip is also longer.

Am I right? I'm not 100% sure. I'm just trying to explain the reason :)

Thursday, May 13, 2010

10 years later, Beijing

It has been nearly 10 years since I moved away from Beijing. In end of April 2010,I took a vacation with my family in Beijing. A lot of changes took place in 10 years: more people, more subways, soaring house prices... We visited some famous places, the Square, the Great Wall, Beijing Zoo, etc. Nice feeling.I love vacations more and more...

Sunday, April 18, 2010

Strugling with the partition table

I hate to use MS Windows: 1) insecure 2) dog slow after patching for years. Recently I decided to try Solaris Express or the new OpenSolaris. The first step is to leave some space for Solaris partition, so I deleted a Windows partition.

Now the partition table looks like:

| Free (for solaris) | Ubuntu | Windows | extened partition including several ntfs and linux swap|

Unfortunately, after I installed the solaris, both the existing Windows and Ubuntu failed to boot. For Windows, the error message is: "Windows\System32\ntoskrnl.exe is missing", for Ubuntu, it jumped to grub command  directly.

I guess the reason was probably the partition number changed. I logged into Solaris, run format -> fdisk command, the result is below:

      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1                 Linux native   2551  5099    2549     21
          2                 IFS: NTFS      5100  7011    1912     16
          3                 EXT LBA      7012  12160    5149     42
          4       Active    Solaris2          1  2550    2550     21

then use ntfscat to show the content of boot.ini of Windows partition:

bash-4.0# ntfscat /dev/dsk/c1d0p2 boot.ini 
[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect
C:\Ubuntu81.img="Ubuntu 8.10"

You can see the partition number "1" is not correct since the Windows partition number has changed to "2". So to fix it: make a new boot.ini (also need unix2dos command to add "/r" for Windows), then overide it on Windows:
 ntfscp /dev/dsk/c1d0p2 ./newboot.ini boot.ini
Also, change the /rpool/boot/grub/menu.lst to correct the partition numbers to:
...
title Windows
        rootnoverify (hd0,1)
        chainloader +1
title Ubuntu8.1
        rootnoverify (hd0,0)
        chainloader +1
...

Reboot the system, I can start Windows normally.

Next, for Ubuntu problem, I need to get the content of Ubuntu grub menu.lst. Solaris currently does not have built-in supports for linux ext2/ext3 file system. I need to install some packages by following the guide, then, mount the Ubuntu partition:
mount -F ext2fs /dev/dsk/c1d0p1 /mnt
and got the content of Ubuntu grub menu.lst:

...
title           Ubuntu 8.10, kernel 2.6.27-14-generic
uuid            2786d26c-beb2-43e6-93a8-1cb3be921f23
kernel          /boot/vmlinuz-2.6.27-14-generic root=UUID=2786d26c-beb2-43e6-93a8-1cb3be921f23 ro quiet splash
initrd          /boot/initrd.img-2.6.27-14-generic
quiet
...


Reboot the system, select to boot Ubuntu in Solaris's grub menu, I was prompted to enter grub command. I tried to manually input: root (hd0,0) and the content of "Kernel....", "initrd....", then boot command, however, the system failed to boot up in the process.

So there must be somthing wrong with the Ubuntu's grub (My Ubuntu's grub was installed in Ubuntu's partition not the MBR), it seems I need to re-install the grub:
grub> root (hd0,0)
grub> install /boot/grub/stage1 (hd0,0) /boot/grub/stage2 p
grub> boot


O.K. The problem is resolved.

Lessons:
Don't delete a partition then create a new partition, it would possibly cause the partition numbers to change, making all things suck.

Saturday, April 3, 2010

Shanghai Flower Port

This spring comes so late. At China traditional QingMing holiday, my family went to Shanghai Flower Port. The park is famous for tulips and other flowers. It's located at faraway and seaside suburb of Shanghai, about 70km from downtown. The ticket price is RMB100, and free for little children. In this park, I can feel much fresher air and see beatuiful flowers.


For more photos, see here.