Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lock a partition to prevent writing?




On Mar 14, 2007, at 11:37:56, Dan Shoop wrote:

At 5:30 AM -0400 3/14/07, webmaster wrote:
On Mar 14, 2007, at 05:21:40, Mark Glossop wrote:

On 14/03/2007, at 18:00, webmaster wrote:

I'm in the midst of a HDD project that requires one of the HFS partition to be locked to prevent writing, I've googled this and came up empty, anyone know of a utility that allows this?

Locking the mounted volume from the finder isn't an option since the tests are using the IOKit to see that the particular partition is actually read-only.

-- Dale

$ man mount

More specifically, something like this:

$ sudo mount -t hfs -f -r /dev/<deviceID> <mountpoint>

If this is still too high-level, you're going to have to play IOKit's game...

M.

Unfortunately to execute that command (which is the same as locking the drive in the finder) you have to be booted into OSX to perform.


Unfortunately the test is performed during the boot process and the system wont boot up if the particular partition is writable.

Unless you've munged BootX and the kernel, which is an incredibly bone headed thing to do, then your test is occurring *after* the system is booted. Probably after Darwin is started and after rc. That's pretty well along and the typical mechanisms for mounting drives, like fstabs, should work fine with whatever your doing.

It would never hit BootX or the kernel if the partition isn't locked unless you munged OF/EFI to skip certain pre-boot processes and without the ability to modify the firmware that would not only be difficult to achieve but really retarded on your part.


If that doesn't work then you're doing something you should re- evaluate since it's ripe with woolly thinking.

I believe that partition locking is done in the partition map by setting a flag and I'd image the drive and hex edit it to change the byte if I know what I was looking for.

That's locking a partition, not locking a volume. Why would you want the former?

I didn't say anything about locking a volume??

I've been stating I need to lock a partition because this is the test that OF/EFI performs when it detects a magic partition and it stops the boot process with an error message if the partition isn't read-only.

I managed to obtain one of these HDD's with this partition intact, I want to modify it's contents (I imaged the original HDD so I can restore it with maps intact - already tested the restore to a different drive and it works) and I can find a shit-load of windows XP utilities to unlock it (remove read-only status) but nothing to re- lock it after I make changes to it.

--

-dhan

-- Dale

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden
References: 
 >lock a partition to prevent writing? (From: webmaster <email@hidden>)
 >Re: lock a partition to prevent writing? (From: Mark Glossop <email@hidden>)
 >Re: lock a partition to prevent writing? (From: webmaster <email@hidden>)
 >Re: lock a partition to prevent writing? (From: Dan Shoop <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.