首 页 网站运营 网络编程 网页制作 图象媒体 数据库 建站资源 网管专区 下载专区 最新资讯
IT学堂|红色黑客联盟
设为首页
加入收藏
联系站长
您所在的位置:首页>网管专区>网络组建>文章内容
重新编译monowall扩大monowall分区容量
来源: 作者: 发布时间:2007-04-11

问题提出:最近在使用monowall的captiveportal功能时,经常出现以下提示:(null) 503 Server temporarily overloaded Date: Thu, 08 Sep 2005 08:20:45 GMT Cache-Control: no-cache,no-store Content-Type: text/html; charset=%s Cache-Control: max-age=0 Expires: Thu, 08 Sep 2005 08:20:45 GMT Connection: close
503 Server temporarily overloaded
The server cannot process the request due to a high load  
问题原因不明,开始怀疑是64M内存太少,加大内存至128M,情况依旧。用http://monowallIP/status.php#df查看monowall分区的大小,如下面所示:
/filesystem   512-blocks  used  avail  capacity  mounted on
/dev/md0c     21578    20180 1578  93%    /
/dev/ad0a     11838    11180  658  94%    /cf
procfs          8              8       0     100%  /proc

怀疑因为分区太小,导致临时文件容量不够,出现系统过载。于是,设法增加monowall分区容量。
步骤:以下方法在VM虚拟机,安装freeBSD-4.11环境下,通过
安装好freeBSD,开通FTP,设IP为192.168.1.98
下载generic-pc-1.2b10.img
Windows下,通过ftp://192.168.1.98,用user(假设freeBSD里有个user用户)登录,上传generic-pc-1.2b10.img到freeBSD,并改名为generic-pc-1.2b10.img.gz
解包镜像文件(generic-pc-1.2b10.img):
        gunzip generic-pc-1.2b10.img.gz
        vnconfig –s labels –c vn0 generic-pc-1.2b10.img
        mount /dev/vn0a /mnt
        mkdir source  (当前目录/home/user)
        cd source
        cp –Rp /mnt/* .
此时source目录下有以下文件
boot  conf   kernel.gz   mfsroot.gz
        umount /mnt
        vnconfig –u vn0

解包镜像文件(mfsroot.gz):
        mkdir root
        cd root
        gunzip mfsroot.gz
        vnconfig –s labels –c vn0 mfsroot
        mount /dev/vn0c /mnt
        cp –Rp /mnt/* .
        cd ..

  重新封包mfsroot.gz,增大分区容量:
        dd if=/dev/zero of=root.bin bs=1k count=20480
        vnconfig –s labels –c vn0 root.bin
        disklabel -rw vn0 auto
        newfs -b 8192 -f 2048 /dev/vn0c
        mount /dev/vn0c /mnt
        cd root
        cp –Rp * /mnt
        umount /mnt
        vnconfig –u
        gzip -9 root.bin
        mv mfsroot.gz mfsroot2.gz
        mv root.bin.gz mfsroot.gz

重新封包generic-pc.img,增大分区容量:
编辑lables.proto文件,包含以下内容:
# /dev/vn0c:
type: unknown
disk: amnesiac
label:
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 10
sectors/unit: 20480
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:    20480        0    4.2BSD     2048  8192    26   # (Cyl.    0 - 4)
  c:    20480        0    unused        0     0         # (Cyl.    0 - 4)

开始建立新的镜像文件,取名为image.bin
        dd if=/dev/zero of=image.bin bs=1k count=10240
        vnconfig –s labels –c vn0 image.bin
        disklabel –BR vn0 label.proto
        newfs –b 8192 –f 2048 vn0a
        mount /dev/vn0a /mnt
        cp -Rp boot /mnt
        cp -p mfsroot.bin kernel.gz /mnt
        cp -Rp conf /mnt
        umount /mnt
        vnconfig -u vn0
        gzip -9 image.bin
        mv image.bin.gz generic-pc-1.2new.img (用该新镜像文件升级或者重新写到硬盘或CF卡)

修改后结果:

/filesystem   512-blocks  used  avail  capacity  mounted on
/dev/md0c    40252 21324 15708  58%    /
/dev/ad0a     20092  11520  6968  62%    /cf
procfs          8              8       0     100%  /proc



[推荐] [返回顶部] [打印本页] [关闭窗口]
热点文章
·动态域名更新的实现方法
·site to site ipsec vpn
·hosspot设置说明
·设置ROUTEROS为透明桥接防火墙
·虚拟路由冗余协议 Virtual Router Red
·使用ROUTEROS建立PPPOE服务器
·如何在ROUTEOS中做IP转向
·ROS下实现数据镜像
·routeros和radius对接设置
·routeros端口映射内网无法访问自身公
相关文章
·用m0n0做软件路由
·如何使用OpenBSD3.2作ADSL路由
·win下的hotspot web界面认证登录网络
·FreeBSD+IPFILTER实现整网(N个Vlan)透
·Windows 2003作路由局域网共享上
·FreeBSD用IP Filter进行桥过滤
·Windows 2003路由设置
·用FreeBSD5.3建立安全网关,ADSL+Free
·代理软件强中强----WinRoute
·FreeBSD NAT 上接兩條 ADSL 若斷線時
文章检索
Google
相关文章
·用m0n0做软件路由
·如何使用OpenBSD3.2作AD
·win下的hotspot web界面
·FreeBSD+IPFILTER实现整
·Windows 2003作路由局域
·FreeBSD用IP Filter进行
·Windows 2003路由设置
·用FreeBSD5.3建立安全网
·代理软件强中强----WinR
·FreeBSD NAT 上接兩條 A
·使用HTun通过http代理服
·自行架設 FreeBSD 無線
·IGD的另一個選擇 MiniUP
·802.1x 認證 + 無線 AP
·PPPOE BRAS-1000接入系