I landed on this page because I encountered the same "mke2fs" command failures. In case it may be of help to others, this is how I fixed it.
I was installing lineage-18.1-20211206 on my Nexus 7 (2013), which previously had Google's stock Android 6.0.1 (MOB30X). My host was a Linux PC.
The
installation instructions proceeded smoothly until I loaded the
flo-deb_clamor_repartition_20201203.zip repartition scripts and ran the "modify" command (output attached). The "modify" command reported some progress, some errors, and then seemed to hang.
Eventually I decided to terminate adb by hitting Control-C. To my surprise this did not terminate adb, as I expected, but instead terminated the "modify" command (or whatever followed), returning me to the adb shell prompt. This then provided the opportunity to complete the "modify" command by hand.
After reviewing the repartition scripts within the ZIP file, I was able to determine that it was flo-deb_kingston_repartition_32GB.sh which failed. Specifically, the four "mkfs.ext4" commands:
Code:
mkfs.ext4 /dev/block/mmcblk0p22
mkfs.ext4 /dev/block/mmcblk0p23
mkfs.ext4 /dev/block/mmcblk0p30
mkfs.ext4 /dev/block/mmcblk0p31
When I ran these directly from the adb shell they succeeded. I then resumed the installation instructions by rebooting the device. Eventually I finished the installation successfully. My Nexus 7 is now running LineageOS 18.1, seemingly without any problems.
If I were to guess as to what went wrong with the repartition script, I would suspect a race condition between the "parted" command and the subsequent "mkfs.ext4" commands. The repartition script made no attempt to ensure that the partition table changes had propagated throughout the system before attempting to use them. This is achieved in Linux, for example, by using the "blockdev", "partx", "hdparm", or "partprobe" commands. I would presume that adb shell has something similar available to it.