Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to ubuntu, and I would need you guys help.

I installed Ubuntu Server 10.04 64-bit, and I would like to know:

What are the commands to add an additional file system and make sure it mount at the boot time. Lets say I want to make it on /newContent directory?

And on the root disk, I would like to create 2 additional directories called /myBackup and /myDatabases?

share|improve this question
You asekd the same question 3 times in one day: – con-f-use Aug 3 '11 at 11:23
Closed the duplicates now. Please don't do that @ubuntuka. – Stefano Palazzo Aug 3 '11 at 12:20
@con-f-use: I was originally ask the question here:…, some one ask me to separate into smaller question, and I did. Then now you said i ask the same thing? Who should I follow? None of my questions are answered, is this how ubuntu community treat new user? And sir, instead of posting 3 same comments, why dont you answer any one of my question since u said its the same? – ubuntuka Aug 3 '11 at 14:46
@con-f-use: You are saying those questions are same? Now answer those questions, indicate which question you answer and see if your answers are correct. If the community up-votes your answer, I will kneel down and apologize to you. – ubuntuka Aug 3 '11 at 14:50
@ubuntuka: Hey, no offense! If these questions were really different, do explain in detail that they mean something different, and this will be respected. Misunderstanding happens sometimes here, but there is no need to get angry. Nobody wants to bully you, but we are trying to keep thing clean and organized here. Having lot of people suggesting what to do may be confusing, so just keep patient. And by the way welcome to AskUbuntu! :) – Rafał Cieślak Aug 3 '11 at 19:34
up vote 6 down vote accepted

Creating the Directories

To create the toplevel directories run:

sudo mkdir /myBackup /myDatabases

You may also want to make yourself the owner of these folders:

sudo chown -R ubuntuka:ubuntuka /myBackup /myDatabases

(replace ubuntuka with your user name)

Choosing a Partition

You can list the available partitions using this command:

sudo fdisk -l

Each partition will have a location like /dev/sda1. Choose the partition you want to automount and remember this location.

Finding Partition Information

You now need to find the UUID (unique identification) of the partition and the filesystem type. To do this, use the udisks command. I can't remember if this is installed by default but if it isn't, run:

sudo apt-get install udisks

to install it.

Finding the UUID

To get the UUID (of /dev/sda1 in this example), run:

udisks --show-info /dev/sda1 | grep uuid

You will get output like:

    by-id:                     /dev/disk/by-uuid/228EF188-BDEE-11E0-8F41-F5A84824019B
 uuid:                        228EF188-BDEE-11E0-8F41-F5A84824019B

where 228EF188-BDEE-11E0-8F41-F5A84824019B is the UUID.

Finding the Filesystem Type

To get the filesystem type of the partition (/dev/sda1 in the example), run:

udisks --show-info /dev/sda1 | grep type

You will get output like:

  type:                        ext4
    type:                      0x83

where ext4 is the filesystem type.

Backing up fstab

To get partitions to mount on boot, you need to edit /etc/fstab. This file is pretty vital for the use of your computer so you should back up the current version whenever you make a change.

To do this, you can run:

sudo cp -v "/etc/fstab" "/etc/fstab-$(date +%s)"

You will get output like this:

`/etc/fstab' -> `/etc/fstab-1312389815'

For this example, to restore the old settings run:

sudo cp -v "/etc/fstab" "/etc/fstab-$(date +%s)" && sudo cp -v /etc/fstab-1312389815 /etc/fstab 

Editing fstab

To edit /etc/fstab, run:

sudo nano /etc/fstab

To add an automounted partition, add a line like this:

UUID=228EF188-BDEE-11E0-8F41-F5A84824019B /myBackup ext4 defaults 0 0

and press Ctrl+O to save. This example would automount /dev/sda1 to /myBackup. You will need to replace 228EF188-BDEE-11E0-8F41-F5A84824019B, /myBackup and ext4 with the respective UUID, mountpoint and filesystem type of the partition.


You don't need to reboot to test this out. Instead, run:

sudo mount -a

You should then test to see if the contents of the directories are as you expected.

share|improve this answer
Thank you for the answer. I respect your time of writing the answer despite the question is downvoted twice (they keep saying the questions are the same, then comment and closed) – ubuntuka Aug 3 '11 at 17:48
i would just like to point out that you can use blkid to get UUID's of partitions. note that you have to run it as a super user – josh-fuggle Aug 3 '11 at 22:58

install ntfs-config

sudo apt-get install ntfs-config

It will help to add additional filesystem in fstab. Don't forget to check internal and external write option.

Note: if you are using 11.04 then run ntfs-config in terminal. it will show an error : some directory does not found. Just create the directory first.

share|improve this answer

Your Answer


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.