<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>33dots &#187; fstab options</title>
	<atom:link href="http://www.33dots.com/index.php/tag/fstab-options/feed" rel="self" type="application/rss+xml" />
	<link>http://www.33dots.com</link>
	<description></description>
	<lastBuildDate>Wed, 12 Oct 2011 17:07:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mounting the windows fat32 drive on startup for a normal user</title>
		<link>http://www.33dots.com/index.php/linux/mounting-the-windows-drive-on-startup.html</link>
		<comments>http://www.33dots.com/index.php/linux/mounting-the-windows-drive-on-startup.html#comments</comments>
		<pubDate>Fri, 21 Aug 2009 06:35:25 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Cent OS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[adding a drive to fstab]]></category>
		<category><![CDATA[fstab options]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[mount -a]]></category>
		<category><![CDATA[mount at startup]]></category>
		<category><![CDATA[windows drives in linux]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=173</guid>
		<description><![CDATA[This can be done by adding the line similar to the one shown below, to the end of the /etc/fstab.
/dev/sda6     /home/tony/win     vfat     defaults,uid=500,gid=500     0     0
This will automatically mount the fat32 drive/dev/sd6 to the directory /home/tony/win for the user with uid=500 in read/wite mode. Modify the /dev/sdax and /home/tony/win appropriately to reflect your setup.
The uid and [...]]]></description>
			<content:encoded><![CDATA[<p>This can be done by adding the line similar to the one shown below, to the end of the <em>/etc/fstab</em>.</p>
<pre>/dev/sda6     /home/tony/win     vfat     defaults,uid=500,gid=500     0     0</pre>
<p>This will automatically mount the fat32 drive/dev/sd6 to the directory /home/tony/win for the user with uid=500 in read/wite mode. Modify the /dev/sdax and /home/tony/win appropriately to reflect your setup.</p>
<p>The uid and gid of the user can be found by the command</p>
<pre>[tony@localhost ~]$ id
uid=500(tony) gid=500(tony) groups=500(tony)</pre>
<p>Before doing this take a backup of fstab by</p>
<pre>[tony@localhost ~]$ su -
Password:
[root@localhost ~]# cp /etc/fstab /etc/fstab.bak</pre>
<p>Now you can use gEdit to add the line</p>
<pre>[root@localhost ~]# gedit /etc/fstab</pre>
<p>Once we add the line, we could check the result of it immediately [without rebooting] by,</p>
<pre>[root@localhost ~]# mount -a</pre>
<p>Check whether we have the required result, if not modify the lines appropriately and recheck.</p>
<p>If a drive is mounted, you can unmount it, for any reason [perhaps to try another set of options] by,</p>
<pre>[root@localhost ~]# umount /home/tony/Data/</pre>
<p>A bit of info on how things work.</p>
<p>When a system boots the kernel reads the <em>/etc/fstab</em> and mounts the filesystems specified in it according to the list of options specified.<br />
Each filesystem is described on a separate line. Fields on each line are separated by tabs or spaces.  Lines starting with ’#’ are comments.</p>
<p>The general form of the line is</p>
<pre>device     directory     partition-type     mount-options     fs_freq     fs_passno</pre>
<p>Lets see the possible values of these fields,<br />
<strong>device</strong> &#8211; the partition as seen by linux<br />
eg: /dev/sda5<br />
/dev/sdb6<br />
/dev/hda7</p>
<p><strong>directory</strong> &#8211; the directory that will be the mount point<br />
eg: /home/john/windows<br />
/mnt/win</p>
<p><strong>partition-type</strong><br />
eg: vfat<br />
ntfs</p>
<p><strong>mount-options</strong> &#8211; They are comma separated list of words which determine how the filesystem will be mounted. Some useful options are,<br />
rw &#8211; read/write<br />
ro &#8211; read only<br />
auto &#8211; mounts automatically<br />
noauto &#8211; not mounted automatically<br />
exec &#8211; allows execution of binary files<br />
noexec &#8211; no execution of binary<br />
user &#8211; allows mounting by any user<br />
users &#8211; allows mounting by any user but any other user can unmount.<br />
sync &#8211; data written synchronously<br />
async &#8211; data written asynchronously<br />
uid=x,gid=x &#8211; Set the owner and group owner of the files (available only for some partition types)</p>
<p>defaults -rw,auto,exec,nouser,async</p>
<p>For full list and and more details on each of the options, check <code>man mount</code>.</p>
<p><strong>fs_freq</strong> &#8211; This is used by  the <em>dump</em> command  to determine which filesystems need to be dumped. This field is 0 usually. <em>Dump</em> will assume that the filesystem does not need to be dumped.</p>
<p><strong>fs_passno </strong>- This is used by the <em>fsck</em> program to determine the order in which filesystem checks are done at reboot time. It can be left 0. <em>fsck</em> will assume that the filesystem does not  need  to be checked.</p>
<p>Source<br />
<code>man mount</code><br />
<code>man fstab</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/linux/mounting-the-windows-drive-on-startup.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

