diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 9f8088a..652a669 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -5,6 +5,7 @@
 use Drupal\Component\Utility\Crypt;
 
 use Drupal\Component\Utility\Settings;
+use Drupal\Core\Config\BootstrapConfigStorageFactory;
 use Drupal\Core\Config\FileStorage;
 use Drupal\Core\DrupalKernel;
 use Drupal\Core\Database\Database;
@@ -437,10 +438,9 @@ function install_begin_request(&$install_state) {
     }
   }
 
-  // Ensure that the active configuration directory is empty before installation
-  // starts.
+  // Ensure that the active configuration is empty before installation starts.
   if ($install_state['config_verified'] && empty($task)) {
-    $config = \Drupal::service('config.storage')->listAll();
+    $config = BootstrapConfigStorageFactory::get()->listAll();
     if (!empty($config)) {
       $task = NULL;
       throw new AlreadyInstalledException($container->get('string_translation'));
diff --git a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingSettingsTest.php b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingDatabaseSettingsTest.php
similarity index 89%
copy from core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingSettingsTest.php
copy to core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingDatabaseSettingsTest.php
index 9b341bf..b1c3e4d 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingSettingsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingDatabaseSettingsTest.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Installer\InstallerEmptySettingsTest.
+ * Contains \Drupal\system\Tests\Installer\InstallerExistingDatabaseSettingsTest.
  */
 
 namespace Drupal\system\Tests\Installer;
@@ -13,14 +13,14 @@
 /**
  * Tests the installer to make sure existing values in settings.php appear.
  */
-class InstallerExistingSettingsTest extends InstallerTestBase {
+class InstallerExistingDatabaseSettingsTest extends InstallerTestBase {
 
   /**
    * {@inheritdoc}
    */
   public static function getInfo() {
     return array(
-      'name' => 'Installer Existing Settings Test',
+      'name' => 'Installer existing database settings',
       'description' => 'Tests the installer with an existing settings file with database connection info.',
       'group' => 'Installer',
     );
diff --git a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingSettingsTest.php b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingSettingsTest.php
index 9b341bf..2b765a5 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingSettingsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerExistingSettingsTest.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Installer\InstallerEmptySettingsTest.
+ * Contains \Drupal\system\Tests\Installer\InstallerExistingSettingsTest.
  */
 
 namespace Drupal\system\Tests\Installer;
@@ -20,17 +20,27 @@ class InstallerExistingSettingsTest extends InstallerTestBase {
    */
   public static function getInfo() {
     return array(
-      'name' => 'Installer Existing Settings Test',
-      'description' => 'Tests the installer with an existing settings file with database connection info.',
+      'name' => 'Installer existing settings',
+      'description' => 'Tests the installer with an existing settings file.',
       'group' => 'Installer',
     );
   }
 
   /**
    * {@inheritdoc}
+   *
+   * Fully configures a preexisting settings.php file before invoking the
+   * interactive installer.
    */
   protected function setUp() {
-    // Pre-configure database credentials in settings.php.
+    // Pre-configure hash salt.
+    // Any string is valid, so simply use the class name of this test.
+    $this->settings['settings']['hash_salt'] = (object) array(
+      'value' => __CLASS__,
+      'required' => TRUE,
+    );
+
+    // Pre-configure database credentials.
     $connection_info = Database::getConnectionInfo();
     unset($connection_info['default']['pdo']);
     unset($connection_info['default']['init_commands']);
@@ -39,29 +49,30 @@ protected function setUp() {
       'value' => $connection_info,
       'required' => TRUE,
     );
+
+    // Pre-configure config directories.
+    $this->settings['config_directories'] = array(
+      CONFIG_ACTIVE_DIRECTORY => (object) array(
+        'value' => conf_path() . '/files/config_active',
+        'required' => TRUE,
+      ),
+      CONFIG_STAGING_DIRECTORY => (object) array(
+        'value' => conf_path() . '/files/config_staging',
+        'required' => TRUE,
+      ),
+    );
+    mkdir($this->settings['config_directories'][CONFIG_ACTIVE_DIRECTORY]->value, 0777, TRUE);
+    mkdir($this->settings['config_directories'][CONFIG_STAGING_DIRECTORY]->value, 0777, TRUE);
+
     parent::setUp();
   }
 
   /**
    * {@inheritdoc}
-   *
-   * @todo The database settings form is not supposed to appear if settings.php
-   *   contains a valid database connection already (but e.g. no config
-   *   directories yet).
    */
   protected function setUpSettings() {
-    // All database settings should be pre-configured, except password.
-    $values = $this->parameters['forms']['install_settings_form'];
-    $driver = $values['driver'];
-    $edit = array();
-    if (isset($values[$driver]['password']) && $values[$driver]['password'] !== '') {
-      $edit = $this->translatePostValues(array(
-        $driver => array(
-          'password' => $values[$driver]['password'],
-        ),
-      ));
-    }
-    $this->drupalPostForm(NULL, $edit, $this->translations['Save and continue']);
+    // This step should not appear, since settings.php is fully configured
+    // already.
   }
 
   /**
