From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6677531658230431744 X-Received: by 2002:a17:906:8597:: with SMTP id v23mr917637ejx.14.1555307046661; Sun, 14 Apr 2019 22:44:06 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:4009:: with SMTP id v9ls2344939ejj.9.gmail; Sun, 14 Apr 2019 22:44:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIyv8h9Jkj6FuSsHLL7fSaplQwFOgpePNULx8rbWisihjMacSK2tDGL35k2Jvy9rGfHvpQ X-Received: by 2002:a17:906:80cb:: with SMTP id a11mr5931573ejx.18.1555307046208; Sun, 14 Apr 2019 22:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555307046; cv=none; d=google.com; s=arc-20160816; b=BAXUsJ5Df3u9rZiA7gqNVK851pUclYAkF35zPo3cfnBqQx11QjrRsOgG6YXsWUvYrl G5DXrTtYFHycYxETwz0hFXU8b4eNVjVTvnXNR3iFKKqU4xMGkDXTkm9ke0bb627hWO2d uK0sUZfu91ib+w7L4/5aYmzRoxxMrzYU5psnpr16q0y0AzkbX1oAcxoNMjlJNZnIEeDo /bIuH0gDNrrh4jTr9C+IDw13DG5qUdaAeZaANbP1tziLhX+D8VgksPNm0sR37boX6gwn qwQ+53UbDdpHdD/DgK6mXrMEGFUVm/R5DO5rt3fSYOrH7EIY3iP93+oaTv+BQL83ZHvN e6Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:references:to:subject; bh=4ti6NFD6355iyZN0OEgsMXFpzMw5qk5okN15icPDS3U=; b=VxarIID9A0FjgRjvf5ZEFl6meJUFyj3gql81ShStSff7l3Fa5xbwaFYRobeQozHG3G G33T+1sRZE0ZQD3W7HeFQmIKaSF9vvC8UHvlVLADYK4UA+n6pZpwYr7ggrB7Kg4sXKti QQTR1M4qYBL30Ei3YQiIlXmJo6LCKjgOPY3s9e42hltfolC7ljRBcZ3wGHNAKoU2qrEz SB/1PFZIKQ4Ut/uWFNcH+S6Ve4vaNDdSXZvDyJHiEkumwmYLKqPZ/PueVMPiib/bubYR fSVUivsso+Tzwb4lKcYMbN0IeHb3Bo7Ry5RnFNZcMAfsbZBOdXcOHtmU8xrdKEfVA/mP m66w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id a9si494027edn.4.2019.04.14.22.44.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Apr 2019 22:44:06 -0700 (PDT) Received-SPF: pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.1.3] (host167-16-static.62-82-b.business.telecomitalia.it [82.62.16.167]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id x3F5i4Ev027234 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Apr 2019 07:44:05 +0200 Subject: Re: [PATCH] expand-on-first-boot: Don't fail when using systemd mount units To: Christian Storm , isar-users@googlegroups.com References: <20190408143309.3614-1-christian.storm@siemens.com> From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: <104a837c-0a12-a479-aead-681c877bd692@ilbers.de> Date: Mon, 15 Apr 2019 07:44:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190408143309.3614-1-christian.storm@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: qavCKSh1M73d On 4/8/19 4:33 PM, Christian Storm wrote: > By default, resize2fs fails with the error message "Can't check if > filesystem is mounted due to missing mtab file" if the to be resized > filesystem isn't listed in mtab. This is the case, e.g., when using > systemd mount units instead of /etc/fstab. > Hence, selectively disable this safety check by exporting the > environment variable EXT2FS_NO_MTAB_OK=1 [1]. Applied to the 'next. Thanks, Maxim. > [1] https://github.com/tytso/e2fsprogs/blob/master/lib/ext2fs/ismounted.c#L111 > > Signed-off-by: Christian Storm > --- > .../expand-on-first-boot/files/expand-last-partition.sh | 4 ++++ > 1 file changed, 4 insertions(+) > mode change 100644 => 100755 meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh > > diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh > old mode 100644 > new mode 100755 > index 4cf90de..08c69db > --- a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh > +++ b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh > @@ -28,4 +28,8 @@ sfdisk -d "${BOOT_DEV}" 2>/dev/null | grep -v last-lba | \ > # Inform the kernel about the partitioning change > partx -u "${LAST_PART}" > > +# Do not fail resize2fs if no mtab entry is found, e.g., > +# when using systemd mount units. > +export EXT2FS_NO_MTAB_OK=1 > + > resize2fs "${LAST_PART}" > -- Maxim Osipov ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn Germany +49 (151) 6517 6917 mosipov@ilbers.de http://ilbers.de/ Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov