[Android Q&A, Help & Troubleshooting] thd2020:
Device: Xiaomi Pad 5 pro 12.4 (dagu)

Bandname: sm8250(Qualcomm snapdragon 870)

When on slot a, I have flashed my system partition with a GSI lineageos, so where did it reside? On slot a or b?

Say I dirty-flashed it and could boot into my new os, then I switched to slot b in bootloader, and I attempted to flash a ubuntu on it. My device is xiaomi pad 5 12.4 (dagu).

Followed tutorials on web, I first partitioned my /dev/block/sda: I resize my userdata partition, and create a new partition, namely sda35, to accommodate my ubuntu rootfs image.

Secondly, I tried to create a boot image myself: I compiled the linux kernel source code for sm8250(sm8250 is the cpu brand for dagu), getting a kernel file called "vmlinuz-6.2.0-sm8250-g4fa4fe25ab35-dirty"(why is it dirty?). I also compiled dtbs. And I used cat to concatenate the kernel and the specific dtb file, say "dagu-sm8250-overlay.dtb", into one file, called "ZImage".

Then I used "mkbootimg" command like this: -----mkbootimg --kernel zImage --cmdline "console=tty0 root=/dev/sda35 rw rootwait" --base 0x00000000 --kernel_offset 0x00008000 --tags_offset 0x00000100 --pagesize 4096 --id -o boot_new.img ----- And here the "root=/dev/sda35" indicated my rootfs will be flashed to my sda35 partition, which is called "linux"(Again, when I parted my partitions in rec mode, I actually parted /dev/block/sda, but here is this tutorial, the "block" sub-dir is removed, why?). Then I flashed the new boot image to my boot_b. And then I flashed a ubuntu rootfs image made by others into "linux" partition( The reason I used which is made by others is that, the tutorial also shows how to create a rootfs image. I noticed that it simply do download the base rootfs of ubuntu base, and install some packages, create a user, setting the netface, etc.. Seemed nothing to do with specific device structure, so I simply borrowed an already-made image) to my linux partition. Then I input " fastboot reboot".

Something weird, the tablet again booted into bootloader. I mean, I typed in " fastboot reboot", hoping to see the bootloader loading the kernel and finally go into the ubuntu rootfs, but it just booted back into bootloader mode.

I then did some contrast experiments: I deliberately made a corrupted boot image( I deleted thousands lines from the kernel raw file in the boot image) and I tested that. It stuck on the splash logo( note, this is different. If I used a corrupted boot image, it just stuck in the fist screen, the mi logo and even not go next step). I tested several bad boot images to find the same results. So I guess somehow my original boot image is recognized, but for some reason the system rejected it and again booted into bootloader mode, and I'm striving to figure out the reasons, that's the first step:

Is it because the kernel in my boot image is wrong?

or because there's no ramdisk in my boot image(what is a ramdisk actually?)

or my cmdline config of my boot image ,which is "console=tty0 root=/dev/sda35 rw rootwait"( by the way, can you explain this command line) is wrong?

or at the very first stage, the flashing of system image corrupted everything? How?

I also did something extra, namely erasing my dtbo_b, flash with --disable-verification vbmeta_b, could be that?

Or is it because of the bad dtb file in boot image?

P.S. I also tested the boot image published by armbian for xiaomi pad 5 pro(elish)(note the same cpu, but two product name), It can boot with only one second splash command line screen, and everything went blank either. Thanks for your generous help!