--- system/sys/kernel/kernel/init.c.orig	2009-10-20 03:57:23.655146341 -0600
+++ system/sys/kernel/kernel/init.c	2009-10-20 03:56:05.115225625 -0600
@@ -340,6 +340,7 @@
 		return ( -ENOMEM );
 	}
 
+	bool tryHardMediums = false;
 	do
 	{
 		char *azDevs[] = { "/dev/disk/ata", "/dev/disk/scsi", NULL };
@@ -362,28 +363,47 @@
 					if ( strcmp( sDiskDirEnt.d_name, "." ) == 0 || strcmp( sDiskDirEnt.d_name, ".." ) == 0 )
 						continue;
 
-					if ( sDiskDirEnt.d_name[0] != 'c' )	/* Ignore any drives which are not CD's */
-						continue;
+					if ( sDiskDirEnt.d_name[0] != 'c' ) {
+						if( tryHardMediums )	/* Warn that we're attempting to mount a non-removable medium. */
+							kerndbg( KERN_INFO, "Attempting to mount non-CD/DVD device %s...\n", pzDiskPathBuf );
+						else
+							continue;
+					}
 
 					strcpy( pzDiskPathBuf, zDev );
 					strcat( pzDiskPathBuf, "/" );
 					strcat( pzDiskPathBuf, sDiskDirEnt.d_name );
-					strcat( pzDiskPathBuf, "/raw" );
 
-					kerndbg( KERN_INFO, "Checking for disk in %s\n", pzDiskPathBuf );
+					int hDevDirParts = open( pzDiskPathBuf, O_RDONLY );
+					struct kernel_dirent sPartDirEnt;
 
-					/* Try to mount the disk */
-					nError = sys_mount( pzDiskPathBuf, "/boot", g_zBootFS, 0, g_zBootFSArgs );
-
-					if ( nError < 0 )
+					while ( getdents( hDevDirParts, &sPartDirEnt, sizeof( sPartDirEnt ) ) == 1 && bFound == false )
 					{
-						kerndbg( KERN_INFO, "Unable to mount %s\n", pzDiskPathBuf );
-						continue;
+						strcpy( pzDiskPathBuf, zDev );
+						strcat( pzDiskPathBuf, "/" );
+						strcat( pzDiskPathBuf, sDiskDirEnt.d_name );
+						strcat( pzDiskPathBuf, "/" );
+						strcat( pzDiskPathBuf, sPartDirEnt.d_name );
+
+						kerndbg( KERN_INFO, "Checking partition %s\n", pzDiskPathBuf );
+
+
+						/* Try to mount the disk */
+						nError = sys_mount( pzDiskPathBuf, "/boot", g_zBootFS, 0, g_zBootFSArgs );
+
+						if ( nError < 0 )
+						{
+							kerndbg( KERN_INFO, "Unable to mount %s\n", pzDiskPathBuf );
+							continue;
+						}
+						else
+						{
+							kerndbg( KERN_INFO, "Found disk in %s\n", pzDiskPathBuf );
+							strcpy( g_zBootDev, pzDiskPathBuf );
+							bFound = true;
+						}
 					}
-
-					kerndbg( KERN_INFO, "Found disk in %s\n", pzDiskPathBuf );
-					strcpy( g_zBootDev, pzDiskPathBuf );
-					bFound = true;
+					close( hDevDirParts );
 				}
 
 				close( hDevDir );
@@ -392,6 +412,9 @@
 
 		if( bFound == false )
 			snooze( 1000000 );
+
+		/* On the next circuit, also check non-disc storage.  USB devices principally. */
+		tryHardMediums = true;
 	}
 	while( bFound == false );
 
@@ -438,7 +461,7 @@
 	printk( "Mount boot FS: %s %s %s\n", g_zBootDev, g_zBootFS, g_zBootFSArgs );
 	mkdir( "/boot", 0 );
 
-	if ( strcmp( g_zBootDev, "@boot" ) == 0 )
+	if ( strcmp( g_zBootDev, "@search" ) == 0 )
 	{
 		if ( find_boot_dev() < 0 )
 		{
@@ -447,9 +470,15 @@
 		else
 			printk( "Found boot device\n" );
 	}
-	else if ( sys_mount( g_zBootDev, "/boot", g_zBootFS, 0, g_zBootFSArgs ) < 0 )
-	{
-		printk( "Error: failed to mount boot file system.\n" );
+	else {
+		bool bFound = false;
+		do {
+			/* Keep trying, once per second.  What do we have to lose, if we can't boot, we're frozen anyway. */
+			if ( sys_mount( g_zBootDev, "/boot", g_zBootFS, 0, g_zBootFSArgs ) < 0 )
+				snooze( 1000000 );
+			else
+				bFound = true;
+		} while( !bFound );
 	}
 
 	g_bRootFSMounted = true;
