Jump to content

Tripleboot system unbootable after Linux reinstall


  • Please log in to reply
22 replies to this topic

#1
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
I used this system for maybe two years without issues. The whole thing is on an eSATA hd, hybrid gpt/MBR format, 11 partitions, Chameleon on a separate partition along with the extra folder, OSX for everyday use, another OSX for emergency cases, Linux with separate home-partition and Windows 7 64 Bit. I wanted to install a new Linux, chose open suse 12.1 64 Bit and downloaded the dvd. I knew I would have to fix the fake MBR-partition table with gptsync afterwards to get windows back. After choosing several install options the installer reported that he was going to format the 2 linux partitions that he found as ext4, use one as root partition, the other one as home partition, use the existing swap partition and that he had detected a gpt hd, so he would install grub to the linux root partition and leave the MBR untouched. That sounded good for me, so I hit enter. Installation was finished, but after reboot I just saw a blinking cursor.
That made me think that the wrong partition might be marked as active. So I first fixed the faked MBR partition-table with gptsync and then marked the chameleon partition as active.
Again the blinking cursor after reboot.
Marked the OSX partition that was part of the faked MBR as active.
Blinking cursor after reboot, then: "Error. No operating system found."
Maybe i should have unplugged the internal hd before reinstalling linux? Too late. (OSX on the internal hd still boots, so does windows 7 via chameleon if I choose to boot from the internal hd.)
There might be just one or two bits in the wrong place. Do I really have to reinstall everything from scratch?

#2
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 273 posts
  • Gender:Male
If you see all partitions on your eSata disk when you boot to OSX from internal drive, then, I guess, all is ok. In that case I would just reinstall Chameleon. Be aware of a difference between boot0 and boot0hfs.

Can you check disk with Rod Smith's gdisk? Just to list GPT partitions and MBR records.


#3
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
Thanks for responding.
I forgot to mention that I already reinstalled Chameleon - with a .pkg-installer, this simple method always worked for me.
That didn't change anything.
Yes, I can see all mac partitions when I boot from the internal hd.
Now I will google for Rod Smith's gdisk.

#4
iFIRE

iFIRE

    InsanelyMacaholic

  • Banned
  • PipPipPipPipPipPipPipPipPipPipPip
  • 3,807 posts
  • Gender:Male
  • Location:Bcn-Spain
try this:


After you convert it to MBR you will have to set the active partition otherwise it won't boot. First of all try to install Chimera, it should work as it does everything necessary for it to boot (install boot0, boot1h and set partition active). If it failed now we'll try this manually to make sure it's done right. First get chameleon's binaries, you may download Chimera and open the package with pacifist and extract them somewhere. Put fdisk440 in the same folder. Then try this in a terminal:

Code:

cd /folder where you extracted the binaries/


Look for your boot partition's identifier (diskXsY):

diskutil list


Get root access:

sudo su


Install boot0 to the MBR:

./fdisk440 -f boot0 -u -y /dev/rdiskX


Install boot1h to the bootsector of the boot partition:

dd if=boot1h of=/dev/rdiskXsY


Copy the file "boot" to the partition:

cp boot /


Set the partition active:

./fdisk440 -e /dev/rdiskX


f Y (from the partition identifier rdiskXsY)

w (write)

q (quit)


#5
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
This is what gdisk reported for the external disk:

_________________________________


Partition table scan
MBR: hybrid
BSD: not present
APM: not present
GPT: present

Found valid GPT with hybrid MBR; using GPT

__________________________________

When I type "v" for "verify disk" it puts out: No problems found.

#6
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 273 posts
  • Gender:Male
that is good.
Can you list your GPT partitions with gdisk? Plus also MBR records/partitions (option under advanced options)? That may help in finding out what went wrong.

There is also a great too DarwinDumper here http://www.projectos...indpost&p=19752
It dumps various system stuff. One of it is disks, partitions and bootloaders that are found. Can you post this output (writing from ipad and can not check exact file names to guide you).

#7
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
I attached the DarwinDumper output, dmazar.

The gdisk operation looks complicated, maybe dangerous. I need cold blood for that and will first fool around a little with gdisk on a laptop.

Thanks for the help and patience.

Attached Files



#8
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 273 posts
  • Gender:Male
I know how you feel about messing with gdisk, fdisk and similar :)

Ok, quick check to files in BootSectDump folder shows that DarwinDumper still has some bugs, but also that you do not have boot0* installed to the first sector of your 1TB SAMSUNG HD103SJ disk.

You should install one of Chameleon's boot0* loaders to this disk. I would recommend boot0hfs - this will start Chameleon from the first bootable HFS+ partition regardless of the active flag, meaning you can set your Windows partition as active if Win requires it.

For installation - you can use Chameleon install package, Chameleon Wizard or just install boot0hfs manually:
fdisk440 -f boot0hfs -u -y /dev/rdisk9
(replace rdisk9 with rdisk0 or whatever the number of the disk is).

Maybe this is enough to solve the problem.

#9
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
I use Chameleon-2.0-r1394 because it's called "golden master", always worked for me (except the installer package problem now) and I thought I don't need the latest chameleon version for 10.6.8. As I don't have the binaries I wanted to extract the boot0hfs file and fdisk440 with pacifist. But there was no boot0hfs file, just a boot0 file but that should do the job too according to iFIRE. Both files were extracted although there was an error message.

So the plan is to start terminal, navigate to the folder with boot0 and fdisk440,

paste "fdisk440 -f"
type space
drag boot0 on the terminal window
paste " -u -y /dev/rdiskX" ("X = number of the eSATA hd)
hit enter
enter admin password

Will try tomorrow.

#10
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 273 posts
  • Gender:Male

So the plan is to start terminal, navigate to the folder with boot0 and fdisk440,

Yes, go to that folder or copy both files to some folder and then just type/copy following to terminal:

./fdisk440 -f boot0 -u -y /dev/rdiskX

("X = number of the eSATA hd)


If you are installing boot0 instead of boot0hfs, then do not forget to check and set Chameleon's partition as active. This is not needed for boot0hfs.



By the way, it's strange that you do not have boot0hfs in Chameleon package - it is present for a quite amount of time.



#11
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
I got this error message:

______________________________________________________


otto-katzs-mac-pro:boot0hfs Installation ottokatz$ sudo ./fdisk440 -f boot0 -u -y /dev/rdisk0
Password:
dyld: lazy symbol binding failed: Symbol not found: ___bzero
Referenced from: /Users/ottokatz/Desktop/boot0hfs Installation/./fdisk440
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___bzero
Referenced from: /Users/ottokatz/Desktop/boot0hfs Installation/./fdisk440
Expected in: /usr/lib/libSystem.B.dylib

Trace/BPT trap

________________________________________________________


Maybe it has to do with the errors that occurred when I tried to extract fdisk440 and boot0 with pacifist.

Now I downloaded the Chameleon 2.1svn Official Binaries. I hope I can combine the boot0hfs file from these binaries with the other chameleon files that should be already installed on the eSATA hd.

No idea why there is no boot0hfs file in the .pkg-installer.

#12
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 273 posts
  • Gender:Male
Strange error. It seems you can not run fdisk440. That's probably the reason why boot0 was not installed in the first place.

What OSX are you using when you are doing that? And how are you booting that OSX?

#13
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
On the internal disk it's Leopard. I think the latest version of 10.5. Bootloader is chameleon, I think an older version, maybe any version 1. If you want to know exactly I can check tomorrow, I'm using another computer right now (we have little heatwave and it's damn hot in my room).

What I could try is to boot 10.6.8 on the eSATA hd with a boot CD and then run the package installer.

#14
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 273 posts
  • Gender:Male
Oh, yes. If you could boot it from CD, that would mean that really only Chameleon installation is the issue. Well, at least for OSX boot.

#15
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,097 posts
  • Gender:Male
  • Location:UK
Hi pilsator

I know this is unrelated to your posted problem, however with regard to the DarwinDumper result you posted above, can I ask if you'd be kind enough to try a revised version which should overcome the issue where your disk sizes were incorrect?

Thank you.

#16
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
When I boot from CD the display shows a custom boot logo, the circle of lines is rotating, then the machine seems to be stuck in a loop. The mouse pointer disappears and comes back, there is some hd and CD activity. This repeats periodically while the activity symbol stopped spinning.

When I boot from CD with -v x text is displayed, dsmos arrives, then the screen turns black with a little white block in the upper left corner and it seems to be stuck in the same loop as before.

The system is almost vanilla except a driver for a USB audio interface, LAN-driver and a patched AppleAzalia.kext (if I didn't forget anything).

I could boot windows 7 with the boot CD without problems.

Just downloaded the new DarwinDumper 2.1.4. Will run it on the desktop machine tomorrow, blackosx.

#17
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 273 posts
  • Gender:Male
Oh my. Which boot CD are yuo using? Maybe to try with some different boot CD? You can try with this HackBoot for Lion from madl0n: http://dl.dropbox.co...%20Lion.iso.zip
You can download it and burn ISO to CD, and then try to boot from it.

Alternative is to boot to your Leopard and try again to install boot0 (or boot0hfs) from Terminal, but without fdisk440:

Open Terminal and cd to folder where boot0 (boot0hfs) is.
Use
$ diskutil list
to identify your external disk
and then:

$ diskutil unmountDisk /dev/diskX
$ sudo dd if=boot0hfs of=/dev/diskX bs=440 count=1
$ diskutil mountDisk /dev/diskX
where X in diskX is the number of your disk.

#18
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts
This is the output of the new DarwinDumper version.

I could try to plug the eSATA hd into a laptop running 10.7.1 and then run the package installer or install boot0hfs from the latest chameleon binaries manually.

After reading your post now I will try what you suggested.

This boot CD is the only one I found (well someone else found it) that works for my old ASRock G945-DVI board. I tried different boot CDs including HackBoot, nothing ever worked. I thought I could forget Snow Leopard for this board before someone on insanelymac found this CD that was made for another board. I installed some systems with it.

Attached Files



#19
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,097 posts
  • Gender:Male
  • Location:UK
Thanks for finding the time to submit another DarwinDumper report. I can see the report now shows your volume sizes correctly, though the size of disk0 (SAMSUNG HD103SJ) is still shown as 0 TB. I will look at fixing this. I also see other issues with the report which I guess are specific to 10.5, though I don't have a 10.5 installation on an Intel machine to test. I'll see if I can find time on a G5 which I know of to run some more tests.

Looking at your disk sectors from the report I don't recognise the code in the boot sector of either of your disks. Can you tell me what code is (or is supposed to be) on each? If you can then I can look to adding detection for it in DarwinDumper.

It is strange why you cannot successfully execute fdisk440 on your system as I remember testing it on 10.5.8 a while back. The fdisk440 file I tested was posted earlier in the same topic by Zef - maybe you could try using that same file (It's here)? But otherwise the steps that dmazar posted above for using fdisk and writing to only the first 440 bytes should work just fine. You should then at least be able to boot Chameleon from your SAMSUNG HD103SJ.

#20
pilsator

pilsator

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 200 posts

Looking at your disk sectors from the report I don't recognise the code in the boot sector of either of your disks. Can you tell me what code is (or is supposed to be) on each? If you can then I can look to adding detection for it in DarwinDumper.


Sorry but I don't know what code is or should be there. Is this a question for experts only or could you ask in a way that a typical apple user understands?
Can I find out with gdisk? If so: which options should I choose in the main menu and the submenu?

Just installed boot0hfs with the dd-command and now the machine boots again from the eSATA hd!!
Thanks a lot, dmazar. Without your help hours of stupid work would have waited for me.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy