FreeBSD安装配置常见问题

2009-05-13 03:57:48来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

1. 系统启动反复出现timeout-resettingacd0:MODE_SENSE_BIG command timeout-resetting
ata1:resetting devices...done
acd0:MODE_SENSE_BIG command timeout-resetting
ata1:resetting devices...done
acd0:MODE_SENSE_BIG command timeout-resetting
ata1:resetting devices...done
..........
Probing divice,please wait(this can take a few minutes
     
将光驱的master修改成slave来用
2. 发现FreeBSD的交换空间被耗尽
不追加分区, 可以通过增加交换文件的方式实现
Example 6-1. Creating a Swapfile on FreeBSD 4.X
1.   Be certain that your kernel configuration includes the vnode
driver. It is not in recent versions of GENERIC.
pseudo-device   vn 1   #Vnode driver (turns a file into a device)
2.   create a vn-device:
# cd /dev
# sh MAKEDEV vn0
3.   create a swapfile (/usr/swap0):
# dd if=/dev/zero of=/usr/swap0 bs=1024k count=64
4.   set proper permissions on (/usr/swap0):
# chmod 0600 /usr/swap0
5.   enable the swap file in /etc/rc.conf:
swapfile="/usr/swap0"   # Set to name of swapfile if aux swapfile desired.
6.   Reboot the machine or to enable the swap file immediately, type:
# vnconfig -e /dev/vn0b /usr/swap0 swap
Example 6-2. Creating a Swapfile on FreeBSD 5.X
1.   Be certain that your kernel configuration includes the memory
disk driver ( md(4)). It is default in GENERIC kernel.
device   md   # Memory "disks"
2.   create a swapfile (/usr/swap0):
# dd if=/dev/zero of=/usr/swap0 bs=1024k count=64
3.   set proper permissions on (/usr/swap0):
# chmod 0600 /usr/swap0
4.   enable the swap file in /etc/rc.conf:
swapfile="/usr/swap0"   # Set to name of swapfile if aux swapfile desired.
5.   Reboot the machine or to enable the swap file immediately, type:
# mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0
     
3. 如何将系统迁移到新的大硬盘
建议重装系统,然后将数据迁移到新硬盘, 如果真的要直接将系统迁移到新硬盘一定要使用dump和restore,不要使用tar,cpio等, 它们对根目录的操作可能会出现问题, 步骤如下:

  • 使用newfs新建一个分区.

  • mount上该分区.

  • cd到装载点.

  • 使用dump备份旧的分区, 通过管道输出到新分区
    例如, 假设要将根文件系统移动到/dev/ad1s1a, 使用/mnt作为临时装载点, 命令如下
    # newfs /dev/ad1s1a
    # mount /dev/ad1s1a /mnt
    # cd /mnt
    # dump 0af - / | restore xf -
         
    要在新硬盘上重新安排分区稍微有点麻烦, 例如要把/var文件系统放在新硬盘分区的 根文件系统下, 首先按照上面的步骤移动根文件系统, 然后在移动/var文件系统, 命令如下:
    # newfs /dev/ad1s1a
    # mount /dev/ad1s1a /mnt
    # cd /mnt
    # dump 0af - / | restore xf -

    标签:

    版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
    特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

  • 上一篇:FreeBSD常见问题集合

    下一篇:FREEBSD 下VPN的安装配置