Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion isos/bootstrap/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ mkdir -p /mnt/containerfs

echo "Waiting for rootfs"
while [ ! -e /dev/disk/by-label/containerfs ]; do sleep 0.1;done
if mount -t ext4 /dev/disk/by-label/containerfs ${MOUNTPOINT}; then
# https://github.com/vmware/vic/issues/6379
# grab dmesg output and dump to debug log if mount doesn't occur in a useful timeframe (2min)
if timeout --signal=KILL 2m mount -t ext4 /dev/disk/by-label/containerfs ${MOUNTPOINT}; then
# ensure mountpoint exists
mkdir -p ${MOUNTPOINT}/.tether

Expand Down Expand Up @@ -105,6 +107,11 @@ else
# TODO: what do we do here? we really need to somehow report an error
# fail hard
echo "Unable to chroot into container filesystem"

# dump dmesg data in case there's a system problem injecting or loading the root filesystem
dmesg
# because dmesg is long and will wrap over console
echo "dmesg dump due to root filesystem mount failure"
fi

# Shut the system down
Expand Down