Install Ubuntu on your tablet (Legacy images only)
This document is a guide for installing Ubuntu Linux on your Xiaomi Mi Pad 5 with the latest mainline kernel.
We don’t take any responsibility for any damage done to your device. By following this guide, you agree to take full responsibility of your actions.
Download images
You can get a copy of Ubuntu image in the "Download" section for free.
Download them and continue reading...
Partition the UFS
This procedure will not erase your Android data files, since Android will automatically fixing the userdata partition.
To modify the partitions on the UFS, we'll need to download a 3rd-party recovery environment called "Orangefox Recovery" Link is here below:
Once you've downloaded, open a terminal and type the following commands:
This will start booting recovery image. Once the screen is on, use the terminal to continue processing. We well use adb shell command to finish the rest of this guide. Enter this command in your terminal, it well help you to check the userdata partition's location:
In this example, the userdata partition is located in the 31st partition of the whole disk. It has the biggest size, compared with other partitions. So this is the key for requiring new space for our Ubuntu installation.
To resize the userdata partition, we'll need to use the parted command tools to do this. Now let's open adb shell again and start typing parted in the terminal.
Enter print command to list all partitions for /dev/block/sda :
Then you will see your current partition table with userdata being the last partition
Below is an example of output:
Now let’s continue partitioning:
Here the size of userdata can be decided by yourself.
Delete partition 31 and again make sure it is not deleted incorrectly.
Check the results:
Note the end of the last partition in the above list, 10.9GB, this number will be used as the start of the new userdata partition, followed by the end of the partition. Let say that we want to make an approx 40GB userdata partition using the following command:
Between userdata and 10.9GB are 3 spaces, one of them replace the partition type flag, it is important to use 3 spaces at this step.
Run print again to see the results.
Exit the parted tool finally.
Now userdata resizing is done. Restart your tablet to apply changes.
Install new system
Enter fastboot mode and repeat the previous steps.
We'll use the free space for our Ubuntu installation:
The output will look like this:
Exit the parted tool and reboot once again.
Now we need to check which slot Android is installed.
You can check this information via fastboot . Command is listed below:
Force select Slot A as active slot:
Now, we are ready to flash the system image. But before we start, we need to disable Android Verified Boot (AVB) feature, otherwise it will prevent booting Ubuntu system.
Flash the vbmeta with vbmeta_disabled.img to disable this feature:
Erase Android DTBO partition, we do not need it, but if present will be loaded and will prevent our boot.
Flash boot.img :
Flash rootfs image, please use the partition name you created, this process will take a while, grab another beer.
Finally, reboot and you are ready to rock!
Last updated