From e48f327a1738baf88e604586ccf2dd0b5c2fab6a Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Wed, 22 May 2013 20:47:15 +0100 Subject: [PATCH] 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. --- raspi-config | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/raspi-config b/raspi-config index 090331e..def062e 100755 --- a/raspi-config +++ b/raspi-config @@ -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