Difference between revisions of "SYA710-test2"
(New page: == Test #2 == <ol> <li>List the 5 complete commands, in correct order, you would enter to decrease the size of an ext3 file system to 1GB. The file system is inside a logical volum...) |
(→Test #2) |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
and that the current size of the file system is 2GB of which | and that the current size of the file system is 2GB of which | ||
less than ¼ is used. | less than ¼ is used. | ||
+ | <pre> | ||
+ | 1. umount /mnt | ||
+ | 2. fsck -t ext3 /dev/SENECA/LUX | ||
+ | 3. resize2fs /dev/SENECA/LUX 1G | ||
+ | 4. lvreduce SENECA/LUX -L1G | ||
+ | 5. mount /dev/SENECA/LUX /mnt | ||
+ | </pre> | ||
</li> | </li> | ||
<li>A server, named “abcd”, has a startup script called “abc”. | <li>A server, named “abcd”, has a startup script called “abc”. | ||
Line 15: | Line 22: | ||
<ol TYPE=A> | <ol TYPE=A> | ||
<li>In Fedora 8, where (full path name) would you put abc? | <li>In Fedora 8, where (full path name) would you put abc? | ||
+ | <pre> | ||
+ | /etc/init.d/ | ||
+ | </pre> | ||
</li> | </li> | ||
<li>In Fedora 8, where (full path name) would you put abcd? | <li>In Fedora 8, where (full path name) would you put abcd? | ||
+ | <pre> | ||
+ | /sbin or /usr/sbin or /usr/local/sbin | ||
+ | </pre> | ||
</li> | </li> | ||
<li>What command would you enter in order to add this new service | <li>What command would you enter in order to add this new service | ||
for management by chkconfig? | for management by chkconfig? | ||
+ | <pre> | ||
+ | chkconfig --add abc | ||
+ | </pre> | ||
</li> | </li> | ||
<li>Assume the following comments appeared at the start of abc: | <li>Assume the following comments appeared at the start of abc: | ||
Line 29: | Line 45: | ||
</pre> | </pre> | ||
What are the two link files for this service? | What are the two link files for this service? | ||
− | + | <pre> | |
+ | S72abc and K15abc | ||
+ | </pre> | ||
</li> | </li> | ||
<li>What command would you enter to stop this server? | <li>What command would you enter to stop this server? | ||
+ | <pre> | ||
+ | service abc stop | ||
+ | </pre> | ||
</li> | </li> | ||
</ol> | </ol> | ||
Line 38: | Line 59: | ||
<ol TYPE=A> | <ol TYPE=A> | ||
<li>What yum command is used to list all repositories? | <li>What yum command is used to list all repositories? | ||
+ | <pre> | ||
+ | yum repolist | ||
+ | </pre> | ||
</li> | </li> | ||
<li>Explain, clearly, how you would add a new yum repository to Fedora 8. | <li>Explain, clearly, how you would add a new yum repository to Fedora 8. | ||
+ | <pre> | ||
+ | Add a repo file to /etc/yum.repos.d/ directory. See others for examples. | ||
+ | </pre> | ||
</li> | </li> | ||
<li>What yum command would you use to list all available packages | <li>What yum command would you use to list all available packages | ||
containing the string “spider”? | containing the string “spider”? | ||
+ | <pre> | ||
+ | yum info *spider* | ||
+ | </pre> | ||
</li> | </li> | ||
<li>What yum command would you use to display a list of all installed | <li>What yum command would you use to display a list of all installed | ||
packages? | packages? | ||
+ | <pre> | ||
+ | yum list installed | ||
+ | </pre> | ||
</li> | </li> | ||
<li>What yum command would you use to install a package named “words”? | <li>What yum command would you use to install a package named “words”? | ||
+ | <pre> | ||
+ | yum install words | ||
+ | </pre> | ||
</li> | </li> | ||
</ol> | </ol> | ||
Line 55: | Line 91: | ||
<li>Explain, clearly, the difference between “make config” and “make | <li>Explain, clearly, the difference between “make config” and “make | ||
oldconfig”. | oldconfig”. | ||
+ | <pre> | ||
+ | make config will prompt for ALL kernel configuration options. | ||
+ | make oldconfig will only prompt for options that are in the new kernel and not in the previous. | ||
+ | </pre> | ||
</li> | </li> | ||
<li>After building a kernel with the “make” command, where exactly (give | <li>After building a kernel with the “make” command, where exactly (give | ||
the name and relative path) would you find the new kernel? You may | the name and relative path) would you find the new kernel? You may | ||
assume you're working with an X86 system. | assume you're working with an X86 system. | ||
+ | <pre> | ||
+ | arch/x86/boot/bzImage | ||
+ | </pre> | ||
</li> | </li> | ||
<li>After running the command “make modules_install” where (give full | <li>After running the command “make modules_install” where (give full | ||
path name) would you expect to find the new kernel modules? | path name) would you expect to find the new kernel modules? | ||
+ | <pre> | ||
+ | /lib/modules/"kernel version"/ | ||
+ | </pre> | ||
</li> | </li> | ||
<li>Name two commands, other than “make config” and “make oldconfig” | <li>Name two commands, other than “make config” and “make oldconfig” | ||
which can be used to modify/view the current kernel configuration. | which can be used to modify/view the current kernel configuration. | ||
+ | <pre> | ||
+ | make xconfig or make qconfig or make menuconfig or vi .config | ||
+ | </pre> | ||
</li> | </li> | ||
<li>If the new kernel version was 2.7.28, what command would you use | <li>If the new kernel version was 2.7.28, what command would you use | ||
to build a new INITRD file? | to build a new INITRD file? | ||
+ | <pre> | ||
+ | mkinitrd initrd-2.7.28.img 2.7.28 | ||
+ | </pre> | ||
</li> | </li> | ||
</ol> | </ol> | ||
</ol> | </ol> |
Latest revision as of 09:51, 27 November 2008
Test #2
- List the 5 complete commands, in correct order, you would enter
to decrease the size of an ext3 file system to 1GB. The file
system is inside a logical volume named LUX. The logical
volume is part of a volume group named SENECA.
You may assume the logical volume is currently mounted on /mnt
and that the current size of the file system is 2GB of which
less than ¼ is used.
1. umount /mnt 2. fsck -t ext3 /dev/SENECA/LUX 3. resize2fs /dev/SENECA/LUX 1G 4. lvreduce SENECA/LUX -L1G 5. mount /dev/SENECA/LUX /mnt
- A server, named “abcd”, has a startup script called “abc”.
Answer the following questions.
- In Fedora 8, where (full path name) would you put abc?
/etc/init.d/
- In Fedora 8, where (full path name) would you put abcd?
/sbin or /usr/sbin or /usr/local/sbin
- What command would you enter in order to add this new service
for management by chkconfig?
chkconfig --add abc
- Assume the following comments appeared at the start of abc:
#!/bin/sh # abc # description: server starts/stops abcd # chkconfig: 3 72 15
What are the two link files for this service?
S72abc and K15abc
- What command would you enter to stop this server?
service abc stop
- In Fedora 8, where (full path name) would you put abc?
- The following questions deal with YUM package management in Fedora 8.
- What yum command is used to list all repositories?
yum repolist
- Explain, clearly, how you would add a new yum repository to Fedora 8.
Add a repo file to /etc/yum.repos.d/ directory. See others for examples.
- What yum command would you use to list all available packages
containing the string “spider”?
yum info *spider*
- What yum command would you use to display a list of all installed
packages?
yum list installed
- What yum command would you use to install a package named “words”?
yum install words
- The following questions deal with building a new kernel on Fedora 8.
- Explain, clearly, the difference between “make config” and “make
oldconfig”.
make config will prompt for ALL kernel configuration options. make oldconfig will only prompt for options that are in the new kernel and not in the previous.
- After building a kernel with the “make” command, where exactly (give
the name and relative path) would you find the new kernel? You may
assume you're working with an X86 system.
arch/x86/boot/bzImage
- After running the command “make modules_install” where (give full
path name) would you expect to find the new kernel modules?
/lib/modules/"kernel version"/
- Name two commands, other than “make config” and “make oldconfig”
which can be used to modify/view the current kernel configuration.
make xconfig or make qconfig or make menuconfig or vi .config
- If the new kernel version was 2.7.28, what command would you use
to build a new INITRD file?
mkinitrd initrd-2.7.28.img 2.7.28