Unable to install to disk when using grub loopback method

Bug #1155216 reported by Arbiel Perlacremaz
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

How to quickly reproduce :

- From a Linux distro installed (Ubuntu 18.04 here)
- Install grml : sudo apt install grml-rescueboot
- Get Focal iso : wget -0 /boot/grml/focal.iso http://cdimage.ubuntu.com/daily-live/current/focal-desktop-amd64.iso
- add toram option : echo ' CUSTOM_BOOTOPTIONS="toram" ' | sudo tee -a /etc/default/grml-rescueboot
- Generate the Grub entry : sudo update-grub
- Reboot and select the Grub entry for the iso
- on the Second grub menu ( the live iso one ) edit with e key to add the toram option , boot with F10
- Start the Ubuntu installation : Ubiquity ask if it should try to umount /isodevice - You accept - But patitioning fails anyway .

See https://help.ubuntu.com/community/Grub2/ISOBoot for more info

-----Solution ---------------

Before starting ubiquity :

sudo umount -l -r -f /isodevice
sudo losetup -d /dev/loop1

You can then install Ubuntu and partition your disk like if you were on USB !

--- Initial report ----

When installing from an iso file, with grub's loopback option, Ubiquity displays a message stating the isodevice cannot be unmounted, even when the isofile is not located on the same harddrive as the installation target.

sudo umount -l -r -f /isodevice

solves this problem, so Ubiquity should be able to issue this command by itself, without any user action.

Arbiel

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Shriramana Sharma (jamadagni) wrote :

I tried installing Kubuntu Raring Beta 2 and Raring final using ISO loopback, but it gave this error saying "/isodevice could not unmounted", and while it lets me select the timezone, keyboard layout etc, the installation doesn't really seem to progress because the progress bar reads "Detecting filesystems" for a long time. I suppose if installation is progressing it should say "unpacking this/that" etc.

I am now going to try installing using my USB drive -- too bad I couldn't use the HD-install method which I have been using for three years now.

Revision history for this message
oldfred (oldfred) wrote :

Same error with trusty

Revision history for this message
oldfred (oldfred) wrote :

Now getting same issue with UEFI boot and Wily. ISO on sdb, boot is from sda as that is all the grub allows with UEFI.

And it automounts a partition in sda (random partition?) as /isodevice. So then it will not let install to another partition on sda.

Revision history for this message
oldfred (oldfred) wrote :

Same issue with 16.04 Xenial.
Installer does ask if you want to unmount, but it does not unmount and hangs or gives errors.

Revision history for this message
oldfred (oldfred) wrote :

This similar bug says to use toram boot paramater, but if installer offers to unmount partition, it still should do that.

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/684280
Post #14 by experimancer

Fix is actully here: https://help.ubuntu.com/community/Grub2/ISOBoot (i.e add "toram" to relevant Grub2 menuentry or manually umount the /isodevice with "sudo umount -lrf /isodevice" and re-start the installation.

Revision history for this message
Martin Weis (martin-weis-newsadress) wrote :

I had the .iso on sda1 and copied the directory to sda2 and sda7, to be able to install to sda1.
But, sda1 was still mounted as /isodevice, though the grub entry clearly pointed to .iso on sda2 (or sda7). I had to rename the directory with the .iso on sda1.
I seems, that the installer tries all partitions in order to find the .iso location and uses the first one found.

Booting iso from sda7 was not possible, since sda2 was mounted as /isodevice.

My menuentry for grub had to be (hd0,msdos2) or (hd0,msdos7), not (hd0,2) as in the documentation on ttps://help.ubuntu.com/community/Grub2/ISOBoot/Examples#Ubuntu_ISOs. You can find out in grub on the commandline with ls.

Revision history for this message
BobDodds (bobdodds) wrote :

Seeing this now with artful desktop iso, September 27, 2017! Iso is loaded from usb drive, iso mounts the hd to usb's /isodevice, fails to umount, hangs install. Going into xterm, sudo umount -f, did not work, but hopefully adding sudo umount -l -r -f /isodevice is going to work now. Thanks.

I installed to usb drive, copied the system dirs to the hard drive, haha. That got me past the bad state with x11 crash loop, but now the wifi doesn't work and synaptic won't load, so I'll have to go into install again, xterm, sudo the umount with all three switches.

Revision history for this message
Psi-Jack (erenfro) wrote :

Is this bug ever going to be resolved? It's been active and unassigned since 2013, and no resolution but this manual step, and it doesn't just effect Ubuntu, but all Ubuntu-family distributions, Linux Mint, elementary OS included.

I'm trying to make multi-boot USBs that I can pass out to new/existing Linux users in various locations, including LUGs and such, but I cannot simply tell people, "For these distributions, you need to do these extra steps in order to actually install it".

Every other distro I have included, works perfectly. Even Debian.

Revision history for this message
Jack Hwang (jhwangus) wrote :

I can confirm that this bug is still in the newest 18.04 LTS.

Even worse, I am trying to do unattended installation from iso image on HD. Now I need to figure out a way to handle this.

Revision history for this message
Tony Cooper (aecooper) wrote :

I am booting my own casper based Ubuntu 18.04 LTS ISO image from a disk partition and also ran into this problem with toram apparently not working (well not completely at least).

The issue is the loopback devices are keeping the source disk active. Doing a forced umount doesn't help as the system still things the disk is mounted and won't let you fsck it.

So I did losetup -a, located the offending device, in my case loop0 had /recovery mapped, and then I did losetup -d /dev/loop0 and it unmounted and I was able to fsck the underlying partition.

HTH.

Revision history for this message
Tony Cooper (aecooper) wrote :

Sorry forgot to add I then did umount /isodevice after losetup -d.

Revision history for this message
oldfred (oldfred) wrote :

Same error with 20.04

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Thanks all for your comment.

We really need this to be working if we want to do a "click and install" ubuntu on partionned Windows HD

tags: added: bionic focal xenial
summary: - Unable to umount isodevice
+ Unable to umount /isodevice when using grub loopback method
description: updated
description: updated
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote : Re: Unable to umount /isodevice when using grub loopback method

With the help of aecooper 's comment , I succeed to install from Grubed iso !
Many thanks

I will update the bug right now

description: updated
summary: - Unable to umount /isodevice when using grub loopback method
+ Unable to install to disk when using grub loopback method
Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.