Voodooprojects

Chameleon => Bug Reports => Topic started by: sapele on February 03, 2012, 12:45:41 PM

Title: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 03, 2012, 12:45:41 PM
Hello all.

Not sure what is going on here.  All was working well in 10.6 but since the upgrade to 10.7 I get a blinking cursor at boot if my wd 2T Time Machine disk is connected.  I did notice that the first time into the updated OS that i had to change the default partition in the org.chameleon.Boot.plist.  I had to switch it to 1,2 to load my OSX install or I would get a mach kernel not found error at boot.  The odd thing is that the disk is disk2s2 so that strikes me as odd right off the bat.  It was as if the disk identifiers had been thrown out of their previous order.  For example Time Machine was not excluding the main disk. 

If I mount the time machine volume and reboot I get a blinking cursor at boot and nothing more right before the gui would show up.  If I unplug the disk and reboot it fires up perfectly.

Here is how I have my system set up. I have chameleon on its own partition and the main os on a separate hard drive.

From Disk Utility

Chameleon partition is disk0s2
Media 2 is disk 0s3

Test OSX install is disk1s2
Media 1 is disk1s3

MAc100 is disk2s2

any insight would be very helpful thanks so much for all of the hard work.

here is the installer file from chameleon

======================================================
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Mac1000                 999.9 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.1 GB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS ChameleonUSB            3.8 GB     disk1s2
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *750.2 GB   disk2
   1:                        EFI                         209.7 MB   disk2s1
   2:                  Apple_HFS Mac750OS                20.0 GB    disk2s2
   3:                  Apple_HFS Media 1                 729.7 GB   disk2s3
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk3
   1:                        EFI                         209.7 MB   disk3s1
   2:                  Apple_HFS Chameleon               939.5 MB   disk3s2
   3:                  Apple_HFS Media 2                 498.8 GB   disk3s3
======================================================
Backing up stage2 file /Volumes/Chameleon/boot to /Volumes/Chameleon/Chameleon.Backups/2012-01-28-17h16/boot
Moving /Volumes/Chameleon/Extra folder to /Volumes/Chameleon/Chameleon.Backups/2012-01-28-17h16/Extra
======================================================
Running Standard postinstall script
Target volume = /Volumes/Chameleon on /dev/disk3s2
Target disk already has existing Chameleon stage 0 loader - boot0hfs
======================================================
Stage 0 loader not written to /dev/disk3.
Written boot1h to /dev/rdisk3s2.
Written boot to /Volumes/Chameleon on /dev/disk3s2.
======================================================
Preparing to check target disk for previous installations.
Going to check the EFI system partition also.
Mounting /dev/disk3s1 as /Volumes/EFI.
Checking disk3.
Nothing found that could cause any problems.
======================================================
Disk: /dev/rdisk3   geometry: 60801/255/63 [976773168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -  976773167] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
 
Setting /Volumes/Chameleon partition active.
======================================================
Standard script complete
======================================================
Running Post postinstall script
Target volume = /Volumes/Chameleon
Added boot option: GenerateCStates=Yes
Added boot option: GeneratePStates=Yes
Added boot option: Graphics Mode=1920x1200x32
Added boot option: GraphicsEnabler=Yes
Added boot option: Legacy Logo=Yes
User selected to do an upgrade install.
Merging existing /Volumes/Chameleon/Extra folder.
------
Merging new options into org.chameleon.Boot.plist.
NOTE: Please check the new merged org.chameleon.Boot.plist as
NOTE: any existing keys will NOT have been updated.
NOTE: For example: If you already had Wait=No as a boot option
NOTE: and chose Wait=Yes from the list, this will NOT be changed.
------
Writing new Extra folder to: /Volumes/Chameleon/
Volume named 'EFI' is mounted...
Unmounting /dev/disk3s1
Cleanup: ,2
======================================================
Post script complete
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 03, 2012, 02:47:53 PM
Hi sapele

since the upgrade to 10.7 I get a blinking cursor at boot if my wd 2T Time Machine disk is connected.
So can you verify that you can boot fine perfectly well everytime when the WD 2T Time Machine disk is disconnected?

It was as if the disk identifiers had been thrown out of their previous order.
OS X can present the drives in a different order to how they are seen in the BIOS. Pressing TAB at Chameleon's GUI will show the numbering that Chameleon is using - you can then use those numbers for entering in the Default Partition boot option.

here is the installer file from chameleon
Thanks for posting the installer log. That looks fine, though you've cut the header from the top saying which Chameleon version you're using. Which version are you using?
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 03, 2012, 03:10:52 PM
Thanks for the super fast response!

Yes I can boot perfectly if the time machine disk is not connected.

I did not know about the tab option.  That will be very helpful going forward.

I had installed the following version of Chameleon.  r1785- I am not sure why?  I thought that i had stumbled upon a "nightly" or other sort of build so I downloaded r1394 which was reading as a stable version so I  ran the installer.  It looks like the header that I cut off is still showing the r1785 version?

Chameleon installer log - Sat Jan 28 17:16:31 EST 2012
Installer version: 2.1svn 1785
======================================================
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 03, 2012, 10:48:39 PM
You're Welcome :)

Thanks for the confirmation.

Can you please try installing the debug version of Boot0md (http://forum.voodooprojects.org/index.php/topic,2091.msg11176.html#msg11176) to see if that produces any feedback to help identify your issue?

Quick instructions:
• Boot in to OS X.
• Download the latest build of Chameleon from the buildbot (http://builds.voodooprojects.org/builds/Xcode4.2/) (it's Chameleon-2.1svn-r1814.tgz right now).
• Download the boot0workDBG file (linked to above), and copy it to Chameleon-2.1svn-r1814/usr/standalone/i386
• In the Finder, move Chameleon-2.1svn-r1814/usr/fdisk440 to Chameleon-2.1svn-r1814/usr/standalone/i386
• Open Terminal and type diskutil list to Identify the exact disk number to write to.
cd to Chameleon-2.1svn-r1814/usr/standalone/i386
• Type sudo fdisk440 -f boot0workDBG -u -y /dev/rdiskX (replacing X with the number you identified for your disk).

Then reboot with your time machine disk connected.
If you see any verbose debug output then please post it here.

I had installed the following version of Chameleon.  r1785- I am not sure why?  I thought that i had stumbled upon a "nightly" or other sort of build so I downloaded r1394 which was reading as a stable version so I  ran the installer.  It looks like the header that I cut off is still showing the r1785 version?
Thanks for confirming the log was from r1785.
You may have installed r1394 after installing r1785 as r1394 didn't generate an install log so the previous one would have remained.

As pointed to above, all latest versions of Chameleon, both compiled binaries and the installer can be found at the builtbot (http://builds.voodooprojects.org/builds/Xcode4.2/).
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 04, 2012, 02:01:24 AM
I am out of town for a few days.  I will be in front of the machine on Monday night and i will follow your instructions and report back.  Thanks again

sapele
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 07, 2012, 04:39:39 AM
I am having trouble getting got the buildbot from the links above.  Is the server down or do I need to go elsewhere?

Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 09, 2012, 01:36:15 PM
Hi Sapele

Yes, the buildbot is currently down.
I'll compile the latest Chameleon from source for you as soon as I can and post it here for you.  Can't do it right now as I'm in the middle of a big project.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 09, 2012, 02:52:31 PM
No rush, I thought I was going mad!  Best of luck with the project

Sapele
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 09, 2012, 09:46:05 PM
Thanks :)

Here's the compiled i386 folder from Chameleon r1814.
Hopefully you can still follow the above instructions with this.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 10, 2012, 02:13:39 AM
Not sure that I followed the directions correctly.  I got the following error in terminal

Sorry for the trouble
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 10, 2012, 09:00:26 AM
Ooops. Sorry.
Try this:

sudo ./fdisk440 -f boot0workDBG -u -y /dev/rdiskX

Note the ./ before fdisk440.
Also you don't need to add the slice number when writing to the MBR. So if the case above you'll be using rdisk0 and not rdisk0s2.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 10, 2012, 01:27:18 PM
I am the one that should be sorry!

I just made a mess of things and got the waiting for root devise.

Can I get verification the the following procedure is the right way to go.

I installed chameleon via the installer version 1785

then i open terminal type

sudo -s [Enter]
password [Enter]
cd [space] drag the i386 folder to the window [Enter]
sudo ./fdisk440 -f boot0workDBG -u -y /dev/rdisk0 [Enter]
exit [Enter]

Again I apologize for asking for the hand holding.


Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 10, 2012, 02:23:41 PM
Those steps are good. Just make sure you write the boot0workDBG code to the same disk that you pointed the Chameleon installer to. If you're not sure then check with diskutil list before issuing the command.

You can do it in two steps if you prefer:
1) Run the Chameleon installer to your target drive and populate your /Extra folder with required file eg. DSDT. Then reboot to make sure the Chameleon installation is working fine.
2) Use diskutil list to identify your drive and issue the command to write the debug code to your MBR, then reboot and report what messages you see while booting.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 10, 2012, 02:49:53 PM
I get the following error

fdisk440: could not open MBR file boot0workDBG: No such file or directory
bash-3.2#
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 10, 2012, 03:15:23 PM
Did you download and add boot0workDBG to the i386 folder?
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 10, 2012, 10:00:08 PM
That was it.

OK the following text appears with or without the drive connected just after the line

Verifying DMI Pool
PDptpppGll+_

then if I hit enter I get stuck at the blinking cursor (drive connected) with no further text

If the drive is not connected i hit enter and I see something like boot/ flash for a split second below the text then the cursor blinks fox a second or two in the upper left and the chameleon GUI begins.

Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 11, 2012, 10:42:25 AM
Well done for getting it to work :)

From what I can tell (based on dmazar's previously posted (http://forum.voodooprojects.org/index.php/topic,2091.msg10551.html#msg10551) results), the verbose text shows that boot0 is working correctly.

So I guess the next port of call will be to try a debug version of the stage 1 hfs code; boot1h.
However, I am having trouble compiling a debug version due to some errors:
Code: [Select]
boot1h.s:994: error: TIMES value -67 is negative
boot1h.s:1452: error: TIMES value -64 is negative
I see this is mentioned in the source code of boot1h.s and I guess a fix/workaround is needed to enable a successful build.
I'm trying a couple of different things here though to be honest I'm guessing and it might need to be looked at by one of the devs.

So for now, I guess my help here has come to a stop. I'll return here if I ever find a solution, or maybe somebody else could chip in with some solutions for this? or a reason why your machine won't boot with your time machine drive connected.

Go ahead and replace boot0workDBG with the standard boot0md if you want. You do it using the same steps with the command line as you used for writing boot0workDBG, but just write boot0md instead.

Regards
blackosx
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 11, 2012, 12:20:04 PM
Thanks so much for all of the help!

I will try a series of unscientific maneuvers, such as changing the data ports on my system and reformatting the time machine drive.  I will report back if anything makes a difference.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: dmazar on February 11, 2012, 04:52:35 PM
Hi guys.

Blackosx, unfortunately boot0* and boot1* can not be compiled with debug because debug code make them longer then it is allowed. Developers were probably loading and debugging them a bit differently then we are using it now.

Sapele, from reading what was posted so far, the only idea I got is that when you connect your 2T Time Machine disk computer use it as boot disk and tries to boot from it. But in this case, if you write boot0workDBG only to your 500 GB Chameleon disk and not to 2T disk you would not see debug output when booting with 2T disk connected.

Anyway, are you sure that you are still booting from 500G Chameleon disk even when you connect 2T disk? How are you connecting this disk and what "diskutil list" prints for it?

If I were you, I would try to see if stage 2 boot file (500G /Volumes/Chameleon/boot file) is being loaded with and without 2T disk.
If you have Chameleon on USB which you can use for booting, then you can delete or rename /Volumes/Chameleon/boot file and try to boot from 500G disk. You should get boot1: error with and without 2T disk.

Don't do it if you can not boot from this alternative USB method.

If you get this error with 2T disk connected, then we know boot0 and boot1h are working fine and problem is in stage 2 boot file.
If you do not get this error, then ... I do not know ... probably means that you are not booting from 500G drive.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on February 12, 2012, 10:26:14 AM
Hey dmazar :)

Yes, boot1h grew to 1088 bytes after force compiling with debug enabled. I tried hacking out the code for case sensitive filesystems to see if I could make space for debug by I failed miserably.. So I stopped doing that.

@Sapele - it's worth trying what dmazar suggested. For ref, you can build yourself a bootable USB flash drive easily enough with the Chameleon package installer which you already have. Just remember to add your DSDT and Extensions to the /Extra folder to match how you currently have it on your hard drive. Test booting from it before removing boot from your hard drive. You can then keep the USB booter as a backup rescue device if you ever need one.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: dmazar on February 12, 2012, 12:54:10 PM
Blackosx, maybe he has Advanced Format 4K drive. Real 4K, not 4K with 512 emulation. I've read that big external drives in USB cases usually are pure 4K drives. Chameleon stage 2 boot scans all drives for bootable volumes - maybe it hangs there. Do you know if stage 2 boot supports scanning of 4K drives?
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 12, 2012, 01:29:29 PM
Dmazar

Thanks for the suggestions.  I can verify that I get the boot 1 error with and without the drive connected.  That said I have made progress

I booted into OSX without the 2T time machine disk connected- plugged it in to one of the native data ports and it mounted the same as always (problem seemed to only happen at boot)  I then partitioned it in order to erase the disk (it GUID format)  then to my surprise I was able to reboot and GET PAST the blinking cursor problem!

OK I plan on setting the drive up for use with TimeMachine again.  I will let you know if the problem returns.

On another note I am not able to remove the debug version of boot.  I tried running the instructions with the following change, not sure that is what you had in mind Blackosx?  I am sure that you can tell that I am not very capable when it comes to working in terminal.  Sorry

sudo ./fdisk440 -f boot0md -u -y /dev/rdisk0
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: dmazar on February 12, 2012, 06:37:34 PM
Reformatting the drive would be the last thing I would do. Fortunately, you did it and it made some progress with it.  ;D

Your command for installing boot0md looks good. Just use diskutil list before, and make sure you are pointing to correct disk with /dev/rdiskX. And that boot0md is in your current folder - type "ls -al" before and check if it is listed.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 12, 2012, 07:54:46 PM
Thanks for the instructions, I will try it later.  More important things first.

The problem is resolved!  After the reformat and 735gigs of back up via TM I can successfully reboot the machine with the disk connected.  I wish that I understood why so that it could contribute to development, but that is way out of my limited understanding.

Thanks so much for all of the help
Sapele
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: dmazar on February 12, 2012, 08:24:07 PM
Great.

By the way, you can use volume name(s) in "Default Partition" and "Hide Partition" in boot config instead of hd(x,y).
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on February 12, 2012, 10:00:35 PM
Very cool I did not know that about the partition name. 

Am I supposed to remove the debug version of bootmd?  If I am I am not sure how to do that.

When I am done how would I check to make sure that I have executed all of the commands correctly?

thanks
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: dmazar on February 13, 2012, 09:40:20 AM
Debug version is the one that prints PDpt... letters and waits for key press during boot. If you still have it - you should remove it by installing regular version.

It's the same procedure as Blackosx explained before:
http://forum.voodooprojects.org/index.php/topic,2321.msg11558.html#msg11558 (http://forum.voodooprojects.org/index.php/topic,2321.msg11558.html#msg11558)
http://forum.voodooprojects.org/index.php/topic,2321.msg11534.html#msg11534 (http://forum.voodooprojects.org/index.php/topic,2321.msg11534.html#msg11534)
except that instead of boot0workDBG use boot0md.

If you can boot without those  PDpt... letters, then you have done it.
Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: sapele on March 06, 2012, 01:55:11 PM
I am so sorry to bother you all again.  I just can't get rid of the boo0workmd.  I followed the instructions to the letter and i still boot with the dppp string.

Could somebody provide instructions to remove the boot0workmd perhaps the boot0md is there too and will take over?  Grasping at straws here and I do not know where to look or how to delete anything.

thanks

Title: Re: Blinking cursor at boot when 2T WD Time Machine drive is connected
Post by: Blackosx on March 06, 2012, 02:50:33 PM
Welcome back sapele.

Here's what you need to do.
1 - Make sure you have a tested and working backup boot device such as a bootable USB flash drive. Every user should have at least one of these to hand to allow you to rescue the system incase you do something wrong.
2 - Identify the HDD you're booing from that has the boot0workDBG code in the MBR. You should know which drive has the code as you put it there previously. Make sure you know which disk you're going to update - don't guess!
3 - From within OS X, use diskutil list from the Terminal (as you've done before (http://forum.voodooprojects.org/index.php/topic,2321.msg11561.html#msg11561)) to find that drive's IDENTIFIER. for example, disk1
4 - Download the latest Chameleon from the buildbot (http://builds.voodooprojects.org/builds/Xcode4.2/) - as of now it's Chameleon-2.1svn-r1869.tgz. Put it on your desktop and double click the archive to extract the files.
5 - Back in Terminal, enter the following command but replace the X at the end with the disk number from step 3.
Code: [Select]
sudo ~/Desktop/Chameleon-2.1svn-r1869/usr/bin/fdisk440 -f ~/Desktop/Chameleon-2.1svn-r1869/usr/standalone/i386/boot0md -u -y /dev/rdiskXThe above command will write the boot0md file to the first 440 bytes of the boot sector of disk1, over writing the boot0workDBG code.

Any questions, just ask :)