Difference between revisions of "LSOD"
(New page: ''Login Screen of Death (LSOD)''' <br /> Many of you have probably run into this problem in the past, you a get a login screen and even if you can connect a keyboard or manage to share th...) |
|||
Line 1: | Line 1: | ||
− | ''Login Screen of Death (LSOD) | + | ''Login Screen of Death (LSOD)''<br /> |
Many of you have probably run into this problem in the past, you a get a login screen and even if you can connect a keyboard or manage to share the screen (not likely without the proper password) with no discernable solution in sight. | Many of you have probably run into this problem in the past, you a get a login screen and even if you can connect a keyboard or manage to share the screen (not likely without the proper password) with no discernable solution in sight. |
Revision as of 23:14, 17 November 2009
Login Screen of Death (LSOD)
Many of you have probably run into this problem in the past, you a get a login screen and even if you can connect a keyboard or manage to share the screen (not likely without the proper password) with no discernable solution in sight.
Problem
Login screen after abnormally long boot.
Potential Causes
/.readwrite file at root, this file is needed during at least one reboot to generate the necessary mach.sym file for kextloading (a prerequisite for everything fun on the AppleTV, from USB to AFP mounts) This file being persistent at root will always have the OSBoot partition mounted as readwrite, unplugging the AppleTV at any given time (on some units) can be plugged back in to reveal the surprise of the LSOD. In theory the netinfo database is getting corrupted during the unplug which causes securityd to report no autologin user.
Security.log Success example
Jul 9 15:21:00 localhost com.apple.SecurityServer: Entering service Jul 9 15:21:09 localhost SecurityAgent[124]: User Authenticated: continue login process Jul 9 15:21:09 localhost SecurityAgent[124]: Autologin user authenticated. Jul 9 15:21:09 localhost com.apple.SecurityServer: authinternal authenticated user frontrow (uid 501). Jul 9 15:21:10 localhost com.apple.SecurityServer: Succeeded authorizing right system.login.console by process /System/Library/CoreServices/loginwindow.app for authorization created by /System/Library/CoreServices/loginwindow.app. Jul 9 15:21:10 localhost com.apple.SecurityServer: Succeeded authorizing right system.login.done by process /System/Library/CoreServices/loginwindow.app for authorization created by /System/Library/CoreServices/loginwindow.app. Jul 9 15:21:11 localhost com.apple.SecurityServer: Succeeded authorizing right system.preferences by process /System/Library/CoreServices/Finder.app for authorization created by /System/Library/CoreServices/Finder.app. Jul 9 15:21:11 localhost com.apple.SecurityServer: Succeeded authorizing right system.preferences by process /System/Library/PrivateFrameworks/AppleTV.framework/Resources/SettingsHelper for authorization created by /System/Library/CoreServices/Finder.app. Jul 9 15:21:11 localhost com.apple.SecurityServer: Succeeded authorizing right system.preferences by process /System/Library/PrivateFrameworks/AppleTV.framework/Resources/SettingsHelper for authorization created by /System/Library/CoreServices/Finder.app.
Security log Unsuccessful example:
Jul 9 15:49:21 localhost com.apple.SecurityServer: Entering service Jul 9 15:49:42 AppleTV SecurityAgent[128]: Unable to create user list Jul 9 15:49:42 AppleTV SecurityAgent[128]: Could not get the user record from DirectoryServices for autologin user. Jul 9 15:49:42 AppleTV SecurityAgent[128]: Will sleep 3 seconds and try again (retryCount = 5) Jul 9 15:49:46 AppleTV SecurityAgent[128]: Unable to create user list Jul 9 15:49:46 AppleTV SecurityAgent[128]: Could not get the user record from DirectoryServices for autologin user. Jul 9 15:49:46 AppleTV SecurityAgent[128]: Will sleep 3 seconds and try again (retryCount = 4) Jul 9 15:49:49 AppleTV SecurityAgent[128]: Unable to create user list Jul 9 15:49:49 AppleTV SecurityAgent[128]: Could not get the user record from DirectoryServices for autologin user. Jul 9 15:49:49 AppleTV SecurityAgent[128]: Will sleep 3 seconds and try again (retryCount = 3) Jul 9 15:49:52 AppleTV SecurityAgent[128]: Unable to create user list Jul 9 15:49:52 AppleTV SecurityAgent[128]: Could not get the user record from DirectoryServices for autologin user. Jul 9 15:49:52 AppleTV SecurityAgent[128]: Will sleep 3 seconds and try again (retryCount = 2) Jul 9 15:49:55 AppleTV SecurityAgent[128]: Unable to create user list Jul 9 15:49:55 AppleTV SecurityAgent[128]: Could not get the user record from DirectoryServices for autologin user. Jul 9 15:49:55 AppleTV SecurityAgent[128]: Will sleep 3 seconds and try again (retryCount = 1) Jul 9 15:49:58 AppleTV SecurityAgent[128]: Showing Login Window
Solution
A solution has finally been created for this somewhat prevalent and extremely pesky problem. A little life raft has been floating underneath us the entire time (unbeknownst to most of us of course) rc.redirect in /etc has been "hiding" some juicy secrets about /SeedScratch. Long story short, you will need the atvusb-creator and a thumb drive to get this process going.
After getting your thumbdrive and the creator ready you will choose any AppleTV update image (needed for the crucial boot.efi file) and the mounted thumb drive of choice. Create a ATV-patchstick with any settings (they wont matter, we will be replacing the patchstick.sh with one of our own creation for the fix)
After your patchstick has been created make sure its mounted to the desktop, open the patchstick.sh script and replace it with the following contents (VERBATIM!)
#!/bin/bash exec 2>/dev/console exec 1>/dev/console echo echo " --- AppleTV Patchstick by ATVUSB-Creator ---" echo " * mounting OSBoot partition" echo " * mounting OSBoot partition" mkdir -p /OSBoot fsck.hfsplus -f /dev/sda3 mount -t hfsplus -o rw,force /dev/sda3 /OSBoot sleep 1 # if we successfully mount /OSBoot if [ -d "/OSBoot/dev" ]; then echo " * mounting Media partition" fsck.hfsplus -f /dev/sda4 mount -t hfsplus -o rw,force /dev/sda4 /OSBoot/mnt sleep 1 if [ -d "/OSBoot/Users/frontrow" ]; then rm -rf /OSBoot/mnt/Scratch/private/var/vm rm -rf /OSBoot/mnt/Scratch/private/tmp rm -rf /OSBoot/mnt/Scratch/System/Library/CoreServices/SystemVersion.plist rm -rf /OSBoot/mnt/Scratch/System/Library/Caches rm -rf /OSBoot/mnt/Scratch/Library/Caches rm -rf /OSBoot/mnt/Scratch/private/etc/sudoers rm -rf /OSBoot/mnt/Scratch.old mv /OSBoot/mnt/Scratch /OSBoot/mnt/Scratch.old rsync -v -a /OSBoot/SeedScratch /OSBoot/mnt/Scratch else echo " * error mounting Media partition" fi else echo " * error mounting OSBoot partition" fi sync umount /OSBoot/mnt umount /OSBoot echo " * Please unplug your Apple TV to reboot/reset the device." echo echo " * If you received no errors above, then you can plug in your Apple TV, " echo " wait 3 minutes, then open Terminal and type: ssh frontrow@appletv.local " echo " * When prompted for a password, enter: frontrow" echo echo " * For other ssh clients (putty, etc): " echo " Hostname: appletv.local Username: frontrow Password: frontrow" #sleep 100000