corrupt partition table error handling

pull/1/head
tastytea 2015-10-04 18:56:53 +02:00
parent 361c685306
commit ae3a58b9b5
1 changed files with 3 additions and 2 deletions

View File

@ -86,9 +86,10 @@ startsector=$(LC_ALL=C fdisk -l ${MBR_DEVICE} | grep -A1 'Device' | tail -n1 | a
MBR_SIZE=$(expr ${sectorsize} \* ${startsector} / 1024) MBR_SIZE=$(expr ${sectorsize} \* ${startsector} / 1024)
if [ ${?} != 0 ] && [ "${1}" != "recover" ] if [ ${?} != 0 ]
then then
die 1 "Something went wrong. Most likely your partition table is corrupt. Use hashboot recover to fix this." echo "Something went wrong. Most likely your partition table is corrupt." >&2
die 1 "You have to recover the MBR manually by copying the mbr from ${BACKUP_FILE}"
fi fi
if [ "${1}" == "index" ] if [ "${1}" == "index" ]