The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   Tiger Startup Issues (http://hintsforums.macworld.com/showthread.php?t=41571)

CGarson 06-30-2005 02:05 PM

Tiger Startup Issues
 
I'm having a bit of trouble with Tiger on startup. I'm new to Mac OSX, but have had a lot of Unix experiance in the past. One major difference between Tiger and Panther is the way it gets the boot device thru the Kernel. In Panther, it was predefined thru an IO Path to the disk and partition. In Tiger, however, it is "searched" for by the device that has the "boot-uuid-media" tag to it. When there is a CD in the iBook, it takes no time to get it at all, but when there is not, it takes about 25-30 seconds to get past that point. I've tried specifying the boot args in Open Firmware to:

rd=*hd:10,\\mach_kernel
rd=*hd:10,\mach_kernel
rd=*/pci@2f000000/mac-io@17/ata-4@1f000/disk0@10
rd=*/pci@2f000000/mac-io@17/ata-4@1f000/disk0@10,\\mach_kernel
rd=*/pci@2f000000/mac-io@17/ata-4@1f000/disk0@10,\mach_kernel
rd=*/pci@2f000000/mac-io@17/ata-4@1f000/@0:10
rd=*/pci@2f000000/mac-io@17/ata-4@1f000/@0:10,\\mach_kernel
rd=*/pci@2f000000/mac-io@17/ata-4@1f000/@0:10,\mach_kernel

Most of these end instantly in a kernel panic "Wait for root device failed" and the panic is "We are hanging here...". If I specify an IO path or a device name that doesn't exist, it will hang with a "Still waiting for root device". When specifying the above, the search does change to IOPathMatch. If anyone has any input or if I'm completly missing something, please let me know.

Thank you,
Chris

giskard22 06-30-2005 03:35 PM

Could you maybe be more specific about what you're trying to accomplish?

CGarson 06-30-2005 04:04 PM

Tiger searches for a boot device as opposed to it being specified in a kernel argument called "rd". The searching thru the IOKit on older machines can sometimes take a while and I'm trying to hard code it in a kernel argument.

hayne 07-01-2005 12:58 AM

I think what was being asked was more a "why" sort of question.
I.e. what are you trying to accomplish at an end-user-visible level? What different functionality are you looking for than what is delivered by the iBook with factory settings?

CGarson 07-02-2005 12:04 AM

As I said, I wish to make it faster by almost 30 seconds on bootup because the searching for a device with boot-uuid-media can take a while. I would appriciate help rather than questioning why I'm trying to do something.

xlax999999 07-02-2005 12:20 AM

Quote:

Originally Posted by CGarson
I would appriciate help rather than questioning why I'm trying to do something.

That is a really stupid statement. For different WHYS there are different HOWS.

CGarson 07-02-2005 12:32 AM

I already specified the "why" in the first post anyway. All I want help on is how to pass a correct root device to Mach on Tiger.

hayne 07-02-2005 01:24 AM

Quote:

Originally Posted by CGarson
I already specified the "why" in the first post anyway. All I want help on is how to pass a correct root device to Mach on Tiger.

You aren't paying attention.
I asked why you want to do this. If it's idle curiosity then I'll just drop it. But normally when someone is fiddling around with this sort of thing it is because they are looking for some extra functionality. If such is the case, please have the courtesy to explain why you are doing this fiddling around with the boot sequence.

CGarson 07-02-2005 10:23 AM

This was clearly specified in the origional post of this thread. I would suggest reading the entire first post before replying to any thread.

The iBook takes 30 seconds to get past looking for the bootup device because it searches for it rather than being statically specified as it did in Panther. I am simply trying to specify it rather then look so it doesn't take 30-45 seconds to look for it. If you do not have anything helpful to say, please don't reply.

Also, please don't post a reply saying why this specific post has anything that you do not agree with. I am looking for help, not a flame war.

hayne 07-02-2005 05:33 PM

Quote:

Originally Posted by CGarson
The iBook takes 30 seconds to get past looking for the bootup device

This is not normal. I.e. unless you have modified something with your iBook or are trying to do something unusual, the fact that you seem to be experiencing that long a delay at startup indicates that there is something wrong with your iBook (hardware or software).

Your initial (and subsequent) posts did not seem to indicate that you were encountering a problem with a vanilla system - so we all assumed that you were trying to do something different and hence wanted to know what your high-level goal was.

I'm still not sure what your situation is. Please clarify if you have a vanilla iBook that is experiencing a longer than usual startup time, or if you are trying to change the behaviour of a modified system.

If it still isn't clear why we are asking the "why" questions, it is analogous to someone asking about what fuel-air mixture should be used in their car instead of saying that they are getting very bad mileage and asking for help in fixing this.

CGarson 07-02-2005 05:47 PM

This happens on all 64 iBooks at this particular organization on Tiger. It pauses for 30 or so seconds on the boot device selection when it searches for a device with the boot-uuid-media tag. It does this unmodified. It does not do this, however, when there is a CD in the drive probobly because it has fewer places to look, etc. If I can specify a boot device using the values I stated above, I could tell it where to find it rather than have it search through IOResourceMatch and through IOPathMatch so it would have one specific place to go. If there is a better way to do is, let me know. It is an older iBook, but I was hoping this would solve the issue.

Quote:

it is analogous to someone asking about what fuel-air mixture should be used in their car instead of saying that they are getting very bad mileage and asking for help in fixing this.
True, but I would like to know this anyway even if it did not solve the issue.

hayne 07-02-2005 05:53 PM

The usual way to specify the boot device is via the "Startup Disk" preference panel. I would recommend reverting whatever Open Firmware changes you have made and then use the preference panel to set the startup disk.

The 30 second delay sounds like what you might get if it hasn't got any startup disk specified and it is searching the network for a boot disk.
One thing you should definitely try (if setting the startup disk via preferences doesn't improve things) is to disconnect the iBook from the network to see if that makes a difference.

CGarson 07-02-2005 05:56 PM

The kernel would try the network boot after it fails to find a local boot device. If would switch the root device to en0 and try to boot over the network and then it fails.

The OF boot device and the Kernel boot device are 2 different things. OF is working properly and the startup disk is working, but since I can specifiy a boot-args thru OF, I was using that to pass the rd value to the kernel. OF boots into the kernel successfully, however the kernel then tries to find a boot device aswell which is causing this issue.

hayne 07-02-2005 06:21 PM

So, as far as I can understand, you have vanilla iBooks (but older ones - how old? Are these dual-USB iBooks (white) or clamshell iBooks (coloured)?) and something is making them do an unnecessary search for boot device at startup, thus causing a 30 second delay.
Perhaps this is due to the older hardware not being fully compatible with Tiger? There is no such delay with the newer iBooks I have experience with.
I think you'd be best to phone Apple about this.

CGarson 07-02-2005 06:28 PM

I've seen the same path I specified above which the iBook reports being the path being used on even older Apples and it does not take but a second on the search. This pretty much rules out old hardware. The search happens on all Tiger machines. Any ideas on how to specify the boot device in the kernel manually correctly? It is a dual USB white iBook.

chabig 07-02-2005 08:59 PM

Quote:

Originally Posted by CGarson
The search happens on all Tiger machines.

I don't think that's correct. It only happens on *your* Tiger machines. I don't think anyone else's machine does it, leading me to suspect that you have screwed it up in some way (64 times).

I would recommend you follow Haynes advice and revert any OF changes you have made. If that is not possible, reinstall Tiger.

CGarson 07-02-2005 09:13 PM

I have reinstalled tiger a couple times using the origional install DVD. I am certain this happens on all Tiger machines because every kernel boot text you see on tiger has "rooting via boot-uuid" and has below it a "IOResourceMatch" which searches the IO tree for the device that is marked with that. OF has also been reset many times.

giskard22 07-02-2005 09:21 PM

If you try this without doing a Verbose boot, what's on screen during this long 30-second pause? Just grey background? The system folder-question mark icon?

I don't have any iBooks, but I have installed Tiger on a bunch of different Mac hardware from the last 4 years and haven't seen anything resembling your problem.

CGarson 07-02-2005 09:25 PM

It's the gray screen with the wheel turning and the Apple logo. This may be a longshot but the only thing I can think of is that I had to install it from a firewire DVDROM. I don't think that has anything to do with it, but that's the only abnormal thing that I have done.

Once again, it is the kernel searching, NOT open firmware.

giskard22 07-02-2005 10:54 PM

According to Apple's training materials for service providers, when you see the grey Apple logo on screen it means that the BootX loader has been found on a startup device. What's happening during the time you have the spinning wheel is the kernel is loading device drivers. If it can't find a valid kext cache, BootX has to re-scan the contents of /System/Library/Extensions. Then, launchd gets started, and I believe it performs some tasks before loginwindow loads. So I think you may be barking up the wrong tree, so to speak. The problem isn't that the iBooks can't find the right boot device. The problem is the initial phase of the OS startup process is taking a long time.

CGarson 07-03-2005 12:01 AM

BootX loads and then the kernel looks for a boot device using boot-uuid-media as the search term thru the IO Kit. This is all a Kernel move, not the OF. In verbose mode, it stays on that search for 30-45 seconds. The initial startup process is not the issue, its getting the boot device from the IOKit thru the kernel. It boots into the kernel fine, but the kernel looks for the correct device to look for the root device on. BootX just gets you into the kernel, BootX does not scan anything. It's the middleman from OF to Mach.

Once again, this is the kernel, NOT Open Firmware.

hayne 07-03-2005 01:09 AM

1) Here is an extract from the system.log on my iBook (running 10.4.1) showing that the search for the appropriate root filesystem takes very little time in a properly functioning system
(I xxx'd out the UUID for my system):
Code:

Jun 25 02:24:51 localhost kernel[0]: rooting via boot-uuid from /chosen: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
Jun 25 02:24:51 localhost kernel[0]: Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
Jun 25 02:24:51 localhost kernel[0]: Got boot device = IOService:/MacRISC2PE/pci@f4000000/AppleMacRiscPCI/ata-6@D/AppleKauaiATA/ATADeviceNub@0/IOATABlockStorageDriver/IOATABlockStorageDevice/IOBlockStorageDriver/TOSHIBA MK8025GAS Media/IOApplePartitionScheme/Untitled@3
Jun 25 02:24:51 localhost kernel[0]: BSD root: disk0s3, major 14, minor 2
Jun 25 02:24:51 localhost kernel[0]: Jettisoning kernel linker.

2) The term "boot-uuid" occurs in the following files (obtained from http://www.opensource.apple.com/darwinsource/10.4.1):

BootX/bootx.tproj/sl.subproj/main.c
AppleFileSystemDriver.cpp
xnu/iokit/bsddev/IOKitBSDInit.cpp

The first one is where the "boot-uuid" property is set.
The second is the kernel extension that sets up a notification when a new filesystem is mounted.
The third is where the filesystem with the specified "boot-uuid" property is searched for (and waited for). Thus looking at this file might give you a clue as to what is going wrong.

3) Googling for "boot-uuid" shows several pages relating to XPostFacto (3rd-party utility used for getting OS X to boot on hardware that is otherwise unsupported) and the release notes for a recent version of XPostFacto says: "Disabled the new "boot-uuid" code in BootX, as it appears to have been causing problems in some configurations".

4) Since your iBooks are relatively new (and hence should be supported in Tiger), I suspect that there must be something wrong with them. Perhaps it is a problem due to the way that you installed Tiger. Or, if you imaged all of these 64 machines from the same media, maybe the media was bad.

CGarson 07-03-2005 01:28 AM

I appriciate the detailed info. I looked in my system.log aswell and the wierd thing was that the timestamp next to "Waiting on..." and "Got boot device" was within the same second yet it CLEARLY took at least 30 to do it in verbose mode or in any mode for that matter. Perhaps this is a hardware problem or a media problem. Do you think installing from a Firewire drive could have anything to do with it? Bad drive is also a possibility. Thanks for your input and I will update when I try new media/new drive. I used the origional Tiger install DVD, however. The same copy of Tiger on the same media works fine on PowerBooks and the like except these iBooks so maybe it's something else. I'll look into it. Thanks again.

I still would like to try passing a correct boot device to the kernel and this can be done by using the rd argument. Please let me know if you have any information on doing that. I've tried almost every single path. Specifying a device will override the boot-uuid-media search.

CGarson 07-03-2005 01:32 AM

I also noticed that your iBook is using newer device paths and different device software than ours. Ours uses pci@f200000 and ata-4, etc.

hayne 07-03-2005 01:41 AM

Quote:

Originally Posted by CGarson
I still would like to try passing a correct boot device to the kernel and this can be done by using the rd argument. Please let me know if you have any information on doing that. I've tried almost every single path. Specifying a device will override the boot-uuid-media search.

I don't have any experience with doing this.
But as to info, the best info is the source code - see above.

CGarson 07-03-2005 02:11 AM

Quote:

Originally Posted by hayne
But as to info, the best info is the source code - see above.

I'm looking now. I changed the code in the last file and am trying to recompile, but Apple didn't include automake :rolleyes:... Thanks for the info and I'll post back.

hayne 07-03-2005 08:09 AM

Quote:

Originally Posted by CGarson
I changed the code in the last file and am trying to recompile, but Apple didn't include automake

If you are trying to recompile the kernel, you will need to read the instructions provided by Apple on how to do this - it didn't look very easy the last time I glanced at the instructions.

voldenuit 07-03-2005 12:30 PM

Chris, you have indeed exhibited detailed knowledge here, please don't get me wrong when I ask, in spite of your analysis so far pointing elsewhere, whether you made sure that no fs or cache-corruption are the culprits here by running applejack or equivalent.

Good luck with the compilation anyway.


All times are GMT -5. The time now is 05:58 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.