Chinaunix首页 | 论坛 | 博客
  • 博客访问: 304763
  • 博文数量: 75
  • 博客积分: 1956
  • 博客等级: 上尉
  • 技术积分: 862
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-21 15:36
文章分类

全部博文(75)

文章存档

2018年(1)

2012年(3)

2011年(19)

2010年(1)

2009年(1)

2008年(50)

分类: LINUX

2008-09-24 12:59:19

实验

实验1:
对于这个实验你需要一个搭档。前面步骤需要有他来完成。要准备这个实验,遵循下面步骤:
    1、用 root 用户登录。
    2、用文本编辑器打开 /etc/inittab 文件。
    3、将启动级别改为 0。
    4、保存设置。
    5、关闭计算机。将系统交给你的搭档。告诉他计算机启动进入 Linux 可能会出问题。
    -----------------------------
    6、现在你的搭档已经设置好了你的系统。现在加电启动进入 Linux。发生了什么事?你该如果做?

答案:
1.  
To solve this problem, you need to observe what happens when you boot this system. While not required, the first step you should take is to use the GRUB boot menu to boot into a specific runlevel. If you have any experience with Linux, you should know that an immediate shutdown after Linux goes through the boot process is associated with runlevel 0.

实验2:
对于这个实验需要你的搭档设置你的系统
    ---------------------------
现在你为你的搭档设置系统,遵循下面步骤:
    1、如果你配置的 RHEL 系统在 VMware上,建立当前快照。如果你的搭档没有解决问题,这将很有用。
    2、正常启动你搭档的电脑。
    3、打开 /etc/fstab 文件,你会看见与 /boot 相关的行,类似下面:
    LABEL=/boot   /boot    ext3       defaults     1 2
    4、将此行加入一个排版错误,改动如下:
    LABEL=boot   /boot    ext3       defaults    1 2
    5、关闭计算机,告诉你的搭档启动系统。
    ---------------------------
    6、现在你的搭档已经设置好了你的系统。现在加电启动进入 Linux。发生了什么事?你该如果做?

答案:

2.  
In this lab, you should know almost immediately that there's a problem with the LABEL associated with the /boot directory, with an error message similar to:

fsck.ext3: Unable to resolve 'LABEL=boot'

During your exam, this may be a bit tricky. If you're very familiar with the contents of /etc/fstab, you may be able to recognize this problem right away.
Otherwise, you can verify the LABEL associated with each partition on your hard drive with the e2label command. For example, if you're checking the /dev/hda1 partition, the command would be

# e2label /dev/hda1

Some trial and error may be required, but you'll eventually see the LABEL you need in the output. For example, I see the following output from this command on my VMware-based RHEL system:

/boot

This provides the hint I need to know how to repair my /etc/fstab configuration file.

实验3:
对于这个练习,使用测试计算机。不要使用生产计算机或存储有重要数据的计算机。如果出现某些问题,你会无法从备份中恢复系统,你只有重新安装 Linux。这个练习假设你使用 Red Hat Enterprise Linux 默认启动加载程序, GRUB。

转到 /boot 目录。改变 initrd-versionnumber.img 文件名。确定名称比较容易记,如 initrd-versionnumber.bak。重启 Linux。当 GRUB 进入启动序列,如果找不到 initial RAM 文件(initrd),它会停止并给出文件无法找到的消息。

现在你的启动加载重新无法工作,你该怎么做?你可以进入 单用户模式吗?

答案:

3.  
As you practice learning about Linux for the RHCE exam, it's important to know how GRUB works. By default, it requires an initial RAM disk file, initrd-versionnumber.img. If GRUB can't find this file, it'll give you a file not found error. Since your computer does not boot, you'll need to boot with a rescue disc before you can fix the initrd file. Remember to make sure that the filename matches the name shown in /boot/grub/grub.conf exactly.
You can repeat this process with the vmlinuz file or the root directive in grub.conf. Make sure to have backups of key files so you can restore your original configuration. When you repeat this process, what happens after you select a kernel from the GRUB menu? Do you see a different error? Is it associated with a different file?
Understanding these answers can help you learn to use GRUB messages to more precisely diagnose specific problems with Linux.

实验4:
在这个实验中,你将创建一个新的 PEs 并使用他们增加 LV的大小。你所操作的 LV 用于 /var 目录。由于你 Web 站点的需求,你的 /var 需要更多的空间提供给你的 Web 站点数据。假设你的 /etc/fstab 配置文件如下:

/dev/Volume00/LogVol00  /var   ext3   defaults  1 2

你要从 /dev/sde 和 /dev/sdf 硬件设备上添加 PEs,并添加额外的 SCSI 硬盘,/dev/sdg。假设你已经备份了 /var 目录下的需要数据。

答案:

4.  
If you've just added the new hard drive, you'll need to set up partitions or use the entire hard drive for PEs. Based on the premises of the lab, you have the entire SCSI /dev/sdg hard drive available, so you can just allocate this entire hard drive as PEs with the following command:

# pvcreate /dev/sdg

The next step is to extend the VG, Volume00, to include the newly configured PEs. You can do so with the following command:

# vgextend Volume00 /dev/sdg

With the additional PEs at your disposal, you can increase the size of the LV allocated to the /var directory. For example, if you wanted to increase the size to 2GB, you could run the following command:

# lvextend -L2G /dev/Volume00/LogVol00
阅读(1584) | 评论(0) | 转发(0) |
0

上一篇:16 2分钟训练

下一篇:PDF 文件下载

给主人留下些什么吧!~~