This example provides a configuration model for the /etc/fstab file.
This example s made of 2 files:
The goal of this example is to be (relatively) easy to understand, not to be complete.
Note that you need to compile the module (perl Makefile.PL && make) to run the example, but you don't need to install the module.
Feel free to send me any modifications or enhancement of this example.
You can extract a minimal set of information from the model to
re-create a minimal version of fstab file. For instance:
proc /proc proc defaults 0 0 /dev/sda1 / ext3 defaults,errors=remount-ro 0 1 /dev/sda9 /home ext3 defaults 0 2 /dev/sda8 /tmp ext3 defaults 0 2 /dev/sda5 /usr ext3 defaults 0 2 /dev/sda6 /var ext3 defaults 0 2 /dev/sda7 none swap sw 0 0 /dev/hdc /media/cdrom0 iso9660 noauto,user,ro 0 0 /dev/fd0 /media/floppy0 vfat noauto,user,rw 0 0 /dev/sdb2 /mnt/gros ext3 defaults 0 0 /dev/sdb3 /mnt/big ext3 defaults 0 0 /dev/sdc1 /media/usb0 auto noauto,user,rw 0 0 /dev/hdc /media/cdrom auto noauto,user 0 0
Or, you can produce an file with comments:
# 'proc' file system: Kernel info through a special file system # * option 'defaults' effect: option equivalent to rw, suid, dev, exec, # auto, nouser, and async proc /proc proc defaults 0 0 # 'ext3' file system: Common Linux file system with journalling # (recommended) # * option 'defaults' effect: option equivalent to rw, suid, dev, exec, # auto, nouser, and async /dev/sda1 / ext3 defaults,errors=remount-ro 0 1 # 'ext3' file system: Common Linux file system with journalling # (recommended) # * option 'defaults' effect: option equivalent to rw, suid, dev, exec, # auto, nouser, and async /dev/sda9 /home ext3 defaults 0 2 # 'ext3' file system: Common Linux file system with journalling # (recommended) # * option 'defaults' effect: option equivalent to rw, suid, dev, exec, # auto, nouser, and async /dev/sda8 /tmp ext3 defaults 0 2 # 'ext3' file system: Common Linux file system with journalling # (recommended) # * option 'defaults' effect: option equivalent to rw, suid, dev, exec, # auto, nouser, and async /dev/sda5 /usr ext3 defaults 0 2 # 'ext3' file system: Common Linux file system with journalling # (recommended) # * option 'defaults' effect: option equivalent to rw, suid, dev, exec, # auto, nouser, and async /dev/sda6 /var ext3 defaults 0 2 /dev/sda7 none swap sw 0 0 # 'iso9660' file system: CD-ROM or DVD file system # * option 'user' effect: user can mount the file system # * option 'ro' effect: read-only file system /dev/hdc /media/cdrom0 iso9660 noauto,user,ro 0 0 # 'vfat' file system: Older Windows file system often used on removable # media # * option 'user' effect: user can mount the file system /dev/fd0 /media/floppy0 vfat noauto,user,rw 0 0 # 'ext3' file system: Common Linux file system with journalling # (recommended) # * option 'defaults' effect: option equivalent to rw, suid, dev, exec, # auto, nouser, and async /dev/sdb2 /mnt/gros ext3 defaults 0 0 # 'ext3' file system: Common Linux file system with journalling # (recommended) # * option 'defaults' effect: option equivalent to rw, suid, dev, exec, # auto, nouser, and async /dev/sdb3 /mnt/big ext3 defaults 0 0 # 'auto' file system: file system type is probed by the kernel when # mounting the device # * option 'user' effect: user can mount the file system /dev/sdc1 /media/usb0 auto noauto,user,rw 0 0 # 'auto' file system: file system type is probed by the kernel when # mounting the device # * option 'user' effect: user can mount the file system /dev/hdc /media/cdrom auto noauto,user 0 0