From patchwork Sat Dec 14 12:05:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8323 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Y9Q0D01Bqz3wxg for ; Sat, 14 Dec 2024 12:06:03 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Y9Q062QvtzfX; Sat, 14 Dec 2024 12:05:58 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Y9Q060xr4z32pG; Sat, 14 Dec 2024 12:05:58 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Y9Q023TXlz30Mg for ; Sat, 14 Dec 2024 12:05:54 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "michael.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Y9Q014FhMz10l; Sat, 14 Dec 2024 12:05:53 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4Y9Q010LzXzTgkq; Sat, 14 Dec 2024 12:05:53 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 2/2] flash-image: Create a journal when the filesystem is being created Date: Sat, 14 Dec 2024 12:05:47 +0000 Message-Id: <20241214120547.863221-2-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241214120547.863221-1-michael.tremer@ipfire.org> References: <20241214120547.863221-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: RAZTAPA2LTC3O37LKVQKB6G7KNAE4Z6K X-Message-ID-Hash: RAZTAPA2LTC3O37LKVQKB6G7KNAE4Z6K X-MailFrom: root@michael.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael Tremer X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: We recently started to have problems when a new installation was launched from the flash image that creating the journal corrupted the filesystem on the next mount operation. Since we would like all IPFire installations to have a journal, we create this now when we create the image and won't try to add it later. Signed-off-by: Michael Tremer Reviewed-by: Adolf Belka --- lfs/flash-images | 2 +- src/initscripts/system/partresize | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lfs/flash-images b/lfs/flash-images index 30513f0bc..27d3a89d7 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -126,7 +126,7 @@ endif ifeq "$(EFI)" "1" mkfs.vfat $(PART_EFI) endif - mkfs.ext4 -O ^has_journal,extent -F $(PART_ROOT) + mkfs.ext4 -F $(PART_ROOT) # Most systems that use Flashimages has no RTC at boot # so the interval check should disables diff --git a/src/initscripts/system/partresize b/src/initscripts/system/partresize index df9c43991..832bc7237 100644 --- a/src/initscripts/system/partresize +++ b/src/initscripts/system/partresize @@ -48,7 +48,6 @@ case "${1}" in # Azure and Google Compute Platform if running_on_ec2 || running_on_oci || running_on_azure || running_on_gcp; then scon="on" - journal="on" fi mount /boot > /dev/null @@ -110,18 +109,6 @@ case "${1}" in root_dev="${dev::-2}" fi - # Check if the device support smart - smartctl --smart=on "${root_dev}" > /dev/null - if [ ${?} = 0 ]; then - journal="on" - fi - - # Enable journal - if [ "${journal}" = "on" ]; then - boot_mesg "Create journal on "${dev}" ..." - tune2fs -O has_journal "${dev}" - fi - boot_mesg "Growing root partition to maximum size..." echo -e ',+' | sfdisk --no-reread -f -N${part_num} "${root_dev}" 2>/dev/null