Re: booting MOL from hfs image file in linux


Subject: Re: booting MOL from hfs image file in linux
From: Seanano (sto9013@ksu.edu)
Date: Sat Aug 05 2000 - 13:08:34 MDT


> Has anyone successfuly done this? I was quite dismayed to learn that I
> need a seperate partition to setup MacOS, after spending several days
> getting my linuxppc installation setup *exactly* how I want it. The FAQ
> at http://www.turbolinux.com/~brad/mol/ seems to suggest that it's
> possible. If anyone can help, I'd GREATLY appreciate it.
>
> I guess I should have read the mol docs *before* I installed everything
> else I need. Grr.

  BTW, this question should probably have been directed to the mol-general
list : mol-general@lists.maconlinux.org. In the future please use that
mailing list for MOL specific quesions. Onto your answer...

  Yes it is possible and yes I have succesfully gotten it to work.
Before I explain what I did I must warn you that disk performance will be
noticeably slower then with using a dedicated partition/drive. If you
want the best performance in MOL you should be using a seperate drive
dedicated to it or at least it's own partition. For just playing and
light use however the disc image will work. Now with that out of the way:

Seanano's MINI-HOWTO on Using MOL with a file instead of a partition/drive

DISCALIMER: I'm not responsible for loss of data, blah, blah, blah. Use at
your own risk, blah, blah , blah. Always read the man (info) pages and
never blindly type commands. I'm using mol 0.9.48, I don't know if this
will work n older versions, but I'm GUESSING that it might.

if you see any errors let me know - Seanano <sto9013@ksu.edu>

1) You will first need to create the image file. I used 'dd' for this but
there are probably other ways if you are willing to experiment. The
command you will need to run with the $ representing your command line
shell prompt is:

 $ dd if=/dev/zero of=DRIVEIMAGE bs=BLOCKSIZE count=NUMBEROFBLOCKS

  Where DRIVEIMAGE is the name of the disc image you wish to create,
BLOCKSIZE is the size in bytes of a block, and NUMBEROFBLOCKS is the
number of BLOCKSIZE blocks you wish to use. What this means in english is
the size of your drive image will be: BLOCKSIZE bytes * NUMBEROFBLOCKS.
The if=/dev/zero part means that the image will be just zero's.
  Here is an example:

  $ dd if=/dev/zero of=macos.img bs=1024 count=800

  This example creates a file called macos.img in the current directory.
It's size is 1024 bytes * 800 = 800 kilobytes. So, this means if you set
bs to 1024 the count will be the number of kilobytes. If you set bs to
1048576 (1024 kilobytes in a meg * 1024 bytes in a kilobyte) then count
will be the size in megabytes. Why didn't I say this first? Just testing
your resolve. ;-)

2) Next you will need to format your partition with hfs. The easiest way
is to install the hfs-utils rpm and use the hformat program. If you are
in the directory with the image file you can run

 $ hformat -l "VOLUMELABEL" DRIVEIMAGE

  where VOLUMELABEL is the volume name as you want it to show in MacOS.
As for DRIVEIMAGE, if you don't know what that is you should read step
one.

3) All you have left to do is get a bootable system on your drive
image. You have (at least) two options - copy a bootable system from
another macos partition or install it form the CD. I'm not going to cover
the first option for obvious reasons the main one being if you've allready
got a bootable mac partition there aren't many reasons for you not to use
it with MOL instead of an image.
  Moving on then - installing form a CD. You will need to make sure you
have read access to the cd drive and that your image is not mounted (via
the loopback device, if you don't know what I'm talking about then don't
worry, it's not important to you). Make sure you've got the following
lines in your molrc file (usually /etc/molrc):

blkdev: /path_to_image/DRIVEIMAGE -rw
blkdev: /dev/cdrom -cd

The order is important here. MOL will try booting from the top entry
first. Since your image isn't bootable it will skip that and boot from
the cd (assuming you have a MacOS install cd in the drive and have read
access to it)
  MOL should then boot from CD. Once it boots all you need to do is run
the install program from the cd. One note that you might want to observe
is that the MacOS in MOL observes the CD as a large read-only disk not as
a cd so the volume icon may not be right. Shutdown or restart macOS (does
the same thing in MOL) then start mol again. It should boot from your
image file
  
  Now you have a bootable MacOS on an image file. Install and use to your
heart's content...



This archive was generated by hypermail 2a24 : Sat Aug 05 2000 - 13:12:02 MDT