diff --git a/recovery.c b/recovery.c
index f5636d8..36da5f3 100644
--- a/recovery.c
+++ b/recovery.c
@@ -456,6 +456,8 @@
 
 static int
 sdcard_directory(const char* path) {
+    ensure_path_mounted(SDCARD_ROOT);
+
     const char* MENU_HEADERS[] = { "Choose a package to install:",
                                    path,
                                    "",
@@ -465,6 +467,7 @@
     d = opendir(path);
     if (d == NULL) {
         LOGE("error opening %s: %s\n", path, strerror(errno));
+        ensure_path_unmounted(SDCARD_ROOT);
         return 0;
     }
 
@@ -546,11 +549,13 @@
             // the status to the caller.
             char new_path[PATH_MAX];
             strlcpy(new_path, path, PATH_MAX);
+            strlcat(new_path, "/", PATH_MAX);
             strlcat(new_path, item, PATH_MAX);
 
             ui_print("\n-- Install %s ...\n", path);
             set_sdcard_update_bootloader_message();
             char* copy = copy_sideloaded_package(new_path);
+            ensure_path_unmounted(SDCARD_ROOT);
             if (copy) {
                 result = install_package(copy);
                 free(copy);
@@ -566,6 +571,7 @@
     free(zips);
     free(headers);
 
+    ensure_path_unmounted(SDCARD_ROOT);
     return result;
 }
 
@@ -765,9 +771,6 @@
 
     if (status != INSTALL_SUCCESS) ui_set_background(BACKGROUND_ICON_ERROR);
     if (status != INSTALL_SUCCESS || ui_text_visible()) {
-        // Mount the sdcard when the menu is enabled so you can "adb
-        // push" packages to the sdcard and immediately install them.
-        ensure_path_mounted(SDCARD_ROOT);
         prompt_and_wait();
     }
 
diff --git a/roots.c b/roots.c
index fb495fe..90b82d7 100644
--- a/roots.c
+++ b/roots.c
@@ -35,6 +35,13 @@
     int alloc = 2;
     device_volumes = malloc(alloc * sizeof(Volume));
 
+    // Insert an entry for /tmp, which is the ramdisk and is always mounted.
+    device_volumes[0].mount_point = "/tmp";
+    device_volumes[0].fs_type = "ramdisk";
+    device_volumes[0].device = NULL;
+    device_volumes[0].device2 = NULL;
+    num_volumes = 1;
+
     FILE* fstab = fopen("/etc/recovery.fstab", "r");
     if (fstab == NULL) {
         LOGE("failed to open /etc/recovery.fstab (%s)\n", strerror(errno));
@@ -104,6 +111,10 @@
         LOGE("unknown volume for path [%s]\n", path);
         return -1;
     }
+    if (strcmp(v->fs_type, "ramdisk") == 0) {
+        // the ramdisk is always mounted.
+        return 0;
+    }
 
     int result;
     result = scan_mounted_volumes();
@@ -160,6 +171,10 @@
         LOGE("unknown volume for path [%s]\n", path);
         return -1;
     }
+    if (strcmp(v->fs_type, "ramdisk") == 0) {
+        // the ramdisk is always mounted; you can't unmount it.
+        return -1;
+    }
 
     int result;
     result = scan_mounted_volumes();
@@ -184,6 +199,11 @@
         LOGE("unknown volume \"%s\"\n", volume);
         return -1;
     }
+    if (strcmp(v->fs_type, "ramdisk") == 0) {
+        // you can't format the ramdisk.
+        LOGE("can't format_volume \"%s\"", volume);
+        return -1;
+    }
     if (strcmp(v->mount_point, volume) != 0) {
         LOGE("can't give path \"%s\" to format_volume\n", volume);
         return -1;
