Do i really have to mount my every partition first to use them??
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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..
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
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.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
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'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.
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.
Forget what you think you know about windows, and your life will be easier.
Quote:
Originally Posted by QueenZ
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
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.