Monday 30 April 2007

SATA ONLY fstab - Mounting Fat32/NTFS Partitions (Mepis 6.5)

Original fstab after clean install of Simply Mepis 6.5:

# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda5 / ext3 defaults,noatime 1 1
/dev/sda6 swap swap sw,pri=1 0 0
none /proc proc defaults 0 0
none /proc/bus/usb usbfs devmode=0666 0 0
none /dev/pts devpts mode=0622 0 0
none /sys sysfs defaults 0 0
/dev/sda7 /home ext3 defaults,noatime 1 2
# Dynamic entries below
/dev/sda1 /mnt/sda1 ntfs-3g noauto,users 0 0
/dev/sda2 /mnt/sda2 vfat,ext3,ext2,reiserfs noauto,users,exec 0 0
/dev/sda3 /mnt/sda3 vfat,ext3,ext2,reiserfs noauto,users,exec 0 0
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/hda /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/fd0 /media/floppy vfat,ext2 noauto,users,exec,rw 0 0

To auto-mount the other drive partitions, allowing read/write privileges on the fat32 partitions, alter the fstab entry by doing the following::

su
kate /etc/fstab

Change the fstab entry until it looks like the following:

# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda5 / ext3 defaults,noatime 1 1
/dev/sda6 swap swap sw,pri=1 0 0
none /proc proc defaults 0 0
none /proc/bus/usb usbfs devmode=0666 0 0
none /dev/pts devpts mode=0622 0 0
none /sys sysfs defaults 0 0
/dev/sda7 /home ext3 defaults,noatime 1 2
/dev/sda1 /mnt/sda1 ntfs-3g auto,users 0 0
# Dynamic entries below
/dev/sda2 /mnt/sda2 vfat,ext3,ext2,reiserfs noauto,users,exec 0 0
/dev/sda3 /mnt/sda3 vfat,ext3,ext2,reiserfs noauto,users,exec 0 0
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/hda /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/fd0 /media/floppy vfat,ext2 noauto,users,exec,rw 0 0

Then add the following to your /etc/rc.local file before "exit":


if [ -e /usr/local/bin/mountVFAT.sh ]; then
/usr/local/bin/mountVFAT.sh
fi

Create a folder named "bin within the /usr/local folder. Then inside that folder create a text called mountVFAT.sh. That text file should contain the following information:

#!/bin/bash

sudo -u melchizedek mount /mnt/sda2
sudo -u melchizedek mount /mnt/sda3

Change the file permissions using the following command:

chmod ug+x /usr/local/bin/mountVFAT.sh


Reboot

No comments:

Post a Comment