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 เองไม่ได้)

Comments

Popular posts from this blog

Artillery Hornet + OctoPrint + Klipper

ย้ายบ้าน

ใต้ร่มกาสาวพัตร