2
0
mirror of git://github.com/lxc/lxc synced 2025-08-30 21:29:32 +00:00

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
This commit is contained in:
Serge Hallyn
2012-10-04 13:54:00 -05:00
committed by Stéphane Graber
parent d4eb4ab129
commit bf7d76cf3a
2 changed files with 8 additions and 0 deletions

View File

@@ -94,6 +94,10 @@ EOF
cat <<EOF > $path/fstab
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

View File

@@ -352,6 +352,10 @@ EOF
cat <<EOF > $path/fstab
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