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

Bug#704931: chroot_cleanup should not unmount /proc

Package: src:debian-installer-utils
Severity: serious

For a reason unknown to me, helpers like in-target and apt-install,
by way of chroot_setup and chroot_cleanup, might actually cause
/target/proc to be unmounted. This then breaks grub-install.
Arguably, commit 795bfde of grub-installer hacks around this
problem, when actually I don't think there is any reason why
/target/proc (or /target/sys, etc.) should ever be unmounted before
it's time to unmount the /target tree.

In my case, I was experimenting with preseeding when suddenly,
grub-install failed. The reason was a missing /target/proc.

Thinking that /target/proc should not have been unmounted, I used
the console to chdir() to it, thereby causing umount to fail. Here
is what syslog documented:

  Apr  7 15:05:07 in-target: Setting up popularity-contest (1.56) ...
  Apr  7 15:05:08 pkgsel: umount: can't umount /target/proc: Device or resource busy
  Apr  7 15:05:08 /bin/in-target: warning: Unable to umount '/target/proc'
  Apr  7 15:05:08 in-target: (Reading database ...·
  Apr  7 15:05:08 in-target: 14789 files and directories currently installed.)
  Apr  7 15:05:08 in-target: Removing popularity-contest ...
  Apr  7 15:05:08 in-target: Purging configuration files for popularity-contest ...

Later, I used network-console and a while loop to track the state of
/proc/mounts and I found that /target/proc randomly appeared and

By the time grub-install is run, it isn't present. I don't know
whether the above, popcon-associated instance of umount is at fault,
but I do question why /target/proc ever gets unmounted.

The version of d-i I am using doesn't have Steve's commit yet, so
grub-install just fails.

I can reproduce this, I can even give network-console access to the
host I am using for testing, and stand by on IRC for debugging. It's
a KVM instance provisioned by virt-install and preseeded, so it's
trivial to work with…

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.8-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

 .''`.   martin f. krafft <madduck@d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

Reply to: