it is very annoying when simple wm doesn't provide any auto mount module, one has to find a way to mount usb drivers and mobile harddisks. it is even harder when there is a ntfs partitions.
In this page, we basically solve two problems:
1. How to let gentoo recognize ntfs partition?
2. How to auto mount usb and mobile hard disks?
For the first question, there are two steps:
step 1:
let kernel support fuse:
enable
File Systems->Fuse (file system in userpsace), make it as module
step 2:
install ntfs3g
# emerge -a ntfs3g
For the second question, edit the following in
/etc/fstab
/dev/sda1 /boot ext4 noauto,noatime 1 2
/dev/sda2 / ext4 noatime 0 1
/dev/sda7 none swap sw 0 0
/dev/sda6 /home ext4 defaults 0 2
# for sandisk usb driver noauto means it will not be mounted automatically, which is to avoid error if it is not mounted
/dev/sdc1 /mnt/sandisk auto noauto,users,noatime,umask=0 0 0
# for mobile hard disk
UUID="333c9d2f-1c2a-482e-83f7-616fa45a478a" /mnt/MobiC ext4 auto,rw,users,exec,nofail 0 0
UUID="D0CC0864CC0846E6" /mnt/MobiD ntfs-3g rw,suid,dev,exec,async,auto,users,nofail 0 0
# for scientific linux
/dev/sda8 /home/chenming/SL ext4 rw,users,exec 0 0
# for Lubuntu
/dev/sda10 /home/chenming/Lubuntu ext4 rw,users,exec 0 0
# for slackware
/dev/sda5 /home/chenming/Slackware ext4 rw,users,exec 0 0
# the local ntfs driver
/dev/sda9 /home/chenming/ntfs ntfs-3g defaults 0 0
sda2, sda7, sda6 are all for systems, sda8,sda10,sda5,sda9 are local disks. notice the difference between ntfs and ext4.
the two uuid ones are the mobile harddisk. note that both has been added
noauto options, it is set to avoid mount on boot. when mobile hard disk is not present, booting the system with automount on will cause error. also by this way one can "partially" auto mount by click icons at nautilus.
the disadivantage for this method is that it can not automount ntfs driver, so at the moment after the device is inserted one has to run the following by root:
# mount UUID="D0CC0864CC0846E6"
hope we can find better way to make the whole process automatically.
more info:
auto,nofail-- it means it will be automatically mount on boot. however, if it is not present on boot, error will not appear.
useful tools here:
command
blkid is very good to find out all of the uuids:
mybox linux # blkid
/dev/sda1: UUID="1ed58cd8-d54c-4191-86b5-2b967298d3c2" TYPE="ext4"
/dev/sda2: UUID="671f9d17-5de7-4fe7-a6bf-f1096f4efe29" TYPE="ext4"
/dev/sda5: UUID="c8216a5e-3d03-491e-94a0-c19c25bdeee7" TYPE="ext4"
/dev/sda6: UUID="90b2869f-0d85-43ea-af05-b2833ded28ff" TYPE="ext4"
/dev/sda7: UUID="f660c6ea-ac34-4d1f-8945-e800adae05aa" TYPE="swap"
/dev/sda8: UUID="1e45a116-4e39-4a0f-8c67-48fe0c3c2ec0" TYPE="ext4" PTTYPE="dos"
/dev/sda9: UUID="075E30C271C193B7" TYPE="ntfs"
/dev/sda10: UUID="692659d8-84d1-4de4-b530-5d97d302e353" TYPE="ext4"
/dev/sr0: UUID="2012-02-03-16-05-05-00" LABEL=""SL 6.2 x86_64 DVD"" TYPE="iso9660"
No comments:
Post a Comment