LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fstab doubt. (https://www.linuxquestions.org/questions/linux-newbie-8/fstab-doubt-825682/)

t1nm@n 08-11-2010 09:31 PM

Fstab doubt.
 
Hello.. in ubuntu in the places bar we see our windows partitions and is mostly mounted in the /media directory...

however when i edit the fstab file in /etc ican setit to mount in /mnt/sdXX folders...
i was just wondering after i do the above when i click on the partitions in places menu it takes me to /mnt/sdXX ... i wanted to know how that works.... how the menu updates itself...

Also just wondering if gnome latest is better than the older versions...like i love gnome in hardy but in lucid it's slaggy.... so i'm in xfce now..

joec@home 08-11-2010 10:54 PM

In Linux when you are changing options in fstab, it is very similar to how Windows assigns drive letters to logical drives. Of course in windows we are so used to seeing C: D: and so on. In Linux everything starts with "/". The "/" is a partition. Perhaps you may have a separate "/boot/" partition. So lets say we have a SCSI based hard drive and we will call that "/dev/sda" which is short for "Device SCSI Drive - A"

So the first partition would be /dev/sda1 and that would be mounted on "/" Then we would have a second partition called /dev/sda2. In "/" we create a folder called "/boot/" and then in fstab mount "/dev/sda2" on "/boot/". I am not going into the exact details of how to program fstab and then run the mount commands but rather just trying to explain the features. This would look something like the following:

/dev/sda1 / ext3 defaults,usrquotea 1 1
/dev/sda2 /boot ext3 defaults,usrquotea 1 1

So now when you change directories in Linux you are seamlessly changing drives. We can even make a network mount from a windows share and mount it as "/home2/". Now we are crossing drives from different computers without even knowing it.

//12.34.56.78/myshare /home2 cifs auto,user,username=_windows_user_name_,password=_windows_password_,uid=0,gid=0,file_mode=0777,dir_mo de=0777,rw 0 0

Just remember that mounts happen on top of directories. So for example if we unmounted /home2/ the folder would still exist on "/" which is the /dev/sda1 partition. If we write to "/home2/" with the network shar unmounted it will take disk space on "/dev/sda1". If we mount the network share the files are still there, you just can not access them as the path to "/home2/" no longer leads to the same drive, much less the same computer. You would need to unmount the network drive again to move the files somewhere else so as to not waste drive space. That or you now have a very sneaky way of hiding backup files.


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