Linux (Ubuntu) in Windows #7 Qemu to coLinux

Convert Qemu Image to coLinux Image
อย่างที่บอกว่า Emu มันช้า อย่ากระนั้นเลย แปลงมันมาใช้กับ coLinux ดีกว่า
1.เริ่มด้วย cd เข้าไปหา directory ที่มี Image ของ Qemu จะใช้ Cygwin หรือติดตั้ง unxutils ก็สะดวกดี

unxutils : Some ports of common GNU utilities to native Win32. In this context, native means the executables do only depend on the Microsoft C-runtime (msvcrt.dll) and not an emulation layer like that provided by Cygwin tools.

แล้วก็แปลงไฟล์ด้วยคำสั่ง

dd if=qemu_ubuntu_4gb of=ubuntu_4gb.img bs=512 skip=63

ตามคำแนะนำของ coLinux

2.Copy ไฟล์ไปใช้กับ coLinux คราวนี้ใช้ D:\coLinux (เพราะ drive C ใกล้จะเต็มแล้ว 555)
แล้วก็สร้าง swap file สำหรับ coLinux ด้วยคำสั่ง

fsutil file createnew swap_512mb 536870912

แล้วก็ย้ายไปไว้ใน folder root_fs ทั้ง ubuntu_4gb.img และ swap_512mb

3.จากนั้นก็สร้างไฟล์ config สำหรับ coLinux (ubuntu8_10.conf)ดังนี้

kernel=vmlinux
initrd=initrd.gz (ใช้เฉพาะตอน boot ครั้งแรก)
mem=256
root=/dev/hda1 fastboot 5
hda1=\DosDevices\D:\coLinux\root_fs\ubuntu_3gb.img
hdb1=\DosDevices\D:\coLinux\root_fs\swap_512mb

แล้วก็สร้าง batch file สำหรับเรียกใช้ coLinux (coLinux.bat) ดังนี้

@echo off
colinux-daemon.exe –install-driver
colinux-daemon.exe @”ubuntu8.10.conf” -t nt
colinux-daemon.exe –remove-driver
pause

4.ลองเรียกใช้ batch file ก็จะได้ ubuntu 8.10 ใน text mode (เพราะ coLinux แสดงผล X Application เองไม่ได้)

แต่ข้อดีของการแปลงมาจาก Qemu ก็คือ ตอนที่เราติดตั้งมันมีพวก Desktop Manager อยู่แล้ว แค่ coLinux มันแสดงผลไม่ได้เท่านั้นเอง

วิธีการแรกก็คือ ติดตั้ง VNC Server ไว้ แล้ว remote เข้าไปใช้ ตัวอย่าง ผมใช้ TightVNC

sudo apt-get install tightvncserver

ติดตั้งเสร็จ ก็ run Server ไว้แล้ว remote เข้าไปด้วย IP ของ coLinux:1 เช่น 192.168.0.2:1 ได้ผลดังรูป

อีกวิธีก็คือ ใช้ FreeNX ตามที่เคยบอกไว้แล้วใน Remote control Ubuntu from Windows

Written by admin on November 24th, 2008 with no comments.
Read more articles on Ubuntu.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:

You have to be identified to write a comment.