Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Where do you configure or what command do I use to mount device at boot? Is it in the file /etc/fstab ?

share|improve this question
add comment

migrated from serverfault.com Nov 19 '11 at 19:02

This question came from our site for professional system and network administrators.

1 Answer

up vote 5 down vote accepted

You need to make an entry in your /etc/fstab for the device that you want to mount at boot. The exact entry depends on the device you are mounting and the options you want to have applied. The format of the file is

<device> <mountpoint> <filesystemtype> <options> <dump> <fsckorder>

A basic example would be

/dev/sda1 /boot ext3 defaults 0 0

This will mount the device known as sda1 (First partition on the first SCSI subsystem block device) on /boot using the ext3 filesystem and default options.

A more advanced example is:

UUID=8ade7eb7-dcaf-4e1b-869a-72f3a6f46205 / ext3 relatime,errors=remount-ro 0 1

This will mount the partition/device with the UUID show above as the root filesystem. This is often used with multipath devices. The relatime option modifies how the access time is set on the file.

The manpage on your local system is the best resource for options:

man 5 fstab
man 8 mount
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.