SYA710-midterm

From CDOT Wiki
Revision as of 01:17, 25 November 2008 by Milton.paiva (talk | contribs) (Example Midterm Test Questions)
Jump to: navigation, search

Example Midterm Test Questions

1. List the 5 steps (exact commands) you would enter in order to
   format an ext3 file system on hard drive partition /dev/sdb2,
   label it BACKUP, set its maximum mount count to 50, check it for 
   errors and mount it on directory /mnt. 

   You should assume the mount point and the hard drive partition
   already exist and that the partition has never been formatted.

   [ 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
2. Describe the process to create two partitions, physical volume, volume group, filesystem, label it, extent the volume group and logical volume and then resize the filesystem.
	
           1st COMMAND: fdisk /dev/sdb

	   2nd COMMAND: pvcreate /dev/sdb1 /dev/sdb2

	   3rd COMMAND: vgcreate /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/sda2

           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

3. Steps to compile the linux kernel

 1st make mrproper
 2nd make oldconfig
 3rd make menuconfig
 4th make 
 5th make modules_install