---
# System prepended metadata

title: LF - Exercises 5

---

# LF - Exercises 5 

##### 1. Create an ext4 partition of 512MB in your instances, it should mount automatically in every boot at `/home/vagrant/<yourName-lastName>.`

![](https://i.imgur.com/TUIwtXR.png)

![](https://i.imgur.com/ZH3zMMF.png)

To mount automatically edit `/etc/sftab`

![](https://i.imgur.com/heAXWba.png)


##### 2. Write a small document on what are the available options that can be included in fstab for a partition (all the things that go after the mount point; check in man pages sections).


The  file  fstab  contains  descriptive  information about the various file systems.  fstab is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file.  Each filesystem is  described on  a  separate line; fields on each line are separated by tabs or spaces.  Lines starting with '#' are comments, blank lines are ignored. The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing.

![](https://i.imgur.com/eMHV4eO.png)


- The first field (device)
- The second field (mounting_directory)
- Third field (filesystem_type), in this case it is `ext4`
- The fourth field (options), Describes the mount options.

    + auto and noauto : auto specifies that the device/partition should be automatically mounted on boot time and ‘noauto’ specifies that the device should be explicitly mounted. When you execute ‘mount –a’ all partition that has ‘auto’ value set will get mounted automatically. The root partitions should have the ‘auto’ option set so that the partition will get mounted automatically.

    + exec and noexec : The option ‘exec’ specifies that the files residing in that device will be able to execute and ‘noexec’ remove the execute feature. The partitions which are intended to keep non executable files like /var or /tmp can have noexec feature enabled for better security.

    + user and nouser : The ‘user’ option specifies that the users will be able to mount the partitions and ‘nouser’ specifies that only root user can mount any partitions. The ‘user’ option should be set for devices like ‘floppy or cdrom’ so that the users will be able to mount the device rather than being root.
    + Defaults: The normal default for Ext3 file systems is equivalent to rw,suid,dev,exec,auto,nouser,async(no acl support).
    
- The fifth field (dump), Specifies the option that need to be used by the dump (backup utility) program. If the value is set to 0, then the partition is excluded from taking backup and if the option is a nonzero value, the filesystem will be backed up.
- The sixth field (fsck), hat is if the value is set to zero, the device or partition will be excluded from fsck check and if it is nonzero the fsck check will be run in the order in which the value is set. The root partition will have this value set to one (1) so that it will be checked first by fsck. If you set to two (2) that means the system to do fsck on all rest partition marked '2' in sequence on system reboot.


