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 <michael.tremer@ipfire.org>
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
# 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
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