LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   why can't I mount a device automatically when logging in? (https://www.linuxquestions.org/questions/linux-software-2/why-can%27t-i-mount-a-device-automatically-when-logging-in-689971/)

cricketlong 12-11-2008 10:45 PM

why can't I mount a device automatically when logging in?
 
I appended a line written bellow to the file "/etc/fstab" in Ubuntu 8.04:
/dev/sda5 /mnt/windows_D vfat silent,uid=1000,utf8 0 0

but there is nothing in the directory "/mnt/windows_D" after I rebooted.And if I click on the volumn(/dev/hda5),an error box showing "You are not privileged to mount the volumn" appears.

But if I mount the device with command "sudo mount /dev/hda5 /mnt/windows_D" in terminal,it succeeded.

How should I make the volumn automatically mounted by system when logging in?

Any help would be appreciated.

IMNOboist 12-11-2008 11:52 PM

Have you tried this:
/dev/sda5 /mnt/windows_D vfat defaults 0 0

And you don't need to reboot to check if it works. Just do:
sudo mount -a

linuxlover.chaitanya 12-11-2008 11:57 PM

You need to be a super user to use mount command in Ubuntu Hardy and for that matter in most of the distros. Hence using sudo works. Just edit the fstab file as advised in the earlier post and reply if it works out.

cricketlong 12-14-2008 12:55 AM

I tried "/dev/sda5 /mnt/windows_D vfat defaults 0 0"
but it was the same as I used "/dev/sda5 /mnt/windows_D vfat silent,uid=1000,utf8 0 0"

but I can mount NTFS volumn automatically when logging in with the following line:
/dev/sda6 /mnt/windows_E ntfs-3g silent,unmask=0,locale=utf8 0 0


Thanks to all

linuxlover.chaitanya 12-14-2008 06:33 AM

Go through the logs and tell if there is some error.......if some post it.

cricketlong 12-19-2008 03:36 AM

which log file contains the info about mounting a device?

cricketlong 12-20-2008 10:31 PM

it is OK now.
That was my mistake.
I made a invalid option in the line "/dev/sda5 /mnt/windows_D vfat default 0 0".
It should be "/dev/sda5 /mnt/windows_D vfat defaults 0 0"

Thanks to all!!!


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