Monday, April 14, 2014
Some time ago I wrote a Mac OS X kernel extension for parsing and exposing simple Linux LVM volumes as partitions, mostly for my own use at home since I have various Linux distributions set up on many of my Macs. Many of those use an LVM layout for the root file system, which means Mac OS X cannot access it (e.g. using fuse-ext2).
Today the code is available on github under an LGPL v2.1 license. This should hopefully be usefeul to anyone having the same problem as I did.
This kernel extension simplifies an LVM layout into a partition scheme. This means that only single-PV LVM layouts are supported and only contiguous simple LVM volumes are exposed as partitions.
It has not been widely tested, only by myself internally. Feedback is much appreciated.
Possible future development may include extending this kernel extension to fully supporting LVM concatenated volumes spanning several drives, snapshots, etc. (This is not currently planned.)
Precompiled kernel extension:
IOLVMPartitionScheme-2014.11.15.tar.bz2 (source code)
Supported Mac OS X versions: 10.5 and higher (i386, x86_64 and ppc kernels are supported)
Please report any problems encountered as issues on github:
IOLVMPartitionScheme-2014.4.14f1.tar.bz2 (source code)
IOLVMPartitionScheme-2014.4.14.tar.bz2 (source code)
Friday, July 22, 2011
Apple has decided to only ship Xcode 4.1 for Mac OS X Lion and disallow any earlier versions. Unfortunately this limits the resulting binaries to Intel macs and the Mac OS X 10.6 SDK. Developers that are still interested in supporting PowerPC Macs and/or Mac OS X 10.4 / 10.5 are left behind.
So here's a quick script that you can use to install Xcode 3.2.6 on Lion:
Install Xcode 3.2.6 on Lion.command
Just extract the zip file, put the resulting script file, 'Install Xcode 3.2.6 on Lion.command' in the same directory as the downloaded disk image 'xcode_3.2.6_and_ios_sdk_4.3.dmg' and double-click 'Install Xcode 3.2.6 on Lion.command'.
Also, here are step-by-step instructions in case the script above doesn't work for you:
- Download the Xcode 3.2.6 disk image, 'xcode_3.2.6_and_ios_sdk_4.3.dmg', (I will assume it's in ~/Downloads for the next steps).
- Open up the Terminal and change to the directory where the image resides:
- Attach the disk image with a shadow image to make it writable. Terminal command (as one line):
hdiutil attach -shadow xcode_3.2.6_and_ios_sdk_4.3.shadow xcode_3.2.6_and_ios_sdk_4.3.dmg
- Remove the string '
&& system.compareVersions(my.target.systemVersion.ProductVersion, '10.7') < 0' from line 148 in 'Xcode and iOS SDK.mpkg/Contents/iPhoneSDKSL.dist'. Assuming the disk image got mounted at '/Volumes/Xcode and iOS SDK', you can use this one-liner:
cat '/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg/Contents/iPhoneSDKSL.dist' | sed "s/&& system.compareVersions(my.target.systemVersion.ProductVersion, '10.7') < 0 //g" > '/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg/Contents/iPhoneSDKSL.dist.new' && mv '/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg/Contents/iPhoneSDKSL.dist.new' '/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg/Contents/iPhoneSDKSL.dist'
- Install Xcode!
You can install Xcode 4.1 and Xcode 3.2.6 side-by-side, by choosing a different directory than '/Developer' as the install target for Xcode 3.2.6 (I use '/Xcode3.2'). However you can only have one global set of development tools installed (the ones that are installed in '/usr', i.e. are available for command line development).
Update: Xcode 3.2.6 can also be installed in Mountain Lion, but one very important point is to uncheck "System Tools" when installing. "System Tools" contain kernel extensions for profiling which are incompatible with the Mountain Lion kernel and will cause the system to panic on startup.
In addition, you will probably want to remove the kext
AppleProfileFamily.kext in Mountain Lion because it cannot be loaded and causes annoying error messages on startup.
Thursday, December 24, 2009
jFUSE allows you to develop FUSE 2.6 filesystems in Java (including the MacFUSE 2.0 extensions for Mac OS X). It also provides the programmer with access to relevant system constants and tools to make development a little easier.
The library consists of a native part (written in C++) and a Java part. Beginning with jFUSE 0.2, the native library has been tested on Mac OS X 10.4-10.6 and the latest versions of GNU/Linux (Debian,Ubuntu), OpenSolaris, FreeBSD and NetBSD (using librefuse).
- jFUSE 0.2 (jar file with library and example file systems, Java sources and compiled native library for Mac OS X)
- libjfuse 0.2 (JNI native library sources)
Sources now also available on GitHub.
HelloFS, the simplest filesystem you can find, and the other is a more complete in-memory filesystem called
TestFS. They can be found in the
I have created two additional filesystems for jFUSE as separate projects (download links coming soon):
- hfs-jfuse - A read only HFS/HFS+/HFSX filesystem driver.
- rarfs-jfuse - A filesystem for mounting RAR files, displaying their contents and allowing direct access to uncompressed entries.
In fact, the inspiration for jFUSE as a more general Java-FUSE layer came when working on the older 'rarfs' code, that also consisted of Java code bound to FUSE callbacks, but in a less reusable way.
For developers that quickly want to start creating jFUSE filesystems, all that's needed is to extend the class
org.catacombae.jfuse.FUSEFileSystemAdapterand override those methods that you want to implement (see
org.catacombae.jfuse.FUSE26Operationsfor a description of the operations that can be overridden).
Developers that want to take advantage of the MacFUSE extended callbacks introduced in MacFUSE 2.0 can override
org.catacombae.jfuse.MacFUSEFileSystemAdapter, which includes the FUSE 2.6 operations + the extended MacFUSE callbacks.
(Using the MacFUSE extended callbacks doesn't affect compatibility with non-MacFUSE platforms. They will simply not be invoked for those platforms.)
The Java API is not guaranteed to stay stable between releases, but it's also not likely to undergo any major changes.
Tuesday, November 4, 2008
- Support for AES-128 encrypted disk images. Crypto implementation details were derived from studying the VileFault proof-of-concept created by Ralf-Philipp Weinmann, Jacob Appelbaum and Christian Fromme.
- Support for the older HFS (Mac OS Original) file system. Nobody really uses it these days, but an application named "HFSExplorer" should be able to read HFS file systems. ;>
- Support for file system links, both hard links and soft (symbolic) links to files and directories. This makes it possible to browse Time Machine backups, as they use hard directory links extensively to create the impression of snapshots, and adds a lot to the general perception of file system completeness.
- Extracting files can now be done "quitely", without user interaction, by setting a few runtime extract variables represented as radio buttons. This is useful for doing "batch" transfers that take a long time to finish.
- New summary panel in the "Information" dialog for files and directories. This panel sums up some of the most important information about a file system entry. For directories, the entire directory weight is now calculated.