设为首页 收藏本站
查看: 1257|回复: 0

[经验分享] colinux

[复制链接]

尚未签到

发表于 2018-5-15 08:12:21 | 显示全部楼层 |阅读模式
colinux中安装debian
(0) 下载文件
colinux-0.7.8
http://www.colinux.org/
(http://nchc.dl.sourceforge.net/project/colinux/Snapshots/devel-20100702-Snapshot/devel-coLinux-20100702.exe)
注意安装colinux过程中不必下载root文件。

debian-504-i386-businesscard.iso
(http://cdimage.debian.org/debian-cd/5.0.5/i386/iso-cd/debian-505-i386-CD-1.iso)

(1)制作空白文件:root-fs盘和swap-fs盘
fsutil file createnew debian.fs 8589934592 //8G
fsutil file createnew swap.fs 268435456
为了节省磁盘空间,我们可以使用sparse文件。
运行这样的命令:
fsutil sparse setflag debian.fs //将文件标记为sparse文件
fsutil sparse setrange debian.fs 1024 8589933568 //1024+858993356= 8589934592明白吗?
同样的命令来处理swap.fs即可。
fsutil file createnew debian.fs 4294967296
fsutil file createnew swap.fs 268435456
fsutil sparse setflag debian.fs
fsutil sparse setflag swap.fs
fsutil sparse setrange debian.fs 1024 4294966272
fsutil sparse setrange swap.fs 1024 268434432
可以将上述命令存为批处理运行。可建立4G的硬盘镜像。 NTFS分区

(2)准备开机
(2.0)获得debian安装盘iso文件。
(2.1)从iso文件提取initrd.gz,和两个img文件以及conf文件放在一起
(2.2)创建conf文件,其中引用initrd.gz和两个img文件
整个conf文件像这样(debian.conf):

# The default kernel
kernel=vmlinux

# File contains the root file system.
# Download and extract preconfigured file from SF "Images for 2.6".
cobd0="f:/debian/debian.fs"

# Swap device, should be an empty file with 128..512MB.
cobd1="F:/debian/swap.fs"
cobd2="F:/debian/debian-504-i386-businesscard.iso"

# Tell kernel the name of root device (mostly /dev/cobd0,
# /dev/cobd/0 on Gentoo)
# This parameter will be forward to Linux kernel.
#root=/dev/cobd0 //这个地方貌似必须注释掉??

# Additional kernel parameters (ro = rootfs mount read only)
ro

# Initrd installs modules into the root file system.
# Need only on first boot.
initrd="f:/debian/linux/initrd.gz"

# Maximal memory for linux guest
mem=256

eth0=slirp
(2.3)开机conf文件,安装debian ,可以写成一个bat批处理
colinux-daemon.exe @debian.conf
(3)安装过程
(3.1)安装过程中当它抱怨没有光盘时,请手工指定"/dev/cobd2"。注意选择无module仍继续。
(3.2)安装过程中当准备磁盘/分区问题时,先如下手工操作:
使用第二个虚拟控制台: (ALT+F2)
mke2fs /dev/cobd0
mkdir /target
mount /dev/cobd0 /target
mkswap /dev/cobd1
swapon /dev/cobd1
ALT+F1 切换到刚刚的控制台
然后选择<Go Back>,再仍选择分区操作,指定cobd0为/且ext3格式,cobd1为swap。

(3.3)安装GRUB
安装GRUB会失败,但是其实不需要osloader,因为colinux启动时并不是从root盘上读kernel。
可以reboot了。
(4)下次开机
下次开机之前修改conf文件到正常,比如如下。
# The default kernel
kernel=vmlinux

# File contains the root file system.
# Download and extract preconfigured file from SF "Images for 2.6".
cobd0="f:/debian/debian.fs"

# Swap device, should be an empty file with 128..512MB.
cobd1="F:/debian/swap.fs"
#cobd2="F:/debian/debian-504-i386-businesscard.iso"

# Tell kernel the name of root device (mostly /dev/cobd0,
# /dev/cobd/0 on Gentoo)
# This parameter will be forward to Linux kernel.
root=/dev/cobd0

# Additional kernel parameters (ro = rootfs mount read only)
ro

# Initrd installs modules into the root file system.
# Need only on first boot.

initrd="f:/coLinux/initrd.gz" //这里要换成colinux默认的引导文件。第一次重启之后,把该行注释掉。只有安装后的第一次启动是需要它来引导的。
# Maximal memory for linux guest
mem=256

eth0=slirp

如果需要上网,则需要使用winpcap包
(http://www.winpcap.org/install/bin/WinPcap_4_1_2.exe)






进入系统后更新安装源

cd /etc/apt
cp source.list source.list.bak
vi  source.list

deb http://debian.anheng.com.cn/debian etch main non-free contrib
deb-src http://debian.anheng.com.cn/debian etch main non-free contrib
deb ftp://debian.anheng.com.cn/debian etch main non-free contrib
deb-src ftp://debian.anheng.com.cn/debian etch main non-free contrib
deb http://debian.cn99.com/debian/ testing main non-free contrib
deb-src http://debian.cn99.com/debian/ testing main non-free contrib

#deb http://debian.cn99.com/debian/ sid main non-free contrib
#deb-src http://debian.cn99.com/debian/ sid main non-free contrib

deb http://debian.cn99.com/debian-non-US testing/non-US main non-free contrib
deb-src http://debian.cn99.com/debian-non-US testing/non-US main non-free contrib

deb http://debian.ustc.edu.cn/debian testing main non-free contrib
deb-src http://debian.ustc.edu.cn/debian testing main non-free contrib

deb http://debian.ustc.edu.cn/debian-non-US testing/non-US main non-free contrib
deb-src http://debian.ustc.edu.cn/debian-non-US testing/non-US main non-free contrib

deb http://debian.ustc.edu.cn/debian-security testing/updates main
#deb http://debian.cn99.com/debian/ testing main
#deb-src http://debian.cn99.com/debian/ testing main



By the way, 常用的apt命令:

apt-cache search package 搜索包
apt-cache show package 获取包的相关信息,如说明、大小、版本等
sudo apt-get install package 安装包
sudo apt-get install package - - reinstall 重新安装包
sudo apt-get -f install 修复安装"-f = --fix-missing"
sudo apt-get remove package 删除包
sudo apt-get remove package - - purge 删除包,包括删除配置文件等
sudo apt-get update 更新源
sudo apt-get upgrade 更新已安装的包
sudo apt-get dist-upgrade 升级系统
sudo apt-get dselect-upgrade 使用 dselect 升级
apt-cache depends package 了解使用依赖
apt-cache rdepends package 是查看该包被哪些包依赖
sudo apt-get build-dep package 安装相关的编译环境
apt-get source package 下载该包的源代码
sudo apt-get clean && sudo apt-get autoclean 清理无用的包
sudo apt-get check 检查是否有损坏的依赖







colinux下访问windows分区
编辑下载的linux镜像文件批处理文件,以Fodera9为例,编辑 文件 start-Fedora-9.bat
colinux-daemon.exe kernel=vmlinux initrd=initrd.gz mem=512 cobd0="d:/Program Files/coLinux/Fedora-

9.img" cobd1="d:/Program Files/coLinux/swap.img" cofs0=c:/ cofs1=d:/ cofs2=e:/ cofs3=f:/
root=/dev/cobd0 eth0=slirp,,tcp:5901:5900 ro
cofs0=c:/ cofs1=d:/ cofs2=e:/ cofs3=f:/
我有四个分区,紫色men=512,我把内存分配改为512M,视自己机器配置,默认是256M

运行start-Fedora-9.bat
登录后,运行以下指令

mkdir /mnt/winC  
mount -t cofs 0 /mnt/winC
这样便加载了C盘到/mnt/winC目录下同样可以加载D-F盘,需要注意,mount -t cofs 后参数需要与批处理文件里一


具体信息详见colinux目录下文件cofs.txt





colinux如何挂载一个新的linux分区
现成的EXT3FS文件系统
http://gniarf.nerim.net/colinux/fs/

preformatted images of ext3fs partitions of specific sizes to use as block devices for coLinux.
sizes are in Mb.
to use, uncompress with bunzip2, then add a line to default.colinux.xml :
<block_device index="2" path="/DosDevices/c:/colinux/fs_2048Mb" enabled="true"></block_device>
and a line to your /etc/fstab file : /dev/cobd2 /mnt ext3 defaults 0 0
please feel free to redistribute these files.
*IMPORTANT* the file 10g-ext3.bz2 can only be used under NTFS, not FAT32.
=====================================
交换分区
big files of specific sizes to use as swap block devices for coLinux.

sizes are in Mb.
you still have to edit /etc/fstab and add a line similar to :

/dev/cobd1 swap swap defaults 0 0
for a block_device declared as :
<block_device index="1" path="/DosDevices/c:/swap/blank_64Mb" enabled="true"></block_device>
you don't have to type mkswap /dev/cobd1 since it's already done.

(use your favorite winzip clone or bunzip2 from Cygwin or somewhere else :
http://gnuwin32.sourceforge.net/packages/bzip2.htm

don't complain too much about .bz2 files since Root Filesystem
Images for coLinux (Debian, Gentoo) are provided as .bz2 files too.)

please feel free to redistribute these files.
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-460226-1-1.html 上篇帖子: debian6配置mysql允许远程连接的方法(图) 下篇帖子: Debian上Crontab的使用
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表