Permalink
Browse files

templates: mount devtmpfs in ubuntu containers

That way /dev/disk/ exists, and update-grub can succeed.

Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1060404
  • Loading branch information...
1 parent c56adc3 commit 24fd258e7bc79c1f9745752f4fc61c760e080bd5 Serge Hallyn committed Oct 4, 2012
Showing with 8 additions and 0 deletions.
  1. +4 −0 templates/lxc-ubuntu-cloud.in
  2. +4 −0 templates/lxc-ubuntu.in
@@ -95,6 +95,10 @@ EOF
proc proc proc nodev,noexec,nosuid 0 0
sysfs sys sysfs defaults 0 0
EOF
+ if grep devtmpfs /proc/filesystems > /dev/null 2>&1; then
+cat <<EOF >> $path/fstab
+devtmpfs dev devtmpfs defaults 0 0
+EOF
# rmdir /dev/shm for containers that have /run/shm
# I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did
@@ -353,6 +353,10 @@ EOF
proc proc proc nodev,noexec,nosuid 0 0
sysfs sys sysfs defaults 0 0
EOF
+ if grep devtmpfs /proc/filesystems > /dev/null 2>&1; then
+cat <<EOF >> $path/fstab
+devtmpfs dev devtmpfs defaults 0 0
+EOF
if [ $? -ne 0 ]; then
echo "Failed to add configuration"

0 comments on commit 24fd258

Please sign in to comment.