running the installer from a non-optical medium, it fails trying to unmount /cdrom

Bug #313452 reported by Sami Mäkinen on 2009-01-03
66
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Baltix
Undecided
Unassigned
base-installer (Ubuntu)
Undecided
Unassigned
Nominated for Natty by Ayan George
Nominated for Oneiric by Ayan George
ubiquity (Ubuntu)
Undecided
Unassigned
Nominated for Natty by Ayan George
Nominated for Oneiric by Ayan George

Bug Description

Binary package hint: base-installer

I performed a CD-less installation as instructed in the Ubuntu documentation.

I repartitioned my HD as follows:
1: Hardy (JFS)
2: Swap
3: extended
5: Intrepid (JFS)
6: Jaunty (JFS)
7: installer (ext2)

I then unpackaged the Alpha 2 Kubuntu AMD64 installer CD (jaunty-desktop-amd64.iso) onto the Installer partition, and booted up from it.

The system started up and I was able to start the installer.

The installer works, until it was time to partition the HD. I tried to select the Jaunty partition, and clicked Edit parition, but nothing happens. I cannot check the "format" checkbox, and cannot set mount point.

I then deleted the Jaunty partition, and chose to create a new one. I chose JFS and root mount point from the dropdown menu. The partition was created as ext2 (or ext3, can't remember now) and the mount point was root.

I was unhappy with this, so I again deleted and created the paritition, making sure that the filesystem and mount point options were corrected. Now the partition was created as ext2 (or ext3) and the mount point was /home.

It appears the installer completely disregards the partitioning choices made by the user.

After doing the process one more time (perhaps also a reboot, can't remember for sure), I decided to accept an ext2/ext3 system, and tried to finish the install. At this point the system complains that in order to modify the partition table, it would need to unmount all filesystems on the hard drive, which is a bit odd since the change made did not affect the installer partition in any way. At this point the installation failed, and there was no way to get past this problem.

jerrylamos (jerrylamos) wrote :

Install with 20090114 failed same way, insisted it couldn't make changes to the partition table with a /cdrom partition mounted, since I was installing from a CD image in a partition as I usually do.

I DON'T WANT ANY CHANGES TO THE PARTITION TABLE! CERTAINLY NO CHANGES TO ANY OTHER PARTITION THAN THE ONE BEING INSTALLED TO!

gparted has no trouble formatting a partition with no effect on any other partition, ubiquity should have no trouble either.

I had already formatted the partition with gparted and manual partition install only needed to set the mount point to / which should not require any changes in any other partition! This is a 7 boot system and I was installing to 1 partition with no size or any other changes. I don't know if setting mount point to / requires a partition change, but should certainly not need changing any other partition at all.

Anyone have any clue whether ubiquity is trying to rewrite the entire table, BAD NEWS, or is it just doing a check to see if anything is mounted? Having another partition mounted than the one being changed doesn't cause gparted any trouble, it should not cause ubiquity any trouble either.

Jerry

jerrylamos (jerrylamos) wrote :

Today's build 20090115 still fails. Installer says it needs to "commit changes to the partition table" and will not do it because there is another partition mounted than the one it wants to change.

What's the change the installer wants to do?

Format shouldn't change the partition table?

Mount point shouldn't change the partition table?

Previous CD Live did not have this problem.

Appreciate a fix so I can test the new build.

Thanks, Jerry

jerrylamos (jerrylamos) wrote :

Today's build 20090116 still failing.
1. Format the partition with gparted.
2. Load the .iso into a partition.
3. Run the .iso
4. manual partition.
5. Select mount point /
6. Partition already formatted, do not do it again.
7. Screen says following partition to be formatted
     swap
8. Proceeds to progress bar then gets the following message:
------------------------------------------------------------------------

The installer needs to commit changes to partition tables,
but cannot do so because partitions on the following
mount points could not be unmounted:

/cdrom

Please close any applications using these mount points.

Would you like the installer to try to unmount these partitions again?

-------------------------------------------------------------------------
Installer will not proceed past this point.
I don't want any changes to the partition table! Previous Alpha
from a couple generations ago has blown partition table on two hard drives,
should not do this.

Jerry

jerrylamos (jerrylamos) wrote :

Jaunty Alpha 3 Xubuntu CD Live same manual install problem. /cdrom is mounted therefore it cannot write the partition table for /sda. Makes no sense to me. Of course /cdrom is mounted, that's what the install is running from. Xubuntu must use same installer as Ubuntu.

jaunty Alpha 3 Xubuntu Alternate CD manual install did not have that problem and installed O.K. (with usual bunch of Alpha quirks). Yes, /cdrom was mounted as it should be.

Jerry

Colin Watson (cjwatson) wrote :

Where is this Ubuntu documentation you found that told you to do it this way?

Operating the partitioner with a loop-mounted ISO image is very delicate, which is why I don't normally recommend it. It *ought* to work as long as you set up all the partition tables in advance, though, so I'll investigate this and see what's going wrong. It would speed up our investigations considerably if you could attach the installer's log files (/var/log/syslog and /var/log/partman).

I hope you filed bugs about the partitioning problems you had earlier!

Colin Watson (cjwatson) wrote :

I'm curious why you set yourself as a mentor. Normally that means that you're willing to offer code review and advice to new developers interested in fixing this; it's something that only experienced developers would usually do. I didn't realise you were an installer developer? (But if you are, great, please send patches!)

Colin Watson (cjwatson) wrote :

You made some comments about how only one partition was affected and so it shouldn't have had to touch the partition table. While this is great in theory, unfortunately it isn't how the kernel works. :-( If you modify the properties of any partition on the disk (I don't mean the data on the partition here - I mean things like the partition type, or adding or deleting a partition), then you have to tell the kernel to reread the whole partition table, which it will only consent to do if *none* of the partitions on the disk are "busy". Loop-mounting the installer from a file on one of the partitions on the same disk counts as that partition being busy. This is why I do not advise using the installer this way - it's very difficult.

Colin, I followed this guide
https://help.ubuntu.com/community/Installation/FromLinux

"If you already have a working linux system, installing without external media is easy. You need to create a new partition, copy the CD contents over to it, boot from the new partition, and proceed as if you were installing from a CD."

The page seems to say it worked on Hardy. No mention of Intrepid, and definitely did not work on Jaunty. I used the LiveCD method. Have not tried the alternative CD methods. I did try some other guides, but generally was not even able to boot the installer. This LiveCD method was the first to actual boot up and start the install process.

Xnyper (matt-rixman) wrote :

This bug affects Ubuntu 9.10 as well.

Followed the directions here: https://help.ubuntu.com/community/Installation/FromImageLoadedOnHardDrive

I have three partitions set up:

/dev/sda1 (ext3) installer's partition
/dev/sda2 (ext3) empty partition, I intend this to be / after the install
/dev/sda3 (swap) swap partition

I get the same error:

------------------------
The installer needs to commit changes to partition tables,
but cannot do so because partitions on the following
mount points could not be unmounted:

/cdrom

Please close any applications using these mount points.

Would you like the installer to try to unmount these partitions again?
-----------------------

whether I select "go back" or "continue", it doesn't seem to matter. It takes me back to the partitioning page, where I am allowed to make changes, but regardless of what those changes are when I continue the install the same error pops up.

Xnyper (matt-rixman) on 2009-12-05
summary: - Jaunty: installing to existing JFS partition from existing Ubuntu
- installation without burning CD fails due to HD partitioning
+ Jaunty, Karmic: when booting from one partition and installing to
+ another, installer fails to unmount '/cdrom' this halts installation.

Found a workaround thanks to this guy:
http://jaredforsyth.com/content/unetbootin-failed-unmount-cdrom

I just opened up a terminal window and ran:
sudo umount -l -r -f /cdrom

I did this right after the "Who are you" window, before the "Installing System" window.

Nicoulas (lemondedejici) wrote :

Hello everyone,

I have been experienceing the exact same problem as described in this bug, so I have some feedback too.
My configuration is the same as described by Xnyper in comment #10, 3 partitions, and I also get the error message with /cdrom.

I have been happy to find the above workaround, typing "sudo umount -l -r -f /cdrom" just after the "who are you" panel and before confirming the install summary.
_But_ this was not going to be so easy for me... The installation goes well until the end, and proposes to reboot. But when the computer starts up, after having displayed "Grub loading", it automatically launches the memtest86 program, and does not give any alternative...

Still I do not understand how the installer can copy files from partition 1 (/cdrom, if I got it good) to partition 2, while /cdrom is unmounted...

I am currently testing with other versions of the distribution.
Nicolas.

Andrew Yeomans (ayeomans) wrote :

Same in Lucid release.

I created a bootable live-USB of Ubuntu 10.4 netbook on partitioned USB stick /dev/sdb2. I tried installing to empty partition /dev/sdb3. The installer stops with message reported above "Failed to unmount partition" "The installer needs to commit changes to partition tables but cannot do so because partitions on the following mount points cound not be unmounted: /cdrom"

/cdrom has /dev/sdb2 mounted on it.
As all partitions have been pre-created, there is no need for ubiquity to make changes to the partition tables.

I repeated testing, getting the same error message, whether:
a) formatting the new partition /dev/sdb3, boot installed to /dev/sdb
b) not formatting the new partition /dev/sdb3, boot installed to /dev/sdb3
c) not formatting the new partition /dev/sdb3, no boot loader installed.

Chaos (a4571597) wrote :

The issue seems to be that you only ever need to write to the partition table if it is changed.

Other people with problems caused by the same bug:
http://ubuntuforums.org/showthread.php?p=9143667#post9143667
http://ubuntuforums.org/showthread.php?p=9210368
http://ubuntuforums.org/showthread.php?p=7769950#post7769950

Workaround: sudo umount -l -r -f /isodevice

This should really be fixed and it is quite easy to do.

Maris Nartiss (maris-nartiss) wrote :

Just got hit by this issue when trying to reinstall Ubuntu 9.x from Dell DVD. As I was trying to explain how to do reinstall via phone, it turned out to complete failure :(

Brian Teague (bteague) wrote :

Still an issue in Natty. Worse, actually, because the installer starts trying to copy files from /cdrom right after it finishes partitioning, and you don't have time to re-mount it.

A workaround (for systems with enough RAM) is to copy the files in /cdrom to the running ramdisk. Ie, after booting the LiveCD but before starting the installer, open a terminal and do:

 - sudo cp -r /cdrom /cdrom2
 - sudo umount -l -r -f /cdrom
 - sudo rmdir /cdrom
 - sudo mv /cdrom2 /cdrom

Then install - it completed for me without any problems.

Launchpad Janitor (janitor) wrote :

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

Changed in base-installer (Ubuntu):
status: New → Confirmed
Changed in ubiquity (Ubuntu):
status: New → Confirmed
Christian Weiske (cweiske) wrote :

I needed to follow the iso-on-harddisk installation method because my macbook air 4,2 does not boot from removable usb drives.

Following teague-wisc's instructions worked for me.

skipper (attila-egri-nagy) wrote :

Still an issue in Oneiric.

I also followed teagu-wisc, but I copied the content to a USB stick and mounted that one. Just in case you don't fit inti the memory.

Installing Ubuntu on MacAir2,1 without the Apple SuperDrive is a nightmare.

Mihai Capotă (mihaic) wrote :

Same problem with current Precise daily image. Workaround in comment #16 still works.

tags: added: precise
summary: - Jaunty, Karmic: when booting from one partition and installing to
- another, installer fails to unmount '/cdrom' this halts installation.
+ running the installer from a non-optical medium, it fails trying to
+ unmount /cdrom
Phillip Susi (psusi) wrote :

This was fixed in libparted several years ago.

Changed in ubiquity (Ubuntu):
status: Confirmed → Fix Released
Changed in base-installer (Ubuntu):
status: Confirmed → Fix Released
SoloTurn (soloturn) wrote :

this still exists in 14.04 LTS see bug1502697. also in 15.10 manifesting different, see same bug.

Bougron (francis-bougron) wrote :

This still exits in 16.04 and it is impossible to install the EFI repertory in /EFI of this partition However it is possible to use another partition. but
After finish the installation it is not possible to copy on these partition because
ubuntu@ubuntu:/$ ls /cdrom
ubuntu@ubuntu:/$ sudo mount -v /dev/sda1 /mnt/A
mount: /dev/sda1 is already mounted or /mnt/A busy
ubuntu@ubuntu:/$ ls /mnt/A
ubuntu@ubuntu:/$ fuser /dev/sda1
ubuntu@ubuntu:/$

Bougron (francis-bougron) wrote :

This still exits in 16.04 and it is impossible to install the EFI repertory in /EFI of this partition. However it is possible to use another partition. butn after finish the installation, it is not possible to copy on these partition because
ubuntu@ubuntu:/$ ls /cdrom
ubuntu@ubuntu:/$ sudo mount -v /dev/sda1 /mnt/A
mount: /dev/sda1 is already mounted or /mnt/A busy
ubuntu@ubuntu:/$ ls /mnt/A
ubuntu@ubuntu:/$ fuser /dev/sda1
ubuntu@ubuntu:/$
See. http://www.hostingpics.net/viewer.php?id=449892Screenshotfrom20160521124220.png

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers