Changes

Jump to: navigation, search

SYA710-midterm

3,185 bytes added, 15:57, 27 November 2008
Example Midterm Test Questions
[ Each command is worth one mark. ]
1st COMMAND: _____________________________________mkfs.ext3 /dev/sdb2
2nd COMMAND: _____________________________________e2label /dev/sdb2 BACKUP
3rd COMMAND: _____________________________________tune2fs -c 50 /dev/sdb2
4th COMMAND: _____________________________________e2fsck -ycfv /dev/sdb2
5th COMMAND: _____________________________________mount /dev/sdb2 /mnt</pre>  2. Describe the process to create two partitions on drive sdb (1 and 2), make them into physical volumes, create a volume group named seneca containing sdb1 and a logical volume (500M) named home. Format the logical volume as an ext3 filesystem and label it myhome. Then extent the logical volume by 1GB and resize the filesystem the file system to fill it.<pre> 1st COMMAND: fdisk /dev/sdb  2nd COMMAND: pvcreate /dev/sdb1 /dev/sdb2  3rd COMMAND: vgcreate seneca /dev/sdb1  4th COMMAND: lvcreate -n home --size 500M seneca  5th COMMAND: mkfs.ext3 /dev/seneca/home  6th COMMAND: mount /dev/seneca/home /mnt  7th COMMAND: e2label /dev/seneca/home myhome  8th COMMAND: vgextend seneca /dev/sdb2  9th COMMAND: lvextend -L +1G /dev/seneca/home  10th COMMAND: resize2fs /dev/seneca/home  +------[ Volume Group (VG) - lvmdsk ]------+ | +--[ PV - hda1 ]---+ +--[ PV - hdb1 ]--+ | | | PE PE PE PE PE PE| | PE PE PE PE PE | | | +------------------+ +-----------------+ | | | | | | | | | | +-----------------+ | | | | +----------------+ | | | | | | | | | +-[ LV - var ]-+ +-[ LV - home ]-+ | | | LE LE LE LE | | LE LE LE LE | | | +--------------+ +---------------+ | +---------------------------------------------+ source: http://focalinux.cipsga.org.br/guia/inic_interm/ch-disc.htm </pre>[[Image:lvm.png]]<pre>3. Steps to compile the linux kernel  1st make mrproper 2nd make oldconfig 3rd make menuconfig 4th make 5th make modules_install
</pre>
<pre>
2. Describe the process of use LVM to extent a partition
1st COMMAND: fdisk /dev/sdb # create two partitions sdb1 and sdb2
2nd COMMAND: mkfs 4. Steps to reduce the LV (logical Volume)  1. To reduce the volume the file system has to reduced first. In this example the original size of LV is 240 MB and we have to reduce it by 200. Means the resulting LV size would be 40 MB (a)File system has to unmounted before reducing #umount /mnt (b)make sure the file system is in consistence state before reducing  # fsck -t ext3 f /dev/seneca/home (c)reduce the size by 200MB  # resize2fs /dev/seneca/home 40M (d)Now we can reduce the LV.   #lvreduce /dev/sdb1; mkfs seneca/home -t ext3 L 40M PS: wrong values/devparameters may render file system unavailable ref:RHCE exam Book </sdb2pre> <pre>5. Kick Start Procedure
3rd COMMAND: pvcreate - Install Fedora- sudo yum -y install k3b isomaster- use k3b to rip Fedora Installation DVD into ISO- use isomaster to copy file "/devroot/sdb1 anaconda-ks.cfg" from local Fedora partition into the ISO file, put it in root directory in the ISO file, "/devks.cfg"- open "ks.cfg" find the line... "bootloader --location=mbr --driveorder=sda,sdb --apppend="rhgb quiet""- change to "bootloader --location=sdb --driveorder=sda,sdb --apppend="rhgb quiet""-save and add to the image ISO, make sure the name is "ks.cfg" on ISO Image. -if u're not running with root, use root to copy it to avaliable directory and make sure it's readable for your current user-in your image list, open /sdb2isolinux/isolinux.cfg-find "label linux" and edit the line "append initrd=initrd.img" to "append initrd=initrd.img ks=cdrom"-save "isolinux.cfg" and add to the image ISO- use k3b to burn iso image to a new DVD- boot the target PC with the new Fedora installation DVD\- in boot prompt, press "c" to add boot option- type "ks=cdrom" to let installation read the ks.cfg from DVD rom- sit back and have a cup of tea.. ^^
4th COMMAND: vgcreate /dev/sdb1 /dev/sdb2
</pre>

Navigation menu