bullethead;645290 Wrote:
> I recently upgraded my distro to the newest Ubuntu LTS. After that I
> noticed that my music library is not recognizing the NTFS formatted
> drives when I go to browse music folder. All EXT3 drives appear
> however. This happened with 7.5 and 7.6. I can write to the drives
> and see them on the machine, and through remote machines using Samba.
> However the touch doesn't see them, nor the server software. Very
> weird behavior.
NTFS drives are perfectly legit for use as a music library volume under
SBS. You just can't access them via /media. Instead, explicitly mount
them in fstab.
At the end of /etc/fstab:
Code:
--------------------
# <file system> <mount point> <type> <options>
<dump> <pass>
UUID=76142D53142D179F /mnt/media ntfs-3g
rw,defaults,noatime,umask=0000 0 2
--------------------
You need to replace the UUID above with the UUID of your ntfs drive.
Assuming that there is only one ntfs drive/partition attached to the
system, this code will extract the UUID and update fstab. Run it via
sudo:
config-fstab.sh:
Code:
--------------------
#!/bin/bash
#-------------------------------------------------------
# Script to set the 1st ntfs formatted device to auto-mount
# via fstab using its UUID
#
MOUNTPOINT=/mnt/media
#-------------------------------------------------------
# Backup fstab...
MOUNTFILE=/etc/fstab
cp -f $MOUNTFILE $MOUNTFILE.bak
#-------------------------------------------------------
# Set up mount points..
if [ ! -d "$MOUNTPOINT" ];
then
echo "Creating $MOUNTPOINT"
mkdir "$MOUNTPOINT"
chmod 777 "$MOUNTPOINT"
fi
#-------------------------------------------------------
# Remove any existing ntfs-3g mount points..
sed -i '/ntfs-3g/d' $MOUNTFILE
#-------------------------------------------------------
# Get the 1st NTFS formatted device..
NTFSDEV=`blkid | grep "ntfs" | sed -e 's/\(^.*\)\:.*$/\1/'`
ISMOUNTED=`mount -l | grep "$NTFSDEV"`
if [ -n "$NTFSDEV" ];
then
if [ -n "$ISMOUNTED" ];
then
echo "Unmounting $NTFSDEV.."
umount "$NTFSDEV"
fi
else
echo 'No NTFS formatted devices found!!'
exit 0
fi
#get the UUID for the device..
HDUUID=`/sbin/blkid -o value -s UUID $NTFSDEV`
if [ -n "$HDUUID" ];
then
echo "Setting $NTFSDEV to automount in $MOUNTFILE using uuid $HDUUID.."
echo "UUID=$HDUUID
/mnt/media ntfs-3g rw,defaults,noatime,umask=0000
0 2" >>$MOUNTFILE
mount -a
echo 'Device mounted:'
mount -l | grep "fuseblk"
exit 0
else
echo "No UUID for device $NTFSDEV !!!"
exit 0
fi
exit 0
--------------------
That will result in your ntfs drive getting mounted to /mnt/media.
Use:
# sudo mount -a
# sudo mount -l
..to test to see if it worked.
If you screw up the fstab file, you system may pause during boot.
Having an attached keyboard and hitting "s" will allow the system to
continue booting so that you can fix up the offending entry in
/etc/fstab.
--
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=89210
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix