I installed the version from precise-updates on a precise lxc, which didn't have grub-pc before. It worked for me. Here is the output:
"""
(...)
Processing triggers for ureadahead ...
Setting up libfreetype6 (2.4.8-1ubuntu2.1) ...
Setting up gettext-base (0.18.1.1-5ubuntu3) ...
Setting up libfuse2 (2.8.6-2ubuntu2) ...
Setting up grub-common (1.99-21ubuntu3.8) ...
Setting up grub2-common (1.99-21ubuntu3.8) ...
Setting up grub-pc-bin (1.99-21ubuntu3.8) ...
Setting up os-prober (1.51ubuntu3) ...
Setting up grub-pc (1.99-21ubuntu3.8) ...
Creating config file /etc/default/grub with new version
lxc
Setting up grub-gfxpayload-lists (0.6) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
root@precise:~#
"""
That lone "lxc" comes from grub's postinst calling "running-in-container". I think it could have its output redirected to /dev/null, unless we want to restrict this test to "lxc":
I installed the version from precise-updates on a precise lxc, which didn't have grub-pc before. It worked for me. Here is the output:
"""
(...)
Processing triggers for ureadahead ...
Setting up libfreetype6 (2.4.8-1ubuntu2.1) ...
Setting up gettext-base (0.18.1.1-5ubuntu3) ...
Setting up libfuse2 (2.8.6-2ubuntu2) ...
Setting up grub-common (1.99-21ubuntu3.8) ...
Setting up grub2-common (1.99-21ubuntu3.8) ...
Setting up grub-pc-bin (1.99-21ubuntu3.8) ...
Setting up os-prober (1.51ubuntu3) ...
Setting up grub-pc (1.99-21ubuntu3.8) ...
Creating config file /etc/default/grub with new version -lists (0.6) ...
lxc
Setting up grub-gfxpayload
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
root@precise:~#
"""
That lone "lxc" comes from grub's postinst calling "running- in-container" . I think it could have its output redirected to /dev/null, unless we want to restrict this test to "lxc":
root@precise:~# running- in-container
lxc
root@precise:~#