• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to enable block writing on root volume's disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to enable block writing on root volume's disk


  • Subject: How to enable block writing on root volume's disk
  • From: Thomas Tempelmann <email@hidden>
  • Date: Thu, 2 Jul 2009 23:36:22 +0200

I'm writing a disk repair tool (iBored) and wonder if I can get OS X
to let my tool write to "safe" blocks on the root vol's disk (usually
/dev/disk0, but not always).

I like to modify blocks _outside_ the mounted root file system, e.g.
the partition table or other blocks not appearing as sub-partitions
(such as "disk0sN"). Therefore, I need to open the "disk0" device.

Now, even if my app is running as root, it can't get a read/write
permission, it seems. I am using code like this:

   fd = open ("/dev/disk0", O_RDWR);

This results in an error ('fd' is -1)

Any ideas how to circumvent this?

I mean, I do not mind not being allowed to write to any mounted
partitions, but I should be able to write outside of them, shouldn't
I?

--
Thomas Tempelmann, http://www.tempel.org/
 _______________________________________________
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

  • Follow-Ups:
    • Re: How to enable block writing on root volume's disk
      • From: Dan Markarian <email@hidden>
  • Next by Date: root volume's device can be read without being root!
  • Next by thread: Re: How to enable block writing on root volume's disk
  • Index(es):
    • Date
    • Thread