Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 15595)
+++ wp-includes/taxonomy.php	(working copy)
@@ -70,6 +70,19 @@
 		'show_ui' => false,
 		'_builtin' => true,
 	) ) ;
+
+	register_taxonomy( 'post_mode', array('post', 'page', 'attachment'), array(
+		'hierarchical' => false,
+		'labels' => array(
+			'name' => '',
+			'singular_name' => '',
+		),
+		'query_var' => false,
+		'rewrite' => false,
+		'show_ui' => false,
+		'_builtin' => true,
+		'show_in_nav_menus' => false,
+	) ) ;
 }
 add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
 
Index: wp-includes/version.php
===================================================================
--- wp-includes/version.php	(revision 15595)
+++ wp-includes/version.php	(working copy)
@@ -15,7 +15,7 @@
  *
  * @global int $wp_db_version
  */
-$wp_db_version = 15477;
+$wp_db_version = 15595;
 
 /**
  * Holds the TinyMCE version
Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php	(revision 15595)
+++ wp-admin/includes/upgrade.php	(working copy)
@@ -291,9 +291,57 @@
 		if ( !is_super_admin( $user_id ) && $user_id != 1 )
 			$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $wpdb->base_prefix.'1_capabilities') );
 	}
+
+	wp_install_post_modes(true);
 }
 endif;
 
+/**
+ * Install the default post modes
+ *
+ * @param boolean $scratch_install Whether this is being called during a scratch install. Default is false.
+ */
+function wp_install_post_modes( $scratch_install = false ) {
+	// These are purposefully not translated.
+	$modes = array( 'aside' => 'Aside',
+				   'chat' => 'Chat',
+				   'gallery' => 'Gallery',
+				   'image' => 'Image',
+				   'link' => 'Link',
+				   'quote' => 'Quote',
+				   'video' => 'Video'
+				  );
+
+	// Dummy gettext calls to get the strings in the default catalog.
+	// @todo context and hints
+	__('Aside');
+	__('Chat');
+	__('Gallery');
+	__('Image');
+	__('Link');
+	__('Quote');
+	__('Video');
+
+	$term_id = 3; // Bump this if the sequence in wp_install_defaults() changes.
+	foreach ( $modes as $slug => $name ) {
+		if ( $scratch_install ) {
+			if ( global_terms_enabled() ) {
+				$term_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) );
+				if ( $term_id == null ) {
+					$wpdb->insert( $wpdb->sitecategories, array('cat_ID' => 0, 'cat_name' => $name, 'category_nicename' => $slug, 'last_updated' => current_time('mysql', true)) );
+					$term_id = $wpdb->insert_id;
+				}
+			}
+
+			$wpdb->insert( $wpdb->terms, array('term_id' => $term_id, 'name' => $name, 'slug' => $slug, 'term_group' => 0) );
+			$wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $term_id, 'taxonomy' => 'post_mode', 'description' => '', 'parent' => 0));
+			$term_id++;
+		} elseif ( !term_exists($name, 'post_mode') ) {
+			wp_insert_term($name, 'post_mode', array('slug' => $slug));
+		}
+	}
+}
+
 if ( !function_exists('wp_new_blog_notification') ) :
 /**
  * {@internal Missing Short Description}}
@@ -400,6 +448,8 @@
 
 	populate_options();
 
+	wp_install_post_modes();
+
 	if ( $wp_current_db_version < 2541 ) {
 		upgrade_100();
 		upgrade_101();
