Re: Mount option hazardous to USB Flash!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2005-05-15 at 16:06 +0200, Duncan Lithgow wrote:
> I've been reading thi thread with interest but have to confess to 
> understanding less than half of it. I understand the physical cause of 
> this probelm but is thre something I as a simple user can do? Can anyone 
> offer me a 'cut 'n' paste'  file I can drop in somewhere to avoid this 
> problem?


Create a file with the following contents (cut between the "===")

===
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
  <device>
    <merge key="volume.policy.mount_option.sync" type="bool">false</merge>
  </device>
</deviceinfo>
===

	Put that in:

	/etc/hal/fdi/policy/95-user-storage-policy.fdi

	(I have no idea the significance of the header xml line or the
deviceinfo introduction line.  I copied them from the default policy
file and they seem to work.  So be it.)

	Next, make sure you have all your keys removed from the system (so all
the fstab entries have been removed).  Then restart the haldaemon
(service haldaemon restart) and reinsert a key or card or camera...

	The default policy is (as someone else pointed out in this thread)
here:

	/usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi

	DO NOT EDIT THAT FILE!  It WILL get updated and your changes lost the
next time hal is updated by yum!  Make your changes in /etc/ and the
options will not be lost when you have a software update.  I just saw
this happen with the latest FC4 updates.  Changes in that policy file
disappeared and the dangerous options reappear.  That's when I decided
to try my hand at creating an XML config file in the config directories
instead of editing the policy file.

	Once you have done all this, double check...  Have a key automounted
and check the mount options by simply typing "mount".

	If it says something like this, you're gold:

/dev/sda1 on /media/usbdisk type vfat (rw,nosuid,nodev,_netdev,noatime,user=mhw)

	Note: No "sync" option.

	If you get this...  No good:

/dev/sda1 on /media/usbdisk type vfat (rw,nosuid,nodev,_netdev,sync,noatime,user=mhw)

	If you see "sync" in this list of options (proabably just before the
"noatime" option) then it's still wrong.  Go back and double check
everything.

	In my case, this was all done on FC4-T2.  It should be the same for
other flavors of Fedora Core.

> Duncan

	Mike
-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@xxxxxxxxxxxx  
  /\/\|=mhw=|\/\/       |  (678) 463-0932   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux