LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-18-2009, 10:51 PM   #1
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373
Blog Entries: 2

Rep: Reputation: 32
Do i really have to mount my every partition first to use them??


OK, in windows i have 2 partitions and both can are usable without any mounting, every thing works right after i boot up.

In linux i have 2 partitions and only root partition is mounted when my system starts up.. this is weird.. to use my other partition i have to mount it first, then it shows up in /media and only then i can start using it..

Why is it like that and how can i make it normal?
 
Old 02-18-2009, 11:01 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
It could be that you have no entries for your other partition in /etc/fstab. Partitions listed in /etc/fstab are usually automatically mounted at boot up. Can you post the contents of your /etc/fstab file and the output of running
Code:
sudo fdisk -l
 
Old 02-18-2009, 11:18 PM   #3
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
Here..

Quote:
queenz@queenz-ubuntu:~$ sudo fdisk -l
[sudo] password for queenz:

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x40c132b1

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5894 47340056 7 HPFS/NTFS
/dev/sda2 5895 7175 10289632+ 83 Linux
/dev/sda3 7176 7296 971932+ 5 Extended
/dev/sda4 5894 5894 3467+ 83 Linux
/dev/sda5 7176 7296 971901 82 Linux swap / Solaris

Partition table entries are not in disk order
queenz@queenz-ubuntu:~$
what's /etc/fstab anyway?? I thought all my partitions are in /dev/ o in /media/...
 
Old 02-18-2009, 11:18 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Do i really have to mount my every partition first to use them??
Yes.....


Short answer: Often, Windows is more automated than is Linux. Windows is mounting the partitions--it's just happening behind the scenes.

Look at /etc/fstab---that defines what gets mounted automatically.
 
Old 02-18-2009, 11:21 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by QueenZ View Post
what's /etc/fstab anyway?? I thought all my partitions are in /dev/ o in /media/...
/dev contains the device files (nodes). These are the interfaces to the hardware.

/media is on on the many places where devices get mounted.

To be precise, you mount (connect) a filesystem to a mountpoint. The filesystem lives on a partition (or the whole disk)
 
Old 02-18-2009, 11:26 PM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
what's /etc/fstab anyway?? I thought all my partitions are in /dev/ o in /media/...
Run the command "man fstab" and you will get detailed info about what the file does. The file does not contain devices, but determines which partitions are mounted at bootup, their permissions etc. You forgot to post the contents of your /etc/fstab file like I asked above.
 
Old 02-19-2009, 12:08 AM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
the short answer is fstab is a registry of file systems and where they get mounted
it is a plain text file that can be edited by your favorite text editor such as kwrite or gedit, try opening gedit, opening /etc/fstab with sudo gedit /etc/fstab, look at the syntax and add a line for your new partition
it would look something like

/dev/hda1 /mnt/yadayadyada ext3 defaults 1 2

where hda1 is replaced by the actual partition, ext3 is replaced by what the partition is formated at and yadayadayada is replaced by a subfolder under /mnt
(i would reccomend using /mnt instead of /media since /media if i'm not mistaken is more along the lines of auto mounted stuff like removable media)


here is mine as an example
Code:
UUID=f777440e-82d6-4eb0-b99a-0809e6ea9a5e /                       ext3    defaults        1 1
UUID=bbe33dc3-0a1d-43cb-8874-c907b4954129 /mnt/videos             ext3    defaults        1 2
UUID=be289d03-6937-4fb4-baa0-9034a0b70722 /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
UUID=8f14d31e-7c39-40ef-ba63-76ef5ad0426f swap                    swap    defaults        0 0
/dev/sdc1	/mnt/music	ext3	defaults	1 2
/dev/sdd1	/mnt/storage	ext3	defaults	1 2

Last edited by frieza; 02-19-2009 at 12:10 AM.
 
Old 02-19-2009, 04:59 AM   #8
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
My /etc/fstab...

Quote:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda2
UUID=b414c172-c717-4908-8bcd-3060cec08864 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=57bc2b98-6257-4270-8a8e-000c4c0ac505 none swap sw 0 0
 
Old 02-19-2009, 06:28 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by QueenZ View Post
My /etc/fstab...
And?????
You were given a whole bunch of suggestions, information, etc. What is your current status? e.g. have you tried editing fstab?
 
Old 02-19-2009, 06:38 AM   #10
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
Quote:
Originally Posted by pixellany View Post
And?????
You were given a whole bunch of suggestions, information, etc. What is your current status? e.g. have you tried editing fstab?
I'm too afraid to do that.. i might mess something up.. but maybe i'll try..
 
Old 02-19-2009, 06:49 AM   #11
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: PeppermintOS
Posts: 387
Blog Entries: 74

Rep: Reputation: 81
Here's my fstab

Here's my fstab. The last entry before the dynamic section is the Vista partition of my dual boot setup. Hope that gives a bit of guidance as to what you're aiming at.

Code:
# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda6 / ext3 defaults,noatime 1 1
/dev/sda5 swap swap sw,pri=1 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs devmode=0666 0 0
devpts /dev/pts devpts mode=0622 0 0
sysfs /sys sysfs defaults 0 0
/dev/sda7 /home auto defaults,noatime 1 2
/dev/sda3 /mnt/sda3 ntfs-3g rw,users,auto,umask=000 0 0
# Dynamic entries below
/dev/sda1 /mnt/sda1 vfat noauto,users,gid=users,dmask=002,fmask=113,relatime 0 0
/dev/sda2 /mnt/sda2 ntfs-3g noauto,users,gid=users,dmask=002,fmask=113,relatime 0 0
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/scd0 /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
 
Old 02-19-2009, 06:52 AM   #12
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by QueenZ View Post
I'm too afraid to do that.. i might mess something up.. but maybe i'll try..
cp /etc/fstab /etc/fstab.bak

Worse come to worse you can use a live cd, single user mode or something to that effect to overwrite /etc/fstab with the back-up file so if you mess something up it's easily reversable.
 
Old 02-19-2009, 07:22 AM   #13
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Forget what you think you know about windows, and your life will be easier.

Quote:
Originally Posted by QueenZ View Post
OK, in windows i have 2 partitions and both can are usable without any mounting, every thing works right after i boot up.
Windows automount the partitions, that doesn't mean they are not mounted, they are, just like in linux. Mounting a partition or disk means that the OS is aware of the fs inside, and provides a way to access them in a logical manner, and not just as a raw sequence of bytes. In windows when a drive is mounted it's associated to a "drive letter", in linux it is associated to an arbitrary directory in your filesystem, which is called "mount point". This mechanism is way more flexible and you can decide what to mount, what not to mount, and HOW you want it to be mounted. In windows you can't for the most part.

Quote:
In linux i have 2 partitions and only root partition is mounted when my system starts up.. this is weird.. to use my other partition i have to mount it first, then it shows up in /media and only then i can start using it..

Why is it like that and how can i make it normal?
Quote:
Originally Posted by QueenZ View Post
what's /etc/fstab anyway?? I thought all my partitions are in /dev/ o in /media/...
/etc/fstab is the configuration file which controls what is mounted, how is it mounted, and even when it is mounted, besides other properties and options that are fs specific.

This /media thing is something that someone reinvented for I-don't-know-what-reason. In linux traditionally /mnt/ has been the place where disk are mounted, I have no idea why they reinvented the /media/ dir.

The device nodes (including partitions) are all under /dev, and not /media or /mnt, these only hold mount points (the equivalent to drive letters, which are just empty directories, well, empty until they are mounted and a disk is attached to them).


Quote:
Originally Posted by QueenZ View Post
I'm too afraid to do that.. i might mess something up.. but maybe i'll try..
That's why backups exist.

Read again the posts and use the advice that someone gave you above and read the fstab man page. The mount man page is also a good place to start. After modifying it and before rebooting you can post the modifications here so we can advise you if there's something that's obviously wrong.
 
Old 02-19-2009, 07:58 AM   #14
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
Wow, you guys really are good at explaining how things work

Just wondering if there could be some program to manage partition mounting..
 
Old 02-19-2009, 08:01 AM   #15
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Please be a bit more gentle with QueenZ. He/She obviously is newbie.

So you currently have /dev/sda2 mounted automatically (and /dev/sda5 is swap). Would you be able to tell us what partition you would also want to have automatically mounted*? Refer to the output of fdisk that you pasted in a previous post. Is it /dev/sda1 (should be your Windows C: drive) or is it /dev/sda4 (seemingly another Linux partition)?

As for the mount point, /mnt is usually for permanent storage, and /media is usually for removable (USB, floppy, CD…) media.

Yves.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Mount New Partition JonBL Linux - Software 2 07-12-2007 02:53 AM
installed FC 3 on another partition but can not mount that partition. MurX Fedora 15 02-01-2006 05:28 AM
Cant mount partition bvav22 Linux - Hardware 1 06-05-2005 09:04 PM
How to resize a partition and create/mount a new partition? Maarten_Holland Linux - Newbie 1 04-20-2005 08:56 AM
Why does my XP partition never mount? Kramer Linux - Laptop and Netbook 9 09-26-2003 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration