"d-i partman/unmount_active boolean true" not working

Bug #1628659 reported by Julen Larrucea
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
preseed (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The installation with preseed of Ubuntu 16.04 server (and previous versions), on a KVM virtual machine keeps showing the message:

'''
The installer has detected that the following disks have mounted partitions
/dev/vda
Do you want the installer to try to unmount the partitions on this disk before continuing? If you leave them mounted, you will not be able to create, delete or resize partitions on this disk, but you may be able to install to existing partitions there.
Unmount partitions that are in use?
'''

I do have the option:

d-i partman/unmount_active boolean true

and
d-i preseed/early_command string umount /dev/media
(also tried with)
d-i preseed/early_command string umount /dev/vda
d-i preseed/early_command string umount /dev/vda1

Is this a bug, or am I missing something?

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1628659/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Julen Larrucea (julenl) wrote :

Selected the pressed package

affects: ubuntu → preseed (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in preseed (Ubuntu):
status: New → Confirmed
Revision history for this message
Carl Karsten (carlfk) wrote :

I get the same message, and I have:

d-i partman/unmount_active boolean false

My case:
I have a 2nd usb stick with ubuntu-16.04.2-server-amd64.iso
the installer mounts it under /cdrom, and then asks me if I want to unmount it so it can step on it.
perhaps this should be a special case?

Anyway, I wonder what the relation is between unmount_active and
 "Do you want the installer to try to unmount...?"

Revision history for this message
Eric Trezel (eric-trezel) wrote :

Hello,

Same issue.

I noticed error messages about /dev/sda appear during install procedure (near from the beginning), but it disappears too fast to be able to read it, and I didn't find trace of this message in syslog or whatever file I found (in /tmp and /var/log).

I found a temporary solution : add an early-command line in my preseed file :
<code>
d-i preseed/early_command string [ "$(mount | grep /media)" ] && umount /media || echo "no mounted partition found" > /tmp/early.log
</code>

It works well for me (I tried with "grep /dev/sda1" at first times, then I realised whatever the name of the partition is (it can be different, of course, regarding to your disk, partition type...), it's always mounted in /media).

Another info : My PCs are formatted with 3 partitions : sda1 (/), sda2 (swap), and sda3 (/localsettings). I never had this issue before I put files in sda3. It's weird, because sda3 is not mounted, and unmount sda1 is sufficient to fix the problem, but maybe it could help the one who will have to fix that.

Revision history for this message
dragon788 (dragon788) wrote :

I was running into the same issue and finally by luck happened upon a set of slides that allowed me to automate this and there was an accompanying code repository with the full preseed file. https://github.com/uweplonus/adia-install/blob/master/initrd/preseed.cfg#L3

Many people suggest using `preseed/early_command umount /media/*` but this hasn't worked for quite some time due to the timing of when the preseed portion runs compared to the partitioning.

The correct way to do this is to add the following anywhere in your preseed file that is referenced by the boot command.

```d-i partman/early_command string \
USBDEV=$(list-devices usb-partition | sed "s/\(.*\)./\1/");\
BOOTDEV=$(list-devices disk | grep -v "$USBDEV" | head -1);\
debconf-set partman-auto/disk $BOOTDEV;\
debconf-set grub-installer/bootdev $BOOTDEV; \
umount /media;
```

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

Other bug subscribers

Related questions

Remote bug watches

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