FreeBSD 7.0 VMware Image Available [FreeBSD] -
[Freebsd VMware ZFS ]
2008-03-19
FreeBSD 7.0 发布了,最大的一个特性是增加了对 SUN 的 ZFS 文件系统的支持。Greg Larkin 为我们提供了一个 FreeBSD 7.0 的 VMware image,这样大家就可以无痛体验 FreeBSD 的新特性啦!!都来尝试一下吧!
VMware Image 文件下载地址:http://torrents.sourcehosting.net:10692/torrents/FreeBSD_7.0_VMware.zip.torrent?BA9886D479184512A1B428C3C25AB29FED632BAD
#####
# 原帖如下
##########################
Hi everyone,
Since FreeBSD 7.0 was recently released, I figured it’s a good time to put a VMware image together and have a look. Probably one of the most interesting new enhancements is the addition of the ZFS filesystem. I can’t wait to try that out, and it should make managing disk space a lot easier in the context of the SourceHosting.net service.
You can find the zipped image on the SourceHosting.net BitTorrent tracker. Some notes about the image:
- The VM has been configured with 768Mb of memory. You can reduce it to 512Mb, but the ZFS documentation says “Me want more memory!“
- The root password is “password”
- ZFS is enabled by default
- The /usr/ports filesystem is located in a ZFS pool
- The Ethernet interface is bridged to the host and uses DHCP
I tested this VM in VMware Server and VMware Player, and it seems to work fine. If you have any questions or problems, feel free to post comments here.
Keep in touch,
Greg
ZFS Best Practices Guide (ZFS 最佳实践指南) [FreeBSD] -
[ZFS Best Practices Guide FreeBSD ]
2008-03-17
FreeBSD IP 配置总结 [FreeBSD] -
[FreeBSD IP configure DHCP Manual ]
2008-03-07
#####
# 手工指定的方式
################################
# ipconfig fxp0 192.168.8.33/24 # 添加网卡ip
# route add default 192.168.8.1 # 添加路由(也可理解为网关)
立即生效,但是重启后失效。
如何重启后仍然保持呢?
# ee /etc/rc.conf
ifconfig_fxp0="inet 192.168.8.8 netmask 255.255.255.0 " # fxp0 网卡地址和子网掩码
defaultrouter="192.168.8.10" # 网关地址
hostname="study.nowire.com.cn" # 机器名
ifconfig_wi0="inet 192.168.8.55 netmask 255.255.255.0" # wi0 网卡地址,对应无线网卡
修改 /etc/rc.conf 配置之后可以通过如下方式生效:
第一种方法:# sh /etc/rc
第二种方法:# /etc/netstart
第三种方法:重启机器
#####
# DHCP 方式
################################
在 /etc/rc.conf 中添加:
ifconfig_fxp0="DHCP"
需要根据具体情况指定网卡名称。
修改 /etc/rc.conf 配置之后可以通过如下方式生效:
第一种方法:# sh /etc/rc
第二种方法:# /etc/netstart
第三种方法:重启机器
#####
# 关于 DNS 地址的配置
################################
# ee /etc/resolv.conf
nameserver 202.96.209.133
nameserver 202.96.209.5
#####
# 控制网卡的开关
################################
ifconfig fxp0 up
ifconfig fxp0 down
#####
# 路由方面的配置
################################
查看路由
netstat -rn
添加路由(相当于配置gateway)
route add default 192.168.8.1 # 192.168.8.1为网关地址
如果要修改当前路由配置,需要先删除,再新增一条,当然如果不是同名的,如不是default的可以直接添加
route delete default 192.168.8.1
route add default 192.168.8.10
#####
# DHCP release
################################
# dhclient -r Release the current lease and exit the client.
Here's a clip of dhclient from the FreeBSD man pages;
"The client normally doesn't release the current lease as it is not required by the DHCP protocol. Some cable ISPs require their clients to notify the server if they wish to release an assigned IP address. The -r flag explicitly releases the current lease, and once the lease has been released, the client exits."
If you are getting kill: xxxx: No such process This means the dhclient process was already stopped
#####
# 指定 interface 通过 dhcp 获取 IP
################################
# dhclient xl0 Starts the dhclient process for interface xl0
I think its a good idea to specify an interface Otherwise you may notice your /var/log/messages filling up with "dhclient: send_packet: Address family not supported by protocol family"
Here's a clip of dhclient from the FreeBSD man pages;
"If no interface names are specified on the command line dhclient will normally identify all network interfaces, elimininating non-broadcast interfaces if possible, and attempt to configure each interface."
#####
# 指定某个 interface 在通过 DHCP 获取不成功的时候,限定一个固定 IP
################################
方法:
在 /etc/dhclient.conf 中添加
alias {
interface "xl0";
fixed-address 192.168.42.40;
option subnet-mask 255.255.255.0;
}
举例:
# ee /etc/dhclient.conf
# $FreeBSD: src/etc/dhclient.conf,v 1.2.2.1 2001/12/14 11:44:31 rwatson Exp $
#
# This file is required by the ISC DHCP client.
# See ``man 5 dhclient.conf'' for details.
#
# In most cases an empty file is sufficient for most people as the
# defaults are usually fine.
#
alias {
interface "xl0";
fixed-address 192.168.42.40;
option subnet-mask 255.255.255.0;
}
上例的作用是,当 dhclient 不能通过 DHCP server 获取 IP 时,则使用 192.168.42.40 这个固定 IP。
FreeBSD 7.0 稳定版发布啦!! [FreeBSD] -
[FreeBSD 7.0 Release Stable ]
2008-02-27
FMV-253L 安装120G硬盘,安装 FreeBSD 6.2 看电影 [FreeBSD] -
[FMV-253L 120G FreeBSD mplayer ]
2007-12-29
就要元旦了,今天中午吃完饭后我们就放假了(今天中午食堂的饭不错,^_^)。现在简单描述一下我在 FMV-253L 上安装 FreeBSD 6.2 以及 mplayer 过程。
首先是硬盘问题,关于 235L 最大支持多大的硬盘。网上看到已经有人在 253L 上成功安装了 80G 硬盘,根据我的理解,关于主板对硬盘的支持有几个临界点:528M,2.1G,8.4G,32G,137.4G 等,如果能够安装 40G,那就一定能够安装 120G,当然事实证明确实如此。至于 253L 能否支持 160G 硬盘就无从知晓了,没有把握的事情我不做,况且现在 120G 硬盘性价比更高一些。
下定决心之后,直奔太平洋三期。硬盘参数如下:
型号:HTS541612J9AT00
容量:120GB
转速:5400转
缓存容量:8M
平均寻道时间:11ms
数据线接口类型:IDE
电源接口类型:N/A
传输标准:ATA-100
内部最大传输速率:493Mbit/s
外部最大传输速率:100Mbit/s
盘片数量:2
单碟容量:80GB
NCQ支持:N/A
垂直技术支持:支持
硬盘类型:笔记本
产品尺寸:2.5英寸
#####
# 安装 FreeBSD 6.2 大概过程
##################################
首先将硬盘放在我的 T21 上安装系统。然后将硬盘再将硬盘装到 253L 上。253L 换硬盘还是很麻烦的,简直就是大卸八块啊。虽然已经拆过几次了,轻车熟路了,可是这次不小心将左边屏轴上的盖子弄掉了。还好硬件一切OK,反正俺对外观无要求,哈哈。
大概过程:
定制并安装内核 --> Port 安装 Xorg --> Port 安装 fvwm2-devel --> Port 安装 mplayer --> Port 安装 samba
安装 samba 的作用是为了方便的拷贝电影到机器上。
#####
# 播放效果:AVI 格式的电影、电视剧播放效果很好
###################################
对于如下参数的 AVI 格式的电影,播放效果很好,不会有停顿的感觉。
VIDEO: [XVID] 608x336 24bpp 23.976 fps 1022.0 kbps (124.8 kbyte/s)
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
此时对应的 top 结果如下:(可以看到在 FreeBSD 6.2 下,对于一个 608×336,23.976fps,1022kbps 的avi格式的电视剧来说,253L 还是可以从容应付的)
last pid: 6146; load averages: 0.85, 0.36, 0.20 up 0+00:34:24 15:02:27
34 processes: 3 running, 31 sleeping
CPU states: 61.1% user, 0.0% nice, 5.8% system, 1.9% interrupt, 31.1% idle
Mem: 46M Active, 15M Inact, 34M Wired, 5172K Cache, 20M Buf, 460K Free
Swap: 256M Total, 24M Used, 231M Free, 9% Inuse
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
6144 xuming 1 108 0 58720K 22508K RUN 0:38 33.56% mplayer
765 xuming 1 104 0 22784K 7236K RUN 0:36 24.66% Xorg
6111 xuming 1 96 0 5612K 2016K select 0:04 1.03% xterm
6120 xuming 1 96 0 4124K 1800K select 0:03 0.05% conky
778 xuming 1 96 0 2344K 1056K RUN 0:05 0.00% top
770 xuming 1 96 0 5740K 2136K select 0:02 0.00% fvwm
4903 xuming 1 96 0 6252K 1340K select 0:02 0.00% sshd
775 xuming 1 96 0 6252K 1480K select 0:01 0.00% sshd
6146 xuming 1 8 0 58416K 27864K nanslp 0:01 0.00% mplayer
723 xuming 1 20 0 4976K 1060K pause 0:01 0.00% csh
4904 xuming 1 5 0 4976K 1072K ttyin 0:01 0.00% csh
4900 root 1 4 0 6276K 1340K sbwait 0:01 0.00% sshd
772 root 1 4 0 6276K 1348K sbwait 0:00 0.00% sshd
687 root 1 8 0 1760K 716K wait 0:00 0.00% login
6112 xuming 1 20 0 4984K 1096K pause 0:00 0.00% csh
491 root 1 96 0 1376K 656K select 0:00 0.00% syslogd
627 root 1 8 0 1388K 736K nanslp 0:00 0.00% cron
646 root 1 96 0 1336K 556K select 0:00 0.00% moused
776 xuming 1 20 0 4712K 1068K pause 0:00 0.00% csh
764 xuming 1 8 0 2364K 856K wait 0:00 0.00% xinit
620 root 1 96 0 3524K 1164K select 0:00 0.00% sshd
278 root 1 113 0 1464K 568K select 0:00 0.00% dhclient
693 root 1 5 0 1344K 592K ttyin 0:00 0.00% getty
692 root 1 5 0 1344K 592K ttyin 0:00 0.00% getty
689 root 1 5 0 1344K 592K ttyin 0:00 0.00% getty
746 xuming 1 8 0 1716K 752K wait 0:00 0.00% sh
688 root 1 5 0 1344K 592K ttyin 0:00 0.00% getty
691 root 1 5 0 1344K 592K ttyin 0:00 0.00% getty
690 root 1 5 0 1344K 592K ttyin 0:00 0.00% getty
694 root 1 5 0 1344K 592K ttyin 0:00 0.00% getty
563 root 1 96 0 1288K 532K select 0:00 0.00% usbd
325 _dhcp 1 96 0 1464K 584K select 0:00 0.00% dhclient
162 root 1 20 0 1252K 464K pause 0:00 0.00% adjkerntz
426 root 1 113 0 528K 16K select 0:00 0.00% devd
#####
# 内核定制需要注意的地方
##################################
在合适的位置添加或修改如下参数:
machine i386
cpu I586_CPU
options CPU_ENABLE_LONGRUN # 适用于全美达的 CPU
ident My253L
device drm # 据说可以开启显卡的 3D 功能
device mach64drm
options VESA # 这两个参数适用于高分辨率的控制台
options SC_PIXEL_MODE
device acpi_fujitsu # 加入富士通笔记本的 acpi 模块
######
# 253L 适用的 /etc/make.conf 如下
#######################################
# $FreeBSD: src/share/examples/etc/make.conf,v 1.265.2.8 2006/09/13 08:39:16 des
#
# Edited by xnming21@hotmail.com for his FMV-253L use.
# Please see make.conf(5) and /usr/share/examples/etc/make.conf
#
CPUTYPE?=crusoe
CFLAGS= -O2 -pipe
CXXFLAGS+= -fconserve-space
MAKE_SHELL?=sh
NO_PROFILE=true
FETCH_CMD=/usr/local/bin/axel -n 2 -a
DISABLE_SIZE=YES
MASTER_SITE_BACKUP?= \
ftp://ftp.cn.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ \
ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ \
ftp://ftp2.jp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ \
ftp://ftp.tw.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ \
ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}
注意:在 /usr/src/share/examples/etc/make.conf 中没有提示 CPUTYPE 可以选择 crusoe,但是通过查看 /usr/src/share/mk/bsd.cpu.mk 文件,可以发现还是针对 crusoe 这款 CPU 做了配置了。所以可以在 make.conf 中放心使用 CPUTYPE?=crusoe
其他内容同我的 T21 上 make.conf 的设置。
DELL M1210 上安装 Gentoo [Linux] -
[DELL M1210 Gentoo FreeBSD SATA ]
2007-12-29
新买了一个 DELL M1210 (T2350,512M*2 DDR2 667,120G SATA 8M,GMA950),性能还不错,在 FreeBSD 6.3 prerelease 下 ubench CPU 得分在 196000 左右,内存 150000 左右,综合得分 165000 左右(只是个人的模糊记忆)。初次安装用的是 6.1 release 的光盘,大概只用了5个小时就完成了 make world 以及 port 安装 Xorg,fvwm2-dev,opera,gimp,mplayer 等。顺便说一下,FreeBSD 6.3 对 M1210 的支持还不错,显卡、声卡、网卡、SATA 硬盘都安装顺利,Xorg 都没有进行参数配置就顺利进入,也成功开启了 DRI。
FreeBSD 千般好万般好,可是因为厂商支持的原因,在虚拟化方面真的是落后于 Linux 了,于是开始在 M1210 上安装 Gentoo。
#####
# Gentoo 的安装
#######################
根据手册安装一切顺利,可是在安装完重启后,系统提示:
root-nfs no nfs server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Insert root floppy and press ENTER
VFS: cannot open root device "sda3" or unknown-block(2,0)
please append a correct "root=" boot option; here are the available partitions:
0300 117220824 hda driver: ide-disk
0301 257000 hda1
0302 16193520 hda2
0303 100767712 hda3
1600 4194302 hdc driver: ide-cdrom
kernel panic - not syncing: VFS: unable to mount root fs on unkown-block(2,0)
# 此时我的 /boot/grub/grub.conf 文件如下
default 0
timeout 30
title=Gentoo Linux 2.6.23-r3
root (hd0,0)
kernel /boot/kernel-2.6.23-gentoo-r3 root=/dev/sda3
title=Gentoo Linux 2.6.23-r3 (rescue)
root (hd0,0)
kernel /boot/kernel-2.6.23-gentoo-r3 root=/dev/sda3 init=/bin/bb
#####
# 解决方法:(参考 http://gentoo-wiki.com/HARDWARE_SATA)
###########################
Device Drivers --->
<*> ATA/ATAPI/MFM/RLL support --->
< > generic/default IDE chipset support
如上,在内核配置中取消对“generic/default IDE chipset support”的选择,意思是不要将 SATA 硬盘作为 IDE 设备。之后重新编译内核,重启,问题解决。
Xorg 中的电源管理(设置显示器 turn off 时间) [FreeBSD] -
[FreeBSD Power Management Xorg DPMS ]
2007-08-30
在 FreeBSD 6.2 上安装了 Xorg 后,如果十分钟内桌面不活动就会自动关闭显示器,这对我来说非常不方便,我在家一般都是三台机器同时用的,显示器动不动就自动关闭真是痛苦。在网上搜索了一番,找到了解决方法。
如果要启用显示器的自动电源管理功能,需要开启 DPMS 功能,步骤如下:
# ee /etc/X11/xorg.conf
在 Section "Monitor" 中添加一行:Option "DPMS"。如:
Section "Monitor"
Identifier "My Monitor"
HorizSync 31.5 - 57.0
VertRefresh 50-90
Option "DPMS"
EndSection
然后 restart your X server,可以通过“Ctrl+Alt+Backspace”,然后 xinit 重新进入 X 桌面。
这时可通过命令“xset dpms force off”测试是否设置生效。
设置显示器自动关闭时间。还是在“/etc/X11/xorg.conf”中设置Section “ServerLayout”部分,我的设置如下:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
Option "BlankTime" "0"
Option "StandbyTime" "45"
Option "SuspendTime" "50"
Option "OffTime" "60"
EndSection
BlankTime:设置进入屏幕保护的时间,单位为分。默认为10分钟。
StandbyTime:设置显示器进入待机状态的时间,单位为分。默认为20分钟。
SuspendTime:设置显示器进入挂起状态的时间,单位为分。默认为30分钟。
Offtime:设置显示器关闭的时间,单位为分。 默认为40分钟。
aterm, xterm, Eterm, rxvt, Konsole,选择谁? [FreeBSD] -
[FreeBSD Linux aterm xterm Eterm rxvt Konsole ]
2007-08-30
Linux、FreeBSD 下有形形色色的 terminal emulator,如:aterm, xterm, Eterm, rxvt, Konsole 等等等,到底如何选择呢?各自又有什么特性呢?哪个适合我?今天在网上看到一篇不错的文章,原文网址: http://ayaz.wordpress.com/2007/04/07/aterm-xterm-eterm-rxvt-konsole-oh-my/
内容如下:
aterm, xterm, Eterm, rxvt, Konsole, oh my!
“Konsole” supports transparency, but it is slow (and most importantly for me, does not have the “fixed” fonts that xterm uses). “xterm” is cool, but I want transparency which it doesn’t have. “Eterm” is, again, slower than “xterm”, and though it does support backgrounds, you cannot, as far as I have explored it, make “Eterm” use any image for background. On the flip side, “Eterm” has support for the fixed fonts like xterm. But I desperately need “transparency”.
Look at “aterm”. Although working on the shoulders of “rxvt”, “aterm” is pretty much like “xterm”, supports all the things “xterm” does, and provides fast visually pleasing effects (without hogging up resources like Konsole), including, what I want the most, transparency. Not only that, you can configure “aterm” to use fixed font. What more do I want?
我的选择是 aterm,然后 xterm,其他就不考虑了。
修改 FreeBSD root 密码 [FreeBSD] -
[FreeBSD FMV-253L FVWM root ]
2007-08-26
今天将闲置好久的富士通 FMV-253L 拿出来查看之前在上面的 FVWM 的配置,这台机子目前我在上面安装了 FreeBSD 6.1。无奈的却发现忘记了 root 密码(呵呵,好久没用了密码都不记得了。)
还原过程:
1. 启动机器;
2. 在出现“Welcome to FreeBSD!”的选择菜单时,选择“4. Boot FreeBSD in single user mode”;
3. 在加载结束后,执行
# /sbin/mount -a
# passwd
这样就重设了 root 账户密码。
分页共1页
1