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:
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?
update:
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...