Solved

Mounting free space

Posted on 2002-03-16
3
261 Views
Last Modified: 2010-08-05
Hi folks, I have created the dir /mnt/free-space and I'm trying to have it mount on boot up.
My problem is what do I call it and what do I set the file type to, the line that I tried caused an error and I had to go in and delete the entry in vi as it booted up.
Said line:-
/dev/hda   /mnt/free-space    auto   defaults  1 2
My understanding of it is this.
/dev/hda  :first hard drive, I wasn't sure which partition to give it, I tried 7 which was the next free number unused.
/mnt/free-space  :Directory into which the partition is read.
auto  :Seeing as it is free space I thought the system would be able to work it out, as its unformatted as yet
defaults  :My understanding of this is the different types of installed systems that it will accommodate
1 2   :I'm not to sure here apart from a guess that its to do with the order in which the devices are mounted.
Any help would be greatly appreciated.
Your friendly bushranger,
Ned Kelly
0
Comment
Question by:Ned_Kelly
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 25 total points
ID: 6871494
Before you can mount something that something has to contain a valid file system. In this case I assume that you have some extra space available on your boot disk that you'd like to use. The first step in making that available to the system will be to create a partion that occupies the free space with fdisk or disk druid. Once you have a partion you'll what the partition number is (7 from what you say in the question) and  can make a Linux file system with 'mkfs /dev/hda7'. Then you'll be able to mount the file system by adding:

/dev/hda7  /mnt/free-space  auto defaults 1 2

to /etc/fstab. Note that you can manually mount it with 'mount /dev/hda7 /mnt=free-space'.
0
 

Author Comment

by:Ned_Kelly
ID: 6871523
Thanks jlevie, this would explain the error I was getting on boot. Any knowledge to fill fill in the gaps on the last three entries in the line please.
Regards
Ned
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6871604
On the assumption that your question is about the line that goes into /etc/fstab...

The first field is the block special device that contains the filesystem to be mounted.

The second field specifies where the filesystem is to be mounted.

The third field specifies the type of filesystem. You can explicitly specify one of the supported types (ext2, ext3, nfs, etc) or use auto and let mount figure it out from what it sees on the filesystem.

The fourth field is used to specify mount options to be used when mounting the filesystem. The list of available options is dependant on what kind of filesystem is being mounted. 'defaults' simply says to use the default options for whatever filesystem is mounted.

The fifth field is used to enable/disable dumping of filesystems by the dump command. A value of 1 enables dumps and a value of 0 disables them.

The sixth and last field determines where in the fsck sequence this file system is to be checked.

All of this, and much more, can be found in the man page for fstab (man fstab).



0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question