[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#745717: di-utils: fetch-url runs mountmedia without cleaning up; blocks partitioner preseeding



Package: di-utils
Version: 1.98
Severity: important
Tags: d-i upstream

fetch-url 1.98 gained the following line in fetch-url-methods/file:

        mountmedia || true

This causes mountmedia to (indiscriminantly) try to mount anything resembling a
storage device to /media. This includes any partitions discovered on fixed
media on the target system ("list-devices disk" and "list-devices partitions"
are tried as things to mount).

This partition is NOT unmounted by anything. This means immediately after the
installer runs file-preseed.postinst, /media will be a mounted paritition
unless all fixed disks on the system are zero'd prior to running the installer.

Interactively, this causes the prompt from partman-base:
"The installer has detected that the following disks have mounted partitions"
which is merely annoying.

If your partitioner steps are preseeded, then it causes installation failure
because the partitioner tries to format a partition which is already mounted
(which causes non-zero exit from mkfs.ext4).

This problem can be observed on the latest Ubuntu release.
http://ubuntuforums.org/showthread.php?t=2215103

It is incorrect (IMHO) for fetch-url to mount a drive without cleaning up after
itself, i.e. there should be an unmount or three added to fetch-url-
methods/file

As a dirty workaround, for the benefit of web search crawlers parsing this bug,
I've used the following with success:

d-i     partman/early_command           string  umount /media



-- System Information:
Debian Release: wheezy/sid
  APT prefers saucy-updates
  APT policy: (500, 'saucy-updates'), (500, 'saucy-security'), (500, 'saucy'), (100, 'saucy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11.0-19-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


Reply to: