diff --git a/files/initramfs-tools/union-mount.j2 b/files/initramfs-tools/union-mount.j2 index 531436c39a..037a9c2403 100644 --- a/files/initramfs-tools/union-mount.j2 +++ b/files/initramfs-tools/union-mount.j2 @@ -8,6 +8,8 @@ esac ## Mount the aufs file system: rw layer over squashfs mkdir -p ${rootmnt}/host/rw mount -n -o dirs=${rootmnt}/host/rw:${rootmnt}=ro -t aufs root-aufs ${rootmnt} +## Check if the root block device is still there +[ -b ${ROOT} ] || mdev -s ## Mount the raw partition again mount ${ROOT} ${rootmnt}/host ## Mount the working directory of docker engine in the raw partition, bypass the aufs