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.
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.
Just wondering if there could be some program to manage partition mounting..
It depends what do you mean.
For permanent mounts (i.e. non removable devices) the best bet is always to use fstab to mount them at bootup.
The rest of devices (removable disks, pendrives, optical disks like cdrom or dvd, etc) you can as well have an entry on fstab for them, and then just mount them with a simple command.
There are also desktop applets that can do this and there are also desktops like kde and gnome which have their own way to deal with devices and can even automount. It all depends on the concrete problem I guess.
Some people do like automounting, and you shouldn't have a problem with that if you use any of the major desktops. Some others like me do not like automount, and prefer to mount the drives manually in one or another way.
In either case, having a correct entry for every disk on your fstab never hurts.
OK. So “f8cbec94-b273-45e1-9b00-34aad25ccf0b” is sda4's UUID.
Open a terminal window (such as Konsole or Gnome-terminal), and become root by entering the command “su - root” and then providing root's password. Then, execute this command:
This will append three lines to your /etc/fstab, that will make sda4 be mounted automatically on next reboot exactly the same way sda2 is (alternatively, those three lines can be added by editing the file with “sudo kedit /etc/fstab”). You can see I chose /mnt/sda4 as a mount point but you can change that if you want. Whatever the name, the directory has to exist, so, still as root, in the same terminal window for example, run this command:
Code:
mkdir /mnt/sda4
Now if you don't want to wait for the next reboot to have access to the files in this partition, you can immediately mount the filesystem with (still as root):
Code:
mount /mnt/sda4
One small thing though… I've heard all sort of things about the root account on Ubuntu but I*never used it. If the “su - root” command doesn't prompt for a password, or if you don't know this password, then it is worth trying to use this command instead: “sudo su root”.
Yves.
Last edited by theYinYeti; 02-19-2009 at 10:07 AM.
queenz@queenz-ubuntu:~$ su -root
su: invalid option -- 'r'
Usage: su [options] [LOGIN]
Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and
keep the same shell
-s, --shell SHELL use SHELL instead of the default in passwd
queenz@queenz-ubuntu:~$ su - root
Password:
su: Authentication failure
queenz@queenz-ubuntu:~$ sudo su root
[sudo] password for queenz:
root@queenz-ubuntu:/home/queenz# mkdir /mnt/sda4
root@queenz-ubuntu:/home/queenz# cat >>/etc/fstab <<-"ENDOFFILE"
>
> # /dev/sda4
> UUID=f8cbec94-b273-45e1-9b00-34aad25ccf0b /mnt/sda4 ext3 relatime,errors=remount-ro 0 1
> ENDOFFILE
root@queenz-ubuntu:/home/queenz# mount /mnt/sda4
mount: wrong fs type, bad option, bad superblock on /dev/sda4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
The good points are:
— The mount command looks at the /etc/fstab. It located the /mnt/sda4 right (hence the associated UUID).
— The mount command finds a UUID in /etc/fstab and reports an error on the /dev/sda4 partition. So the UUID is the good one.
In short, what you did, you did right. Good.
Now the bad point: it doesn't work. I see two possible reasons:
— Either the type isn't good (ie: it is not an Ext3 partition).
— Or the partition isn't formatted at all.
Do you have any clue which is the good one?
What is the output of this command?
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
Quote:
Originally Posted by QueenZ
Wow, you guys really are good at explaining how things work
Just wondering if there could be some program to manage partition mounting..
there is one called webmin that provides a nice web based interface for administering common tasks
however it should be noted that this isn't a substitue for understanding how it works
one if the advantages is if gui programs fail we still have command line and all configuration files are plain text unlike windows where the registry is in a prorpietary binary format and if regedit breaks your outa lukc
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.