mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-29 13:38:00 +00:00
fsck filesystem before mount
Use fsck -p to fix errors that are fixable. Note this will recreate the filesystem on fatal errors. Fix #665 Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
0f357d2ed5
commit
72d1aef471
@ -45,7 +45,7 @@ start()
|
||||
ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}
|
||||
blockdev --rereadpt "${DRIVE}" 2> /dev/null
|
||||
else
|
||||
( mount "${DATA}" /var && ([ -z "${SWAP}" ] || swapon "${SWAP}") ) || \
|
||||
( e2fsck -p "${DATA}" && mount "${DATA}" /var && ([ -z "${SWAP}" ] || swapon "${SWAP}") ) || \
|
||||
( ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}; blockdev --rereadpt ${DRIVE} 2> /dev/null )
|
||||
fi
|
||||
# boot2docker compat, has /var and /tmp on partition
|
||||
|
Loading…
Reference in New Issue
Block a user