[Xiaomi Mi 8 Questions & Answers] sorfat:
Never encountered that error however, if you have Lineage installed i have to wonder how or why your phone is able to boot into mi recovery ? You should have a custom recovery installed (twrp, orangefox .. something)

If you have a ryzen laptop - see the thread about ryzen cpu - they have some issues with recognising properly devices via usb - solved by using a hub.

There is no need to use miflash to flash the fastboot miui rom - you can do it from command line in both windows and linux. Once you decompress the fastboot tar.gz, you have .bat and .sh files in the folder - miflash runs those exact files. Just install adb and fastboot on kubuntu and run your choice of script (flash_all, flash_all_lock, etc.) this has the added benefit of not needing odd drivers in windows (last time i used miflash it complained about some .net stuff that i had to manually install).

Since normally you would install twrp i have to wonder if by any chance mi-recovery is not checking the boot image before flashing it ... not sure, or maybe it had something to do with the FBE of lineage since there was no recovery in place to decrypt the partitions, if i remember correctly, the boot image needs to be signed with the verity key. The log snippet you provided doesn't tell anything as it has no error messages or anything.

Either way, not sure how what you brutforced to get it working but glad it solved itself, however, if you still have mi-recovery instead of a custom one, i would suggest you backup the device, flash MIUI without locking the bootloader, installing twrp (not just booting it) and reinstalling lineage from there. (all this can be done from your kubuntu install so you avoid driver and other windows shenanigans)

to install adb and fastboot it's just a question of sudo apt install adb fastboot

either tar -xvzf the archive of the fastboot image or just extract it from the file manager

open a terminal in the extracted folder (where the bat and sh files are)

put the phone in fastboot mode, connect via usb and do a "fastboot devices" just to make sure the device shows up

./flash_all.sh (this does the exact same thing as the clean option in miflash - just open the script and take a look through it)

Once the flash is done and the phone reboots, skip through all the setup steps just so miui loads up then reboot to fastboot

get twrp from their website, open terminal where it is downloaded and "fastboot flash recovery <name_of_file>.img"

once the command finishes do a "fastboot boot <name_of_file>.img" and once you are in twrp, go yo wipe, do a factory reset, back, advanced wipe and select the caches, back, format data, type yes, back to the main menu of twrp and reboot recovery, this should boot you back into twrp but this time the one that is flashed on the device.

from here on install rom of choice and magisk as usual (use the install option in twrp tho, don't unpack the zip)

Had the phone for 2 years and i flashed different roms on it almost weekly since the wait time to unlock the bootloader expired and never had an issue with this workflow and it saves you from having to use windows. Even for unlocking the bootloader, in case you ever lock it back up, you can use https://xiaomitool.com/V2/download (worked like a charm on linux)