设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 操作系统 >> Linux >> Linux 开机程序之研讨
精品推荐
Linux点击TOP10
·Linux下安装LumaQQ
·口袋里的Linux:在您的U盘上运行SLAX
·Linux命令Man解释:PPPD(8) :点对点daemon协议
·虚拟网络计算工具VNC使用指南
·Linux系统中如何正确安装摄像头驱动
·Linux 核心--4.内存管理
·Linux 内核文件系统与设备操作流程分析
·Ethernet HOWTO Linux以太网-HOWTO (4)型号的信息
·Linux精彩桌面 GNOME桌面主题安装实例
·Linux下Flash/Shockwave播放器安装
操作系统点击TOP10
·Windows Vista完全硬盘安装法
·Windows Vista 激活不求人
·Windows Vista局域网网络连接设置
·Windows Vista系统动态桌面截图欣赏
·Windows XP中磁盘的分区应用
·Windows NT/2000/XP 出现蓝屏并显示“STOP 0x0000007f”错误
·让Windows XP变身Vista
·一招搞定Vista系统软件不兼容问题
·教你如何正确配置和优化Windows Vista
·只转两圈 加快Windows XP启动速度
精选专题

Linux 开机程序之研讨

作者: 来源:http://www.xgdown.com/ 时间:2005-11-18 17:35:32

Linux 开机程序之研讨(5)
echo "Remounting root device with read-write enabled."
/sbin/mount -w -n -o remount /


## 在前面的情况中 , 都是 root partition 为 read-only 的状态下 , 所做的一些
## 工作 , 到了最後一个指令 /sbin/mount -w -n -o remount / , 才把 root
## partition mount 成 read-write . 各位有没有看到前面那行 :
## if [ ! $READWRITE = yes ]; then ..... 下面这个 else 就是与这个 if 对应
## 也就是说 , 前面那个 if 的区块中 , 所作的工作都是在 root partition 为
## read-only 的条件成立下所作的事 , 那很明显的 , 下面这个 else 就是 root
## partition 为 read-write 的条件下所作的工作 . 假如你的 root partition
## 为 read-writeable 的话 , 那麽系统就会显示下面的讯息 . cat << EOF 所作的
## 事 , 就是把 EOF 之前的讯息全部显示在萤幕上 :
## 我想 , 下面的讯息写得很明显了 , 它说 : 你的 root partition 被 mount 成
## read-write , 没有办法检查 , 要使检查的动作能够顺利的进行 , 你必须把
## root partition mount 成 read-only ! 那要怎麽做呢 ? 很容易 , 只要利用
## rdev -R /<your_kernel_name> 1  就可以了 ......

else
cat << EOF

*** Root partition has already been mounted read-write. Cannot check!
For filesystem checking to work properly, your system must initially mount
the root partition as read only. Please modify your kernel with 'rdev' so
that
it does this. If you're booting with LILO, type:
  rdev -R /vmlinuz 1
         (^^^^^^^^  ... or whatever your kernel name is.)

If you boot from a kernel on a floppy disk, put it in the drive and type:
  rdev -R /dev/fd0 1

This will fix the problem *AND* eliminate this annoying message. :^)

EOF


## 下面这个指令没什麽好说的 , 就是暂停 10 秒钟 , 让 user 能够有充足的
## 时间看完上面的讯息

sleep 10
fi


## 删除 /etc/mtab  /etc/nologin  /etc/utmp

/bin/rm -f /etc/mtab* /etc/nologin /etc/utmp


## 制造 /etc/utmp , 这是一个很典型制造空档案的写法 . /dev/null 这个 node
## 蛮有趣的 , 在某一方面来说 , 它有点像是一个 " 黑洞 " . 怎麽说呢 ?
## 各位可以试试看下面的指令  ls >> /dev/null  , 当你使用这个指令之後会
## 发生什麽事呢 ? 什麽也没发生 , 而且 ls 的输出就好像被丢到黑洞里 , 无
## 影无踪了 . 那也许你会想 : 那这有什麽用 ? 我的回答是 : 的确没有什麽
## 很大的用处 , 但当你想抑制输出的讯息时 , 你就会用得到了 .

共19页 9 7 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [198 :>

Linux 开机程序之研讨 相关文章:
Linux 开机程序之研讨 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com