Re: How to prevent a volume to be mounted?
Re: How to prevent a volume to be mounted?
- Subject: Re: How to prevent a volume to be mounted?
- From: MacXperte <email@hidden>
- Date: Wed, 28 Mar 2007 00:29:07 +0200
Thanks Rob
Am I missing something?
How can any code that I write help me to control the behaviour on a
machine I have never been at before?
I am looking for a portable solution, one that solely depends on the
content of the disk itself.
Since there is no autostart in Mac OS X, executable code won't help
me there, will it?
There must be some way to format a disk so it neither mounts nor
produces an error on plugging or unplugging.
(Digital cameras in PTP-mode are treated that way, though technically
they aren't disks.)
Some people even have the problem that a disk they want to be mounted
automatically on plugging just won't.
I'd be happy to reproduce this kind of failure, because this is
exactly what I want to happen.
I know this is not strictly a developer issue, but I figured that
File-System developers might have some idea on the topic.
Florian
Am 27.03.2007 um 19:32 schrieb Rob McKeever:
Hi Florian,
You can use DiskArbitration to do this via disk approval
callbacks. I'd grab a copy of the source from <http://
www.opensource.apple.com/darwinsource/> as well if you haven't
already. It comes in very handy when trying to figure out how to
do stuff like this.
-Rob
--
Rob McKeever, email@hidden
Developer Technical Support, CoreOS/Hardware
Apple Computer
--------------------------------
WWDC 2007 • June 11-15 • Moscone West • San Francisco, CA
http://developer.apple.com/wwdc/
On Mar 27, 2007, at 9:47 AM, MacXperte wrote:
This question has been asked in 2005 on the carbon-dev list:
http://lists.apple.com/archives/carbon-dev/2005/Jun/msg00480.html
I found a partial solution, that doesn't help in my case.
The problem is simply to have a drive, that when plugged in will
neither mount as a Volume nor produce an error-message. Adding an
entry to fstab with the mount-option noauto will perfectly do the
trick (at least as long as fstab is still respected), but only on
machines that were patched that way.
In my case it is a USB-MassStorageDevice with two separate drives
(not partitions), where one of those should be silently ignored.
So I am looking for a solution that will work on any unaltered Mac
OS System. It must be done on the disk itself. (And no, hiding the
mount-point is not enough.)
So far I've tried every partitioning trick I could think of: All
documented APM-partition-types and several MBR partition-types
including EE (EFI). I even tried setting the no-auto-mount bit in
the APM-record. Always the same result: if there is anything
mountable, it will be mounted; if not, there is an error-message.
What I did'nt try so far is playing with Software-RAID like
partitions, GUID partitioning and UFS special-partitions. Any idea
in those fields?
In a more global aproach: Please somebody with insight in the
diskarbitration framework tell me if there is any chance of
crafting a disk that will be ignored, or if there simply is no
third branch in the code besides mount or error. If so, maybe
there should be an exception inserted, something like: volumes
named ".NoAutoMount" won't be mounted.
Thanks in advance, any idea welcome
Florian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden