Commit bf7d76cf by Serge Hallyn Committed by Stéphane Graber

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
parent d4eb4ab1
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment