硬盘上安装了两个系统,一个是WindowsXP,一个是UBUNTU6.X, 要在两个系统上切换搞得很心烦,如果安装一个虚拟机N慢,而且有点隔鞋瘙痒的感觉,不爽!俺又想两个系统一起用,又想两个系统独立分开不同的分区,毕竟有时候俺还想要一个干净原始的linux操作系统,看到colinux可以解决我的问题!DO IT.
1 下载了devel-coLinux-20071105.exe
2 下载kernel 2.6.22的内核,编译安装进ubuntu
3 配置colinux的配置文件
如:
# coLinux configuration, created by colinux XML2CFG converter v0.1.0
# file: test.cfg
# Linux Kernel file
kernel=vmlinux
# Initrd file
initrd=initrd.gz
# Memory size for coLinux guest
mem=256
# Kernel bootparams
root=/dev/cobd4
# Block devices and image files
cobd3=/Device/Harddisk0/Partition2
cobd4=/Device/Harddisk0/Partition3
# Host filesystem devices
# Networking devices
4 将colinux安装目录下的vmlinux-modules.tar.gz,解压到 UBUNTU的 /lib/modules
5 在unbuntu创建linux设备
C:/coLinux>colinux-daemon.exe @test.cfg -v 3
Cooperative Linux Daemon, 0.8.0
Compiled on Nov 6 2007 00:05:36
using 'vmlinux' as kernel image
configuring 256 MB of virtual RAM
mapping cobd3 to /Device/Harddisk0/Partition2
mapping cobd4 to /Device/Harddisk0/Partition3
using 'initrd.gz' as initrd image
mapping cofs31 to /??/C:/coLinux
kernel boot parameters: 'root=/dev/cobd4'
PID: 2976
colinux: launching console
colinux: booting
Linux version 2.6.22-co-0.8.0 (hn@hn-dt) (gcc version 4.1.2) #1 PREEMPT Tue Nov 6 00:02:11 CET 2007
256MB LOWMEM available.
initrd enabled: start: 0xcff9a000 size: 0x00065881
Entering add_active_range(0, 0, 65536) 0 entries of 256 used
Zone PFN ranges:
DMA 0 -> 0
Normal 0 -> 65536
early_node_map[1] active PFN ranges
0: 0 -> 65536
On node 0 totalpages: 65536
DMA zone: 0 pages used for memmap
Normal zone: 512 pages used for memmap
Normal zone: 65024 pages, LIFO batch:15
Built 1 zonelists. Total pages: 65024
Kernel command line: root=/dev/cobd4
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Setting proxy interrupt vectors
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: colour CoCON 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 255488k/262144k available (1628k kernel code, 0k reserved, 595k data, 128k init, 0k highmem)
virtual kernel memory layout:
fixmap : 0xffffc000 - 0xfffff000 ( 12 kB)
vmalloc : 0xd0800000 - 0xffffa000 ( 759 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
.init : 0xc032e000 - 0xc034e000 ( 128 kB)
.data : 0xc02971f8 - 0xc032bfe4 ( 595 kB)
.text : 0xc0100000 - 0xc02971f8 (1628 kB)
Calibrating delay loop... 2778.72 BogoMIPS (lpj=13893632)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: bfebfbff 20000000 00000000 00000000 0000651d 00000000 00000001
monitor/mwait feature present.
using mwait in idle threads.
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: After all inits, caps: bfebf3ff 20000000 00000000 0000b180 0000651d 00000000 00000001
Compat vDSO mapped to ffffe000.
CPU: Intel(R) Pentium(R) 4 CPU 2.93GHz stepping 09
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 406k freed
cofuse init 0.1 (API version 2.2)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
cobd: loaded (max 32 devices)
loop: module loaded
conet: loaded (max 16 devices)
serio: cokbd at irq 1
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input0
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
kjournald starting. Commit interval 5 seconds
EXT3 FS on cobd4, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem).
Trying to move old root to /initrd ... okay
Freeing unused kernel memory: 128k freed
fuse init (API version 7.8)
Adding 1052248k swap on /dev/disk/by-uuid/115676b1-05b6-4edd-b898-8a5ef7653e9e. Priority:-1 extents:1 across:1052248k
NTFS driver 2.1.28 [Flags: R/O MODULE].
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
哦,启动了,爽。
1 下载了devel-coLinux-20071105.exe
2 下载kernel 2.6.22的内核,编译安装进ubuntu
3 配置colinux的配置文件
如:
# coLinux configuration, created by colinux XML2CFG converter v0.1.0
# file: test.cfg
# Linux Kernel file
kernel=vmlinux
# Initrd file
initrd=initrd.gz
# Memory size for coLinux guest
mem=256
# Kernel bootparams
root=/dev/cobd4
# Block devices and image files
cobd3=/Device/Harddisk0/Partition2
cobd4=/Device/Harddisk0/Partition3
# Host filesystem devices
# Networking devices
4 将colinux安装目录下的vmlinux-modules.tar.gz,解压到 UBUNTU的 /lib/modules
5 在unbuntu创建linux设备
for i in 0 1 2 3 4 5 6 76 boot colinux
do
mknod /dev/cobd$i b 117 $i
done
建好后要修改/etc/fstab文件,将文件中你的根分区和交换分区的行都拷贝到新行,将相应的had?换成codb?
C:/coLinux>colinux-daemon.exe @test.cfg -v 3
Cooperative Linux Daemon, 0.8.0
Compiled on Nov 6 2007 00:05:36
using 'vmlinux' as kernel image
configuring 256 MB of virtual RAM
mapping cobd3 to /Device/Harddisk0/Partition2
mapping cobd4 to /Device/Harddisk0/Partition3
using 'initrd.gz' as initrd image
mapping cofs31 to /??/C:/coLinux
kernel boot parameters: 'root=/dev/cobd4'
PID: 2976
colinux: launching console
colinux: booting
Linux version 2.6.22-co-0.8.0 (hn@hn-dt) (gcc version 4.1.2) #1 PREEMPT Tue Nov 6 00:02:11 CET 2007
256MB LOWMEM available.
initrd enabled: start: 0xcff9a000 size: 0x00065881
Entering add_active_range(0, 0, 65536) 0 entries of 256 used
Zone PFN ranges:
DMA 0 -> 0
Normal 0 -> 65536
early_node_map[1] active PFN ranges
0: 0 -> 65536
On node 0 totalpages: 65536
DMA zone: 0 pages used for memmap
Normal zone: 512 pages used for memmap
Normal zone: 65024 pages, LIFO batch:15
Built 1 zonelists. Total pages: 65024
Kernel command line: root=/dev/cobd4
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Setting proxy interrupt vectors
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: colour CoCON 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 255488k/262144k available (1628k kernel code, 0k reserved, 595k data, 128k init, 0k highmem)
virtual kernel memory layout:
fixmap : 0xffffc000 - 0xfffff000 ( 12 kB)
vmalloc : 0xd0800000 - 0xffffa000 ( 759 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
.init : 0xc032e000 - 0xc034e000 ( 128 kB)
.data : 0xc02971f8 - 0xc032bfe4 ( 595 kB)
.text : 0xc0100000 - 0xc02971f8 (1628 kB)
Calibrating delay loop... 2778.72 BogoMIPS (lpj=13893632)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: bfebfbff 20000000 00000000 00000000 0000651d 00000000 00000001
monitor/mwait feature present.
using mwait in idle threads.
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: After all inits, caps: bfebf3ff 20000000 00000000 0000b180 0000651d 00000000 00000001
Compat vDSO mapped to ffffe000.
CPU: Intel(R) Pentium(R) 4 CPU 2.93GHz stepping 09
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 406k freed
cofuse init 0.1 (API version 2.2)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
cobd: loaded (max 32 devices)
loop: module loaded
conet: loaded (max 16 devices)
serio: cokbd at irq 1
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input0
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
kjournald starting. Commit interval 5 seconds
EXT3 FS on cobd4, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem).
Trying to move old root to /initrd ... okay
Freeing unused kernel memory: 128k freed
fuse init (API version 7.8)
Adding 1052248k swap on /dev/disk/by-uuid/115676b1-05b6-4edd-b898-8a5ef7653e9e. Priority:-1 extents:1 across:1052248k
NTFS driver 2.1.28 [Flags: R/O MODULE].
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
哦,启动了,爽。