mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
identify the partition types for mounting; fixes issues with some beta users where this changed
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
parent
b606e28039
commit
86795cc605
@ -12,13 +12,13 @@ start()
|
||||
|
||||
DEV="$(ls /dev/[xv]da | head -1 | sed s@/dev/@@)"
|
||||
DRIVE="/dev/${DEV}"
|
||||
SWAP="${DRIVE}1"
|
||||
DATA="${DRIVE}2"
|
||||
|
||||
if fdisk -l ${DRIVE} | grep -q "doesn't contain a valid partition table"
|
||||
then
|
||||
ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}
|
||||
else
|
||||
SWAP=$(fdisk -l ${DRIVE} | grep 'Linux swap' | awk '{print $1}')
|
||||
DATA=$(fdisk -l ${DRIVE} | grep 'Linux$' | awk '{print $1}')
|
||||
mount ${DATA} /var && swapon ${SWAP} || ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user