วิธีติดตั้ง Linux ใน Windows ด้วย coLinux
1.อันดับแรกก็ Download สิ่งที่จำเป็นสำหรับใช้งาน coLinux
Cooperative Linux is the first method for optimally running Linux on Windows and other operating systems natively. It is a port of the Linux kernel and support code that allows it to run cooperatively without emulation along with another operating system
โดย download ได้จาก sourceforge ซึ่งต้องใช้ 2 ตัว คือ
- ตัวโปรแกรม coLinux คือ coLinux-stable ของผมเลือกรุ่น 0.7.3-linux-2.6.22.18 (coLinux-0.7.3.exe)
- Image ของ Linux ผมลอง 2 ตัว คือ
* Images 2.6.x Debian รุ่น Debian 4.0 Etch (Debian-4.0r0-etch.ext3.1gb.bz2)
* Images 2.6.x Ubuntu เป็น Ubuntu 7.10 (Ubuntu-7.10.ext3.2GB.7z)
พอ Download เสร็จก็แตกไฟล์ด้วย 7-Zip จะได้ไฟล์ขนาด 1GB สำหรับ Debian และ 2GB สำหรับ Ubuntu
2.ต่อไปก็ติดตั้ง coLinux ซึ่งวิธีการก็ไม่ยาก คลิก Next ไปเรื่อย ๆ หน้าที่เลือก Component ก็เลือกไปทั้งหมดเลย
ส่วนตำแหน่งที่จะติดตั้ง เค้าแนะนำให้ติดตั้งที่ C:\coLinux
ระหว่างติดตั้งก็จะบอกให้ติดตั้ง WinPcap ด้วย ก็ download มาติดตั้งซะ
WinPcap: The Windows Packet Capture Library
WinPcap is the industry-standard tool for link-layer network access in Windows environments: it allows applications to capture and transmit network packets bypassing the protocol stack, and has additional useful features, including kernel-level packet filtering, a network statistics engine and support for remote packet capture.
WinPcap consists of a driver, that extends the operating system to provide low-level network access, and a library that is used to easily access the low-level network layers. This library also contains the Windows version of the well known libpcap Unix API.
ส่วนหน้าที่จะให้ Download root file system image ก็ไม่ต้อง เพราะเรา download มาแล้ว
3.พอติดตั้งเสร็จก็เอา Image ของ Linux ที่แตกไฟล์ออกมาแล้วไปไว้ใน C:\coLinux แล้วก็ copy ไฟล์ example.conf มาเปลี่ยนชื่อเป็น debian4.conf แล้วก็เปิดไฟล์ขึ้นมาแก้ไข
เริ่มจาก debian4.conf
kernel=vmlinux
cobd0=”c:\coLinux\Debian-4.0r0-etch.ext3.1gb”
root=/dev/cobd0
ro
initrd=initrd.gz
eth0=slirp
แล้วก็ลอง boot ดู โดยเรียกคำสั่งจาก cmd
c:\coLinux> colinux-daemon.exe @debian4.conf
ได้ผลดังรูปครับ

ลอง login ด้วย username = root และ password = root
ลองคำสั่ง uname -a

แล้วก็พิมพ์คำสั่ง ifconfig

จะเห็นว่า eth0 ได้ IP เป็น 10.0.2.15 เปิดดูไฟล์ /etc/network/interfaces ก็จะเห็นเพิ่มเติมว่า
ipaddress 10.0.2.15
broadcast 10.0.2.255
netmask 255.255.255.0
gateway 10.0.2.2
ลอง ping ดูเครื่อง localhost

ทดลองใช้คำสั่ง apt-get update ดู ปรากฏว่าออก internet ได้ด้วย

ออกจากโปรแกรมด้วยคำสั่ง halt แล้วไปลอง Ubuntu กันบ้าง
4.สำหรับ Ubuntu ก็ copy ไฟล์มา แต่คราวนี้เปลี่ยนชื่อเป็น ubuntu7.10.conf โดยใส่เนื้อหาตามนี้
kernel=vmlinux
cobd0=”c:\coLinux\Ubuntu-7.10.ext3.2gb.fs”
cobd1=”c:\coLinux\swap128.fs”
root=/dev/cobd0
ro
initrd=initrd.gz
eth0=slirp
สังเกตว่าจะมีเพิ่ม swap file เข้ามาด้วย
c:\coLinux> colinux-daemon.exe @ubuntu7.10.conf
แล้วก็ลองเหมือนที่ทำกับ debian พบว่าเหมือนกันเลย ยกเว้น uname -a (ซึ่งมันต้องเป็นอย่างนั้นอยู่แหล่ะ
)

5.ปิดท้ายด้วยเทคนิคเล็ก ๆ เอาไว้เรียกใช้ให้สะดวก คือ
สร้าง Shortcut ไว้ที่ Desktop โดยตั้งชื่อไว้เป็น Debian4 กับ Ubuntu 7.10
แล้วก็เปิด Properties ของแต่ละตัว โดยกำหนด Start in เป็น C:\coLinux แล้วก็ พิมพ์ “@ชื่อไฟล์ config” ต่อท้ายในช่อง Target
เช่น C:\coLinux\colinux-daemon.exe “@ubuntu7.10.conf” สำหรับ Ubuntu
และ C:\coLinux\colinux-daemon.exe “@debian4.conf” สำหรับ Debian4
เวลาจะใช้งานก็ double click เรียกใช้ได้เลย สะดวกดีครับ

Written by admin on November 17th, 2008 with 1 comment.
Read more articles on Ubuntu.
อยากใช้ Linux (Ubuntu) แต่เสียดาย Windows
เรื่องนี้คงเป็นเรื่องที่หลายคนสนใจ แล้วใช้ทางเลือกต่าง ๆ เหล่านี้
1.ใช้ Windows แล้วติดตั้ง Ubuntu ใน VMware หรือไม่ก็ VirtualBox
2.ใช้ Ubuntu แล้วติดตั้ง Windows ใน VirtualBox (VMware ใน Ubuntu มีมั้ยน้อ)
3.ติดตั้ง Ubuntu แล้ว Remote เข้าไปใช้ Windows
4.ติดตั้ง Ubuntu แล้ว CygWin หรือไม่ก็ coLinux
CygWin is a Linux-like environment for Windows. It consists of two parts:
* A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
* A collection of tools which provide Linux look and feel.
Cooperative Linux (short-named coLinux) is a port of the Linux kernel that allows it to run cooperatively alongside another operating system on a single machine.
- วิธีติดตั้งและใช้งาน coLinux
Written by admin on November 17th, 2008 with no comments.
Read more articles on Ubuntu.
รวบรวม Text Editor สำหรับ Windows มาให้ใช้กันแบบฟรี ๆ ครับ เป็นทางเลือกนอกเหนือจาก EditPlus
1.TinyEdit ตัวนี้ Tiny สมชื่อครับ เล็กจริง ๆ ไฟล์เดียว Double Click ก็ใช้ได้เลย

Features
* Powerful and easy to use
* Syntax highlighting for more than 26 scripts
* Multiple document interface
* Unlimited undo/redo capability
* Text can be automatically word-wrapped
* Line number, Powerful search and replace
* Only one executable file (no need install)
* Freeware for both personal and commercial use
Supported Syntax Highlighting:
* PHP
* CSS
* HTML
* Java
* Java Script
* VB Script
* XML
* Perl
* Python
* Ruby
* C#
* SQL
* Tcl/Tk
* GW-TEL Scripts
* UNIX Shell Scripts
* Semanta DD
* Standard ML
* Vrml97/X3D
* AWK Scripts
* MS-DOS Batch
* C/C++
* COBOL
* Visual Basic
* Pascal
* Modula-3
* Fortran
2.RJ TextEd ตัวนี้ต้องใช้ .NET ครับ Function เยอะ แต่ผมว่าทำงานช้าไปนิดนึง

Features
* Auto completion.
* Code folding.
* Column mode.
* Handles both ASCII and binary files.
* Html wizards.
* Use TopStyle Lite as your CSS editor if installed.
* FTP client with synchronization.
* File explorer, text clips, code explorer, project manager…
* Convert between code pages, Unicode formats and text formats.
* Unicode and ANSI code page detection.
* Open/Save UTF-8 encoded files without a signature (BOM).
* Unicode file paths and file names.
* Html validation, format and repair.
* Tools available like syntax editor, color picker, charmap…
3.NOTEPAD++ อีกตัวที่น่าสนใจครับ ชื่อมี ++ ก็เพราะพัฒนามาจาก C++ ครับ

Features
* Syntax Highlighting and Syntax Folding
* WYSIWYG
* User Defined Syntax Highlighting
* Auto-completion
* Multi-Document
* Multi-View
* Regular Expression Search/Replace supported
* Full Drag ‘N’ Drop supported
* Dynamic position of Views
* File Status Auto-detection
* Zoom in and zoom out
* Multi-Language environment supported
* Bookmark
* Brace and Indent guideline Highlighting
* Macro recording and playback
4.PlainEdit Text Editor สัญชาติ เยอรมัน ครับ

Features:
* Various functions to convert text
* Easily switch between ANSI (Windows) and ASCII (DOS)
* Syntax highlighting for the most popular Web, scripting and programming languages
* Automatic replacement of special characters in the corresponding HTML coding
* Finding a Incremental text (forward and backward)
* Customizable templates enable the rapid creation of files
* Page Setup (margins, headers and footers), and a print preview
* Insert document templates and content templates
* PlainEdit can be extended with plugins
5.Notepad2 Icon ของเค้าเหมือน NotePad ของ Windows เลย แล้วก็เป็นไฟล์เดียวโดด ๆ ใช้งานได้เลย

Features
* Syntax highlighting: HTML, XML, PHP, ASP (JS, VBS), CSS, JavaScript, VBScript, C/C++, C#, Resource Script, Makefiles, Java, Visual Basic, Pascal, Assembly, SQL, Perl, Python, Configuration Files, Apache Config Files, Batch Files, Diff Files
* Drag & drop text editing inside and outside Notepad2
* Basic regular expression search and replace
* Useful word, line and block editing shortcuts
* Rectangular selection (Alt+Mouse)
* Brace matching, auto indent, long line marker, zoom functions
* Support for Unicode, UTF-8, Unix and Mac text files
* Open shell links
* Mostly adjustable
เป็นตัวสุดท้ายเลยมีเทคนิคมาฝากซะหน่อย คือ ชื่อกับ Icon ก็คล้ายกันอยู่แล้ว หนำซ้ำยังเป็นไฟล์เดียวโดด ๆ งั้นก็ใช้แทน NotePad ของ Windows ซะเลย
ว่าแล้วก็ Rename เอา 2 ออกกลายเป็น Notepad.exe แล้วก็เอาไปวางทับใน C:\Windows
เท่านี้ก็สำเร็จ แต่ได้แค่เดี๋ยวเดียว เพราะ Windows จะเอาไฟล์ Notepad.exe เดิมมาทับ จะทำกี่ครั้งก็เหมือนเดิม
สืบค้นดูทำให้ได้รู้ว่า
“Windows จะมีรายชื่อไฟล์ที่สงวนไว้เป็นของตัวเองอยู่ หากมีการเปลี่ยนแปลงก็จะพยายามดึงจาก Cache หรือจากแผ่นติดตั้งกลับมาเสมอ”
อ้อ ดึงมาจาก Cache งั้นก็เอาเข้าไปทับใน Cache ซะด้วยสิ ก็พอรู้อยู่แล้วว่า Cache มันอยู่ที่ C:\WINDOWS\System32\dllcache
ปรากฎว่าลองแล้ว ก็ไม่สำเร็จครับท่าน มันยังกลับมาได้
สืบค้นต่อไปถึงได้รู้ว่า มันมีอยู่หลายที่ ตามนี้ครับ
* C:\WINDOWS\System32\dllcache
* C:\WINDOWS\ServicePackFiles\i386
* C:\WINDOWS\System32
* C:\WINDOWS
ก็เลยต้อง copy ไปทับให้ครบ
แต่ถ้าทำมือจะไม่สำเร็จครับ เพราะระหว่างที่ copy ไปทับอันนึง อันอื่น ๆ ก็จะเอากลับแทนซะก่อน หรือว่าผมทำช้าก็ไม่รู้ ถ้าใครทำมือเองได้ก็แจ้งให้ทราบด้วยนะครับ
ก็เลยต้องสร้าง Batch File ไว้ช่วยงาน ตามนี้ครับ
copy /-y notepad.exe C:\WINDOWS\System32\dllcache
copy /-y notepad.exe C:\WINDOWS\ServicePackFiles\i386
copy /-y notepad.exe C:\WINDOWS\System32
copy /-y notepad.exe C:\WINDOWS
Written by admin on November 17th, 2008 with no comments.
Read more articles on Software.