Contents
|
The Winter Sale 2018 is upon us, and with it comes 75% off all Mount & Blade titles. The sale ends on the 3rd of January, so don't miss out on your chance to complete your collection at a massively discounted price!
The configuration file /etc/fstab contains the necessary information to automate the process of mounting partitions. In a nutshell, mounting is the process where a raw (physical) partition is prepared for access and assigned a location on the file system tree (or mount point).
- In general fstab is used for internal devices, CD/DVD devices, and network shares (samba/nfs/sshfs). Removable devices such as flash drives *can* be added to fstab, but are typically mounted by gnome-volume-manager and are beyond the scope of this document.
- Options for mount and fstab are similar.
- Partitions listed in fstab can be configured to automatically mount during the boot process.
- If a device/partition is not listed in fstab ONLY ROOT may mount the device/partition.
- Users may mount a device/partition if the device is in fstab with the proper options.
For usage with network shares, see SettingUpNFSHowTo , SettingUpSamba and SSHFS.
The syntax of a fstab entry is :
fields | description |
<device> | The device/partition (by /dev location or UUID) that contain a file system. |
<mount point> | The directory on your root file system (aka mount point) from which it will be possible to access the content of the device/partition (note: swap has no mount point). Mount points should not have spaces in the names. |
<file system type> | Type of file system (see LinuxFilesystemsExplained). |
<options> | Mount options of access to the device/partition (see the man page for mount). |
<dump> | Enable or disable backing up of the device/partition (the command dump). This field is usually set to 0, which disables it. |
<pass num> | Controls the order in which fsck checks the device/partition for errors at boot time. The root device should be 1. Other partitions should be 2, or 0 to disable checking. |
Please refer to the examples section for sample entries. Easeus data recovery wizard 11.6 serial key. We have provided you some detailed explanations of each field:
Device
By default, Ubuntu now uses UUID to identify partitions.
UUID=xxx.yyy.zzz
To list your devices by UUID use blkid
Alternative ways to refer to partitions:
- Label : LABEL=label
- Network ID
- Samba : //server/share
- NFS : server:/share
- SSHFS : sshfs#user@server:/share
- Device : /dev/sdxy (not recommended)
Mount point
Mount & Blade Cd-key
A mount point is a location on your directory tree to mount the partition. The default location is /media although you may use alternate locations such as /mnt or your home directory.
You may use any name you wish for the mount point, but you must create the mount point before you mount the partition.
For example : /media/windows
File System Type
You may either use auto or specify a file system. Auto will attempt to automatically detect the file system of the target file system and in general works well. In general auto is used for removable devices and a specific file system or network protocol for network shares.
Examples:
- auto
- vfat - used for FAT partitions.
- ntfs, ntfs-3g - used for ntfs partitions.
- ext4, ext3, ext2, jfs, reiserfs, etc.
- udf,iso9660 - for CD/DVD.
- swap.
Options
Options are dependent on the file system.
You may use 'defaults' here and some typical options may include :
- Ubuntu 8.04 and later uses relatime as default for linux native file systems. You can find a discussion of relatime here : http://lwn.net/Articles/244829. This relates to when and how often the last access time of the current version of a file is updated, i.e. when it was last read.
- defaults = rw, suid, dev, exec, auto, nouser, and async.
- ntfs/vfat = permissions are set at the time of mounting the partition with umask, dmask, and fmask and can not be changed with commands such as chown or chmod.
- I advise dmask=027,fmask=137 (using umask=000 will cause all your files to be executable). More permissive options would be dmask=000,fmask=111.
- For mounting samba shares you can specify a username and password, or better a credentials file. The credentials file contains should be owned by root.root with permissions = 0400 .
Common options :
- sync/async - All I/O to the file system should be done (a)synchronously.
- auto - The filesystem can be mounted automatically (at bootup, or when mount is passed the -a option). This is really unnecessary as this is the default action of mount -a anyway.
- noauto - The filesystem will NOT be automatically mounted at startup, or when mount passed -a. You must explicitly mount the filesystem.
- dev/nodev - Interpret/Do not interpret character or block special devices on the file system.
- exec / noexec - Permit/Prevent the execution of binaries from the filesystem.
- suid/nosuid - Permit/Block the operation of suid, and sgid bits.
- ro - Mount read-only.
- rw - Mount read-write.
- user - Permit any user to mount the filesystem. This automatically implies noexec, nosuid,nodev unless overridden.
- nouser - Only permit root to mount the filesystem. This is also a default setting.
- defaults - Use default settings. Equivalent to rw, suid, dev, exec, auto, nouser, async.
- _netdev - this is a network device, mount it after bringing up the network. Only valid with fstype nfs.
For specific options with specific file systems see:
- man mount
Dump
This field sets whether the backup utility dump will backup file system. If set to '0' file system ignored, '1' file system is backed up.
Dump is seldom used and if in doubt use 0.
Pass (fsck order)
Fsck order is to tell fsck what order to check the file systems, if set to '0' file system is ignored.
Often a source of confusion, there are only 3 options :
- 0 do not check.
- 1 check this partition first.
- 2 check this partition(s) next
In practice, use '1' for your root partition, / and 2 for the rest. All partitions marked with a '2' are checked in sequence and you do not need to specify an order.
Use '0' to disable checking the file system at boot or for network shares.
You may also 'tune' or set the frequency of file checks (default is every 30 mounts) but in general these checks are designed to maintain the integrity of your file system and thus you should strongly consider keeping the default settings.
The contents of the file will look similar to following:
NOTE: These network share examples (samba, nfs, and sshfs) assume you have already set up the appropriate server.
File System Specific Examples
Here are a couple of basic examples for different file system types. I will use /dev/sdb1 or /dev/hda2 for simplicity, but remember that any /dev location, UUID=<some_id>, or LABEL=<some_label> can work.
Extended file systems (ext)
Specifically, these are the ext2, ext3, and ext4 filesystems that are common as root filesystems in Linux. The main difference between ext2 and ext3 is that ext3 has journaling which helps protect it from errors when the system crashes. The more modern ext4 supports larger volumes along with other improvements, and is backward compatible with ext3.
A root filesystem:
A non-root file system, ext2:
File Allocation Table (FAT)
Specifically, fat16 and fat32, which are common for USB flash drives and flash cards for cameras and other devices.
New Technology File System (NTFS)
NTFS is typically used for a Windows partition.
For a list of locales available on your system, run
Hierarchical File System (HFS)
HFS, or more commonly, HFS+, are filesystems generally used by Apple computers.
For Read/Write mounting:
Note: if you want to write data on this partition, you must disable the journalization of this partition with diskutil under Mac OS.
For Read only:
Note: if you want to have access to your files on Ubuntu, you must change the permission of the folders and contained files you want to access by doing in the apple terminal:
'Staff' group should have appeared in this folder's info. You can do this on Music and Movies to access these files from Ubuntu.
Please, before you edit system files, make a backup. The -B flag with nano will make a backup automatically.
To edit the file in Ubuntu, run:
To edit the file in Kubuntu, run:
To edit the file directly in terminal, run:
- -B = Backup origional fstab to /etc/fstab~ .
- -w = disable wrap of long lines.
Alternate:
Useful Commands
To view the contents of /etc/fstab, run the following terminal command:
To get a list of all the UUIDs, use one of the following two commands:
To list the drives and relevant partitions that are attached to your system, run:
To mount all file systems in /etc/fstab, run:
Mount And Blade Keys
Remember that the mount point must already exist, otherwise the entry will not mount on the filesystem. To create a new mount point, use root privileges to create the mount point. Here is the generalization and an example:
Add Mount Blade Serial Key On Steam
Here are some more links for your convenience:
- UsingUUID
- How to fstab (from the Ubuntu Forums)
- http://en.wikipedia.org/wiki/Fstab
- SettingUpNFSHowTo
- SettingUpSamba
- LinuxFilesystemsExplained
- AutomaticallyMountPartitions
- HowtoPartition