M01: Introduction to Operating Systems
TU1: Installing, configuring and exploiting a computer system
ASIX1
Pract. Exerc. 11: Working with File Systems  4-3-14

Practical Exercise 11:  Working with File Systems

GENERAL CONDITIONS
1- Deadline: 23-03-2014.
2- Send your report as a PDF file attached to an e-mail with the following specifications:
     a) E-mail address:
cf(at)collados.org or jordi.binefa(at)fje.edu depending who is your teacher
     b) File Name:

        b.1)
ASIX1 (Catalan): asix1_surname_name_m01tu01pr11.pdf
        b2.) DAW1 (English): daw1_surname_name_m01tu01pr11.pdf     
     c)
Subject:
         c.1)
ASIX1 (Catalan): asix1_surname_name_m01tu01pr11
         c.2)
DAW1 (English): daw1_surname_name_m01tu01pr11
3- Make this report individually.
4- Left, right, top and bottom margins: 2cm.
5- Character format: a) Font:Times New Roman (or Liberation Serif), b) Size: 10, c) Questions typeface: Bold, d) Answers typeface: Regular.
6- Page numbering on footer bar.

DOCUMENTATION ABOUT FILE SYSTEMS
What is a file system?-I
What is a file system?-II
General overview of Linux file system
The ext3 file system
The ext4 file system
Main characterisitics of typical Linux file systems: ext2, ext3 and ext4
What is swap?
List of file systems readable by Linux
Linux file system management tools
Linux file system tools-II
http://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html
http://www.debuntu.org/how-to-create-a-filesystem-within-another-partition-s-file
http://superuser.com/questions/367196/linux-how-to-format-multiple-file-systems-within-one-file

PRACTICAL EXERCISE

PART 1

1.- Find information about every mass storage device installed in your system.

2.-
Find the device file associated to your hard disk. Display information about every partition in your hard disk, showing partition, number of blocks and file file system type.

3.- Find for every mounted file system in your computer the following information: a) Device file where the file system is storaged, b) File system type, c) File system size in human readable format, d) The amount of disk used and available 
in human readable format and e) mounpoint (directory) connected to the file system.

4.- Create a new SATA hard disk  called w7alt, linked to SATA Port 1. Start your Linux system and install gparted.
Format the new SATA disk with the NTFS file system.

5.- Mount manually the new file system a new directory called /windows/w7. If that directory does not exist then, make it.

6-  Donwload the following iso image:http://www.tinycorelinux.net/5.x/x86/release/Core-5.2.iso . Shutdown your system. Add the newly downloaded iso image to your systema as a new IDE storage device connected to the secondary master socket and configured as a master. Boot your system again. Check if your newly connected storage device has been mounted during the boot process. If your new block device was mounted then, unmount it.

7.- Check  of  block device file systems connected to your your computer. Check  another time the list of mounted file systems in your computer. What is the difference?.

8.- Mount the file system in the ISO image on a directory called /media/cdrom_core52.  If that directory does not exist then, make it.

9.- Gain access to your recently mounted CDROM changing to /media/core_52 and make a list of its contents. Change to the directory called boot and list its contents. Copy core.gz in the recently mounted NTFS file system, which should be accessible through  the /windows/w7 directory. Check if core.gz has been succesfully copied.

10
.- Change to /windows/w7. Create a directory called "test".
Check if "test" has been succesfully copied.

11.- Stay in /windows/w7. Try to unmount your NTFS file system. Chek if you are able to unmount the filesystem while you are working in the file system. Change to /windows. Try it again. Does it work?. Why?.

12.- Gain access to your DVD.
Create a directory called "test". Has it been succesfully created. Why?. What is the message displayed by the system?

13.- Unmount your DVD.

14.- Display a summarized and human readable report about the file space usage of folders /home, /usr and /bin in your computer. 

15
.- Display now a summarized and readable report about your home directory. Display this information in a  non summarized way.
Redirect this information to a file called duhome.txt. in your home directory. Display this information in a  non summarized and non human readable way.

//------------------------------------------------------------//

PART 2

Help:  a)  http://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html
            b)
http://www.debuntu.org/how-to-create-a-filesystem-within-another-partition-s-file
    
16.- With the help of b)  --> Create a file called virtualfs00 in the /media directory using the command dd and working with /dev/zero. The file size will be 512MB.  Make a ext3 file system in that file. Mount the file system on /media/virt00 (if /media/virt00 does not exist then, make it). Check if the new file system has been mounted. Gain access  to the new file system  and check if there are folders and files. Create a new folder called test. Unmount the new file system.  Check if the new file system has been mounted. Check if you can find the test folder in /media/virt?. What is happennig?.
Mount the file system again. Check if you can find the test folder in /media/virt?. What is happennig?.

17.- With the help of a) --> Create a file called virtualfs01 in the /media directory using the command dd and working with /dev/zero. The file size will be 512MB. Working with fdisk, make  3 partitions. The first one will be a 128MB/active/ext3 paritition. The second one will be a 128MB/FAT32 partition.   The third one will be a 258MB/NTFS partition.  

18.- Umount /media/virt00. Remove virtualfs00 and virtualfs01.

//------------------------------------------------------------//

PART 3

19.- Working with a USB drive:
    a) Plug an empty USB drive. Check the device file associated to the mass storage device. Check the filesystem installed.
    b) Unmount the USB drive.
    c) Delete any partition in your USB driver using fdisk
    d) Create two partitions (same size) in your USB drive using fdisk. The file system type for the first partition will be FAT32 type and second partition will be Linux.
    e) Format the first partition of your USB. The new format will be vfat.
   
f) Format the first partition of your USB. The new format will be ext3.
    g) Mount the first partition on /media/usb1
(if /media/usb1 does not exist then, make it).
    h)
Mount the second partition on /media/usb2 (if /media/usb2 does not exist then, make it).
    i) Check if both file systems have been mounted.
    j) Unmount both file systems. Return back the USB drive to its original condition.