Nick Holland wrote:
Daniel Ouellet wrote:
...
He put the CD 4.5 in his laptop and booted from it. Then started the install but at the question "do you want to use all the disk space for OpenBSD" he did answer Yes. Right after that even he realize it was wrong and didn't proceed to anything else, just did CTL-C and stop there.

ok, bonus points to him for smarts for stopping.
...
What he had there before as a boot loader was "refit" that allow him to select either OpenBSD or MAC.
...
When you answer "YES" to the "Use all drive" at the install step, but do not do anything else, is there a way to restore that?

Yes.  Kinda.

1) STOP.  I think you figured that out already. :)

I take it this is one of the new-fangled Intel-based Macs.  If not,
disregard most of what I say here...

Yes it is.

Go find a PC and build yourself a flash boot disk tool (see faq14.html)

A few things you might want to do:
  * Image the entire disk to another, bigger disk.  you can do this by
booting from your above USB flash drive, and dd'ing your entire drive
(/dev/rwd0c) to a file on a USB hard disk. "bs=1M" on the dd command
so you don't have to wait three years.
  * Save the existing MBR to the flash disk. (that's the first sector
of /dev/rwd0c)
  * go buy a new disk. Practice on that before you try anything on
the production disk.  label clearly. :)


the "Use entire disk" question changes no more than 512 bytes on your
disk.  That's the good news.  The significance of that 512 bytes is the
problem.  (and while 512 bytes doesn't sound that bad, that's
2^(512*8) combinations...so we still gotta do somewhat better than
random guessing)

I think I figure that much so far, but frankly, that's the real issue. What it is suppose to be, well. That's really the fun part to figure out sadly.

If this were a standard PC (and I have no idea how "standard" an Intel
Mac is), the only trick here is figuring out your partition table.
Think back to the initial install...if you can remember how you
partitioned it originally, merely re-creating the MBR as it was will
save you.

I try to asked my Son that question. It's been a long time already and the drive in thee is not eh original one by any mean as it wasn't big for what he needed. So, he asked me if I could buy him a bigger one to witch I said yes. Why not, anything you want to experiment with computer and do the work, well I do encourage that when possible. So, it's a different configuration for sure.

HOWEVER, since you were using a third-party boot tool, this may help
and hurt you, all at once.  IF you can find a machine with a very
similar layout (see "buy new hard disk" and make your own?), you can
probably just copy the first sector of the disk from that one, put
it on yours, alter the partition table to match the original (hint:
you probably said something like "40G OpenBSD" or "120G MacOS"), and
the system will probably Just Work.

Well the drive is a 250GB. The setup was.

- Use apple disk utility from the Mac OS X DVD.
- Create the standard all default setup as it would do usually with the exception of one FAT 40GB size at the end for OpenBSD.
- Then install MAC OS X on the MAC OS X partition that's the MAC OS X HFS+

The size for the three used by MAC where what ever the default for them is selected by the DVD install. So, it would be:

1. EFI
2. MAC OS X HFS+
3. EFI System (FAT)

And the last one would be the 40GB for OpenBSD. It's fine if all is lost there, it was not an issue as my Son did that install many times and only take 10 minutes max. Was used for experiment a lots, and slowly getting himself a desktop to replace is MAC down the road, witch in most days was using OpenBSD and MAC depending on what needed to be done and more and more in the OpenBSD as time pass. But MAC is where all the research work and all is saved. (;<

4. the OpenBSD one as id A6

- At the install time the apple see the entire disk as formatted as a GPT partition and openBSD see the GPT as MBR.

- He install the MAC on the MAC partition, when finish he install the REFIT on the MAC partition.

- Then install OpenBSD on the last FAT partition of 40GB, but change that partition type form FAT to A6 as OpenBSD required.

- Then use the REFIT partition tools to sync the MBR to the GPT. This made all the different OS see the OpenBSD partition as FAT.

- Then booted the OpenBSD install CD drop to a shell to changed the FAT back to A6.

- Then all was done and could boot in MAC or OpenBSD form refit after that.

That's all the set as he described to me as exactly as possible.

You may want to think about where the most valued data is.  IF it is
on the MacOS environment, and that was the first part of the disk,
simply saying, "the entire disk is MacOS" may just bring the thing
back to life (on a standard PC, I'm sure it would..the physical
partition would be wrong, the file system, however, would be fine)

MAC is first, but not sure why, thy use three partition as far as I understand. And that's all the data part needed. OpenBSD is the last one and is 40GB and data in it is available both in MAC and OpenBSD what what he ever used or transfer by emails between them for testing, etc. So, no lost in OpenBSD is important. But never any data was access by either OS to the other partition.

If it is the OpenBSD partition that is the most important
   http://www.openbsd.org/faq/faq14.html#OhBugger
may help.  However, you may want to do the scan_ffs on a copy
of your disk, or maybe even a disk image set up with svnd, as
you don't want to be dropping a disklabel any ol' place on the
hard disk.

We can live without. (;>

I'm guessing refit sets up an MBR, I think that's the only way
OpenBSD could boot on a Intel Mac.  I suspect there is more to
refit than just those 512 bytes...but that's all you need to
restore.

For what I understand, but I am not expert what so ever and I am still reading on this and not fully understand that yet. Looks like there is MBR and GPT. But I really don't understand the difference yet, or what they are use for at this time.

refit may help you here in some way...I'd suggest asking on a
refit list, see if they know of any magic secret extra copies of
the MBR sector of the disk, or any other magic tricks it has.
Just tell them that all that happened is the very first sector
of the disk, the MBR, got clobbered.

I will asked there. I thought that may be there was a trick as the only part was the entire disk question, what ever that changed and now looks like it's only the first 52 bytes, witch is good news. Just need to find a way to get back to it.

Good luck...hopefully, someone with more IntelMac experience can
give you better guidance.

Thanks Nick. I very much appreciated you taken time to try to help the best you could! I really, really appreciate it!

I am by no mean out of the woods, but at a minimum, the data is still good. I just need to find a way to get back to it now.

Best regards,

Daniel

Reply via email to