Subject: Installing on a Apple UFS image
To: None <port-macppc@netbsd.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: port-macppc
Date: 04/09/2006 11:18:06
Hi all,
first of all, I have to say that this is not related to NetBSD/macppc but a=
s
it involves OS X and NetBSD, I thought it could be the best list to ask.
I'm trying to install NetBSD/i386 on a Apple UFS partition made inside a
disk image. I want to do this to later boot it through qemu in OS X (on an
iBook G4) and to be able to mount the disk image from OS X to modify its
contents. I feel this could be an excellent configuration for NetBSD
development.
To start, I rebuilt current as of yesterday adding 'options APPLE_UFS' to
the GENERIC and the INSTALL kernels.
Then I created a new disk image from qemu (well, Q) specifying a size of
512 MB and a raw type. I booted the boot-big.fs image with this virtual di=
sk
and used fdisk to create a partition that takes the whole disk, setting its
type to 168 (Apple UFS). So far so good.
Then, I shutted down NetBSD and did this in OS X:
hdiutil attach -nomount disk.img
newfs /dev/disk1s1
hdiutil detach disk1
This theorically creates an Apple UFS file system inside the image using
the partition I created before. In fact, doing 'hdiutil imageinfo disk.img=
'
sees the partition correctly as well as 'fdisk disk.img'. (The latter does=
not
get the correct disk geometry, though.)
With the file system created, I launched qemu again and, when trying to
mount the file system by doing 'mount /dev/wd0e /mnt', I constantly
get "incorrect superblock".
Just to ensure that I got things right, I tried to do the same exact thing =
but
creating a FAT file system instead of an UFS one. And guess what,
I could mount it correctly in NetBSD after creating it from OS X.
Do you know if this is possible? Any idea on what may be wrong?
Thanks,
--
Julio M. Merino Vidal <jmmv84@gmail.com>
The Julipedia - http://julipedia.blogspot.com/