Help to understand how to automount a usb ntfs hard drive
Hi everyone
(Using ubuntu 9.04) Sorry to post this one up, but I've have googled and still don't quite understand fstab and I really don't want to trash my system! I have an external usb hard drive I want to automount on bootup / startup. Not 100% sure of the best / safest way: here is some info on my drives Code:
sudo fdisk -l Thanks every so much. |
Well, if the device is always going to be at /dev/sdb1 (Think hard about what I am suggesting here).
You could put this in your /etc/fstab Code:
/dev/sda2 /mnt/wherever ntfs-3g defaults Code:
UUID=7591fe5b-8907-406f-854e-321684957104 /mnt/wherever ntfs-3g defaults Or use the LABEL: Code:
LABEL=Mybook /mnt/wherever ntfs-3g defaults The directory /mnt/wherever needs to exist and have appropriate permissions for your security policy. Perms = 777 if you don't care who can read / write the drive. Eg (as root) Code:
mkdir /mnt/Mybook As usual with linux, there are many ways to achieve what you need. udev is great for handling this sort of thing (especially if you have multiple drives / USB things that you want to plug in and out, and always have them appear at a sensible, known mountpoint). See here: http://www.reactivated.net/writing_udev_rules.html Have fun and welcome to LQ! |
Thanks Tredegar
Thanks for excellent reply! It has helped a lot. I have used the first suggestion in the post and it automounts perfectly. I will get around to using the uuid as I will probably add more drive in the future. Changing the permissions to enable sharing with other computers was a good call as well, I had not thought of that but I will probably do that in the near future. Thanks again! :D
|
All times are GMT -5. The time now is 02:53 AM. |