Questions tagged [fstab]

The /etc/fstab file contains static file system information. It normally contains an entry for each partition name or UUID that lists the mount point, filesystem type and mount options.

fstab is an abbreviation of file system table. This file, located in /etc, contains information about static (non variable) file systems. The file is used to find and mount these file systems, at boot or as directed.

The file contains a line for each file system (for example, a drive partition) that gives an identifier, either a label like /dev/sda1 or, better, a UUID, followed by the mount point such as / or /boot/efi or none for a swap partition, the file system type such as ext4, vfat, ntfs, and mount options such as errors=remount-ro, and two numbers, dump and pass

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

Comprehensive information about and examples of fstab can be found in the Ubuntu help wiki fstab page

1454 questions
337
votes
7 answers

How to make partitions mount at startup?

How do you make HDDs and partitions mount at startup on Ubuntu? I always keep my media and data files on separate partitions - one 2tb HDD and a 400 odd gig partition. I have been trying to swap the default folder location for the home directory to…
Harley Baker
  • 3,471
179
votes
2 answers

What do the last two fields in fstab mean?

The last two fields on each line in fstab (dump and pass) are some numbers (usually, 0). What do these numbers mean? # proc /proc proc nodev,noexec,nosuid 0…
elzapp
  • 2,170
137
votes
8 answers

How to mount a new drive on startup

I have recently installed a new hard drive to my Ubuntu 10.0.4 box. I used System -> Administration -> Disk Utils to format the disk (ext4 file type) - but did not create a partition (is this advisable?). I have manually mounted the drive as…
128
votes
5 answers

Mount an external drive at boot time only if it is plugged in

I've got an entry for an external harddrive in my fstab: UUID="680C0FE30C0FAAE0" /jgdata ntfs noatime,rw But sometimes this drive isn't plugged in at boot time. This leaves me half way through a boot, with a prompt to "Continue Waiting,…
Jeremy
  • 2,926
125
votes
9 answers

How to mount a NTFS partition in /etc/fstab?

I have two partitions that I want to mount on startup: /dev/sda3 /mnt/devel ext4 defaults 0 2 /dev/sda2 /mnt/excess ntfs defaults 0 2 The ext4 partition mounts fine (owned by me, writable only by me), but the NTFS mounts owned…
Amanda
  • 9,723
121
votes
2 answers

How can I use RAM storage for the /tmp directory and how to set a maximum amount of RAM usage for it?

After seeing the comment by Anonymous on the question How is the /tmp directory cleaned up?, I found that it would be a great idea to implement on my system, since I have 16GB of RAM and I never used all of it. My temporary files never get written…
Dan
  • 14,180
113
votes
4 answers

How to mount a hard disk as read-only from the terminal

How do you mount a hard disk from the command line as read-only? I don't want or need a link to the man page, I want the exact thing I will have to type in if the following is true: disk to mount is on /dev/sda it is 2 TB -it is critical that I…
wardr
  • 2,429
96
votes
2 answers

Proper fstab entry to mount a samba share on boot?

I am a little confused on the proper fstab entry for a samba share in Ubuntu 12.04 I can get the drive to mount manually by using: sudo mount -t cifs //192.168.2.2/raid_drive /mnt/homeserver -o username=jon,password=password So I tried putting…
jpetersen
  • 5,629
71
votes
1 answer

Adding a new swap file. How to edit fstab to enable swap after reboot?

I've deleted my existing swap partition due to some partitioning problem. I don't have a swap space now so I've created a swap file with: dd if=/dev/zero of=/root/myswapfile bs=1M count=1024 Here's after swapon -s: /root/myswapfile file …
jojo
  • 951
62
votes
4 answers

How do I avoid the "S to Skip" message on boot?

After upgrading my laptop from karmic to lucid, my fat32 partition won't mount automatically. I get the message: The disk drive for /osshare is not ready yet or not present Continue to wait; or Press S to skip mounting or M for manual…
Marty
  • 2,185
59
votes
5 answers

Mount USB drive with write permissions for everyone or specific user

I know there are similar questions but I get some specific problem I can't overcome. I have: HDD split into two partitions. /dev/sdb1 and /dev/sdb2. sdb1 is NTFS and I don't need it. I need sdb2 which is fat32. Ubuntu 12.04.1 LTS (server) I…
53
votes
3 answers

Where can I find the mount point for SMB shares in 13.04?

In older Ubuntu releases, you were able to access the SMB shares mounted with Nautilus by going into the ~/.gvfs/ directory. I found it very convenient, since I like to use Nautilus to mount the shares, but do all disk operations (copy, mv, find…
January
  • 37,208
52
votes
2 answers

How do I create and tune an ext4 partition from the command-line?

PARTITIONING (e.g. fdisk) What are some useful commands used for partitioning an additional hard drive from the command-line? Since most published guides steer towards GParted and other graphical utilities, a summary of some command-line sequences…
gth
  • 1,443
  • 1
  • 12
  • 15
52
votes
4 answers

How do I mount a CIFS share via FSTAB and give full RW to Guest

I want to create a Public folder that has full RW access. The problem with my configuration is that Windows users have no issues as guests (they can RW and Delete), my Ubuntu client can't do the same. We can only write and read, but not create or…
Kendor
  • 4,928
48
votes
2 answers

What is the difference between /etc/fstab and /etc/mtab?

Both /etc/mtab and /etc/fstab contain data about mounted volumes, for example: /etc/mtab /dev/xvda1 / ext4 rw,discard 0 0 proc /proc proc rw,noexec,nosuid,nodev 0 0 ... /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults,discard 0…
Adam Matan
  • 12,919
1
2 3
96 97