moby: apt-get upgrade in plain Ubuntu precise image fails

I’m having trouble with running apt-get upgrade on a custom-built precise base box. The box is built using debootstrap as in the contrib scripts, like so:

debootstrap --verbose --variant=minbase --include='iproute,iputils-ping,lsb-release,curl,nano' --arch=amd64 precise

I already fixed another issue on the upgrade thanks to the workaround mentioned in #1024, but this here still shows up:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initscripts (2.88dsf-13.10ubuntu11.1) ...
mount: block device /dev/shm is write-protected, mounting read-only
mount: cannot mount block device /dev/shm read-only
dpkg: error processing initscripts (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initscripts
E: Sub-process /usr/bin/dpkg returned an error code (1)

I dug up some lxc mailing list discussion on this from a year ago which you can find here, but the proposed workaround (rmdir /dev/shm && ln -s /run/shm /dev/shm) does not cut it for me as the dir removal fails with failed to remove '/dev/shm': Device or resource busy.

Any ideas how I could work around this?

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 30 (17 by maintainers)

Commits related to this issue

Most upvoted comments

I also had the same issue. Fixed by relocating “-y” at the end as below -

FROM ubuntu MAINTAINER debu_bbsr@yahoo.com RUN apt-get update RUN apt-get install apache2 -y RUN apt-get install apache2-utils -y RUN apt-get clean EXPOSE 80 CMD [“apache2ctl”, “-D”, “FOREGROUND”]