Re: How to mount a range of block on a disk as a partition
Re: How to mount a range of block on a disk as a partition
- Subject: Re: How to mount a range of block on a disk as a partition
- From: Florian Sedivy <email@hidden>
- Date: Mon, 13 Jul 2009 21:20:00 +0200
On Sat, Jun 13, 2009 at 7:32 AM, Thomas Tempelmann<email@hidden>
wrote:
>> This may not be the proper list for this, please forgive. I just need
>> a quick answer and couldn't find it myself so far:
>>
>> On a block device there is a file system hidden inside a partition
>> (actually, in an EFI partition).
>> The disk's partition table only specifies the larger efi partition,
>> but not the actual fs partition inside it.
>> I can extract the partition inside by copying (e.g. using dd comand)
>> the blocks beginning at offset 39*512, writing them to a file and
>> mount that file as a disk image. That proves that it's there, in one
>> contiguous blob.
>>
>> Now, I like to modify that partition in its place instead, hence mount
>> it on OS X.
>>
>> Is there a way I can either create an on-the-fly block device from a
>> range of disk blocks, using an existing unix/Apple command?
>>
>> Or can I tell the mount command to skip the first N blocks of a given
>> drive, i.e. provide an offset from where it should assume the start of
>> the file system it shall mount?
>>
>> The intention here is to avoid modifying the partition table.
Chris Suter <email@hidden> answered on 13.6.2009 19:15:
>
> I don't think there's an easy way of doing what you want, but here are
> a few ways:
>
> 1. Write a kernel extension to present the internal range as a new
> partition. Probably not that difficult if you know what you're doing.
>
> 2. Use FUSE to write your own filesystem that presents the internal
> partition as a file and then mount the presented file as a disk image.
>
> 3. Same as 2 really: if you've got VMWare Fusion, it already has
> software that does #2 so you could create a vmdk file (which can be
> pretty flexible) and then go from there.
Just an idea:
4. Use a loop-device
If this was Linux you could do something like
sudo mount -o loop,offset=19968 /dev/disk2 /Volumes/HiddenFS
which would create a loop-device on the fly and mount it.
Unfortunately there is no loop-option on OS X and hdiutil (which is
something like a loop-manager there) does not have an offset option.
Maybe it would be possible to port/write a simple losetup or vnconfig to
Mac OS X (including the offset option but not necessarily the encryption
features). Alternatively to patch hdiutil to allow offsets or custom
partition-maps (hdiutil can synthesize partition-maps already).
Florian
_______________________________________________
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