I'm trying to install Ubuntu Server 20.04 on a remote server. Problem is, I cannot attach a USB drive and the hosting provider does not allow me to mount ISO images, all I have is a pre-installed Ubuntu system.

To launch the Ubuntu server setup I followed the instructions in this article to add a grub menuentry so I can boot from the Ubuntu Server ISO. Here's the menuentry:

menuentry "Ubuntu 20.04 ISO" {
   set isofile="/root/ubuntu-20.04.1-live-server-amd64.iso"
   rmmod tpm
   loopback loop (hd0,2)$isofile
   linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject toram
   initrd (loop)/casper/initrd

Now when I select this menu entry, the installer starts, creates a ramdisk, copies the contents of the ISO to memory and I get through the first few steps of the setup, until:

Guided storage configuration

well great, how did the setup fail to discover my hard drive?

when I switch to the terminal and run lsblk I see that sda clearly exists and that sda2 is still mounted at /isodevice - which is unexpected, since the ISO was already copied to ramdisk. umount /dev/sda2 returns "target is busy", but it works with the -l option.

Even then, I get the same error on the guided storage configuration page. What am I missing here? What would prevent the setup from detecting my hard drive, even though lsblk can see it?


I tried it with the legacy installer, as suggested by @elder-geek, using this grub menuentry:

menuentry "Ubuntu 20.04 legacy server ISO" {
    rmmod tpm
    set root=(hd0,2)
    set isofile="/root/ubuntu-20.04.1-legacy-server-amd64.iso"
    loopback loop $isofile
    linux (loop)/install/vmlinuz boot=install iso-scan/filename=$isofile noeject toram
    initrd (loop)/install/initrd.gz

With this setup I can boot the legacy installer and walk through the first few steps, but then I get stuck because the installer can't mount the cd-rom drive it expects. Seems like the legacy installer does not support the toram option (unlike casper) and therefore I can't use it to run the installer from RAM, which is a strict requirement if I want to install from an ISO file on a file system that is going to be destroyed during setup.

update: tried it with the 20.10 installer, same issue. lsblk and parted can see my disk from the installer's command line, but the guided storage configuration fails. I'm running out of ideas here...

filed a bug report on launchpad now...

  • The version of subiquity in use may have bearing on this issue. You may be impacted by this bug or this one – Elder Geek Jan 5 at 22:03

This is the result of a bug that is over a decade old. The problem is that the ISO image is still mounted, although the installer is started with the toram option. The solution is to unmount the ISO, but there are two pitfalls here:

  1. you can't just umount, you have to detach the loop device first with losetup
  2. you have to do this before you do anything else in the installer. No, you can't even select your keyboard layout :/

As soon as you're on the first screen of the installer, switch to the terminal with F2, then enter

losetup -d /dev/loop0
umount /isodevice

exit the terminal with Ctrl+D and you're good to go.


It appears that you have been impacted by this bug.

It's entirely feasible that you will be successful attempting to install via the legacy installer as a workaround as mentioned in this comment on [subiquity bug 1890651](https://bugs.launchpad.net/subiquity/+bug/1890651/comments/2

If that doesn't do the trick for you, start at the beginning.

  1. Check the hash of your ISO and insure that it matches. For 20.04 they are as follows:

    b45165ed3cd437b9ffad02a2aad22a4ddc69162470e2622982889ce5826f6e3d *ubuntu-20.04.1-desktop-amd64.iso 443511f6bf12402c12503733059269a2e10dec602916c0a75263e5d990f6bb93 *ubuntu-20.04.1-live-server-amd64.iso

If they don't match try to download the file again as it's been corrupted somehow.

Insure you don't have a hardware problem. Boot from live media and Test RAM and Storage for errors the syslog can be helpful here grep error /var/log/syslog as well as tools such as memtest86+ As you may know, Memtest86+ runs without an operating system. Therefore, you must have access to the GRUB menu in Ubuntu. Turn on or restart your system and hold down the ‘Shift’ key to access the GRUB menu. Choose memtest and run the test. Any errors will be reported and indicate RAM must be replaced.

  • the link to the legacy installer is broken but I managed to find it. Now my grub menuentry does not work anymore: error: file /casper/vmlinuz not found and indeed, the ISO does not contain a folder named /casper. How do I need to adjust the menuentry so I can boot from the legacy ISO? – Klamann Jan 7 at 10:28
  • oh jeez, the legacy installer does not know about the toram option and therefore I can't use it anyways – Klamann Jan 7 at 10:54
  • @Klamann which ISO are you attempting to install from? Did you check the hash on your ubuntu-20.04.1-live-server-amd64.iso? There's definitely a casper folder in the ISO – Elder Geek Jan 20 at 16:23
  • there's no casper folder in the legacy ISO, but I found a solution using the current installer (see accepted answer) – Klamann Jan 20 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.