Comment 8 for bug 1347726

Martijn Koster (makuk66) wrote :

This was reported on the forums too: http://ubuntuforums.org/showthread.php?t=2215103 where directhex2 mentioned:

 I've tracked down the problem to a change in debian-installer-utils 1.98

Looking at the changelog (https://launchpad.net/ubuntu/saucy/+source/debian-installer-utils/+changelog) I see:

 [ Joey Hess ]
  * fetch-url: Try to mountmedia when getting a file, to support preseed
    via USB from netboot.

That change adds a call to mountmedia (http://anonscm.debian.org/cgit/d-i/debian-installer-utils.git/commit/?id=916a613577c5cd747d15b3d20f16b9518d7d54ea)

That code will list the disk partitions (http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/mountmedia/wily/view/head:/mountmedia#L24).

In my case that finds /dev/sda1 (my existing HD boot partition) and mounts that as /media.
My CD is on /dev/sr0 is mounted as /cdrom. I have no other media I need to have mounted.

The forum suggested a workaround: unmount /media in an early preseed command.
You want to ignore failures when you run on a system where /media does not get mounted (blank HD).
This worked for me:

    d-i preseed/early_command string umount /media || true

What is the right fix here? I can't imagine how mountmedia picking a HD partition on the target disk and mounting it makes a lot of sense in the overwhelming majority of cases. Should it not be doing that? Should debian-installer-utils not use mountmedia? Should there be an installer option to skip it? Are there any better ways to avoid this?