for now refuse to work on anything but trivial partitionings

In particular, refuse to work on NOOBS (parted doesn't like the partition
layout). Reassure users that if using NOOBS, the rootfs is already expanded.
This commit is contained in:
Alex Bradbury 2013-05-22 20:47:15 +01:00
parent bcb12a3ddf
commit e48f327a17
1 changed files with 7 additions and 0 deletions

View File

@ -44,6 +44,13 @@ do_expand_rootfs() {
return 0
fi
# NOTE: the NOOBS partition layout confuses parted. For now, let's only
# agree to work with a sufficiently simple partition layout
if [ "$PART_NUM" -ne 2 ]; then
whiptail --msgbox "Your partition layout is not currently supported by this tool. You are probably using NOOBS, in which case your root filesystem is already expanded anyway." 20 60 2
return 0
fi
LAST_PART_NUM=$(parted /dev/mmcblk0 -ms unit s p | tail -n 1 | cut -f 1 -d:)
if [ "$LAST_PART_NUM" != "$PART_NUM" ]; then