Chinaunix首页 | 论坛 | 博客
  • 博客访问: 449724
  • 博文数量: 21
  • 博客积分: 6636
  • 博客等级: 准将
  • 技术积分: 1006
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-08 11:10
文章分类
文章存档

2011年(11)

2010年(4)

2009年(4)

2008年(2)

分类: BSD

2011-06-09 10:01:50

  1. If somehow you have messed up rc.conf, you likely are now seeing an error message like:

    Read only file system
    This error is likely due to some typographical error in rc.conf.  Perhaps it is a quote mark on the end of a line that is missing, or some other 'fat finger' mistake.

    In any case, when you reboot you aren't able to write to the hard drive, and get the Read only file system error message.

  2. In order to temporarily write to the hard drive so you can edit rc.conf, do the following:

    mount -u

    mount -a -t ufs

    swapon -a

    /usr/local/bin/pico /etc/rc.conf

  3. After you have exited out of Pico, reboot (shutdown -r now) and if you've fixed the error in rc.conf the computer will boot normally.

  4. Note that this assumes you have Pico installed.  If you don't, you can still recover but you have to deal with vi.  This text editor, vi, is an extremely anti-intuitive piece of software.  Before you go any further, you are strongly urged to print out a cheat sheet so that you are familiar with vi's bizzare commands:




  5. If you are using vi, then the commands would be the same as above except for the 'Pico' line.  Use the following instead:

    /usr/bin/vi /etc/rc.conf
阅读(2630) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~