diff --git a/modules/block/block.install b/modules/block/block.install
index fcb95fc..c4509f2 100644
--- a/modules/block/block.install
+++ b/modules/block/block.install
@@ -461,5 +461,25 @@ function block_update_7007() {
 }
 
 /**
+ * Rename primary-links and secondary-links delta to main-menu and secondary-menu.
+ */
+function block_update_7008() {
+  $rename = array(
+    'primary-links' => 'main-menu',
+    'secondary-links' => 'secondary-menu',
+  );
+
+  foreach ($rename as $from_menu => $to_menu) {
+    $count = db_query('SELECT COUNT(*) FROM {block} WHERE delta = :delta', array(':delta' => $to_menu))->fetchField();
+    if ($count === 0) {
+      db_update('block')
+        ->fields(array('delta' => $to_menu))
+        ->condition('delta', $from_menu)
+        ->execute();
+    }
+  }
+}
+
+/**
  * @} End of "addtogroup updates-6.x-to-7.x"
  */
diff --git a/modules/menu/menu.install b/modules/menu/menu.install
index 05aed28..4590943 100644
--- a/modules/menu/menu.install
+++ b/modules/menu/menu.install
@@ -63,9 +63,61 @@ function menu_install() {
 }
 
 /**
+ * Rename primary-links and secondary-links to main-menu and secondary-menu.
+ * Also migrate the "Default menu for content" setting to individual node types.
+ */
+function menu_update_7000() {
+  // Rename menus if the target menu doesn't already exist.
+  $rename = array(
+    'primary-links' => array('main-menu', 'Main menu'),
+    'secondary-links' => array('secondary-menu', 'Secondary menu'),
+  );
+  $default_node_menu = variable_get('menu_default_node_menu');
+  foreach ($rename as $from_menu => $to) {
+    list($to_menu, $to_title) = $to;
+    $count = db_query('SELECT COUNT(*) FROM {menu_custom} WHERE menu_name = :menu_name', array(':menu_name' => $to_menu))->fetchField();
+    if ($count === 0) {
+      db_update('menu_links')
+        ->fields(array('menu_name' => $to_menu))
+        ->condition('menu_name', $from_menu)
+        ->execute();
+      db_update('menu_custom')
+        ->fields(array('menu_name' => $to_menu, 'title' => $to_title))
+        ->condition('menu_name', $from_menu)
+        ->execute();
+      if ($default_node_menu == $from_menu) {
+        variable_set('menu_default_node_menu', $to_menu);
+      }
+    }
+  }
+
+  // Migrate the "Default menu for content" setting to individual node types.
+  if (isset($default_node_menu)) {
+    // Remove variable no longer used in Drupal 7.
+    variable_del('menu_default_node_menu');
+
+    // Make sure the menu chosen as the default still exists.
+    $defined_menus = db_query('SELECT * FROM {menu_custom}')->fetchAllAssoc('menu_name', PDO::FETCH_ASSOC);
+    if (isset($defined_menus[$default_node_menu])) {
+      // Update the menu settings for each node type.
+      foreach (_update_7000_node_get_types() as $type => $type_object) {
+        // If the site already has a custom menu setting for this node type (set
+        // on the initial upgrade to Drupal 7.0), don't override it.
+        $type_menus = variable_get('menu_options_' . $type);
+        if (!isset($type_menus)) {
+          // Set up this node type so that the Drupal 6 "Default menu for content"
+          // is still available in the "Menu settings" section.
+          variable_set('menu_options_' . $type, array($default_node_menu));
+          variable_set('menu_parent_' . $type, $default_node_menu . ':0');
+        }
+      }
+    }
+  }
+}
+
+/**
  * Implements hook_uninstall().
  */
 function menu_uninstall() {
   menu_rebuild();
 }
-
