Debian 9.1 on a Xiaomi Air 12.5 laptop
Installing Debian 9 on a Xiaomi Air, 12.5 inches, m3 (7Y30) CPU, 4 GB RAM / 256 GB SSD
A friend of mine recently purchased a Xiaomi Air laptop with the above specification.
(Chinese only, but Chrome will translate it)
Unimpressed with Windows 10, especially as it's only licenced in Chinese he attempted to install Debian 9, which
resulted in "bricking" the laptop. I offered to "take a look", these are my notes and I hope they are useful for
Unbricking the laptop.
Upon initial inspection the laptop to refused to boot anything. Neither the OS on the SSD not the Linux installer on a
provided USB memory stick could be started. A USB memory stick with a Centos 7 image had been prepared and it was
possible to boot that.
Centos 7, 64 bit is documented to work with UEFI and Secure Boot.
Opening the BIOS (F2 key) confirmed it was of the UEFI variety with "Secure Boot" enabled. Enabling "Legacy mode" which also disabled "Secure Boot" allowed the USB memory stick to be seen and booted from.
The track pad does not work with the installer, since the only USB port has the installation media, the keyboard will need to be used to navigate the graphical installer.
The memory stick was prepared with Debian 9.1, AMD 64 bit, network install with non-free firmware. Additional firmware needs to be downloaded and placed on the USB memory stick. When the memory stick is prepared, a second partition, /dev/sdb2 on the PC writing the image, is created, but needs to be larger to accommodate the additional firmware.
The partition type is “ef” and the file system if “vfat”:
1) Mount /dev/sdb2 on the machine being prepared:
sudo mkdir /media/usb/sdb2 sudo mount /dev/sdb2 /media/usb/sdb2
2) Copy the contents of the partition off the USB memory stick:
mkdir /home/username/sdb2 cd /home/username/sdb2 sudo cp -r /media/usb/sdb2/* .
3) Remove the old partition from the memory stick and create a new one:
sudo umount /dev/sdb2 sudo fdisk /dev/sdb
Press “d” to delete a partition.
Enter “2” to select the partition.
the partition is removed
Press “n” to create a new partition.
Press “2” to select the partition.
Accept the default
Enter “+2G” for a 2 Gbyte partition.
Press “t” to change the type.
Press “2” to select the partition.
Enter “ef” and press [ENTER] to set the partition type.
Press “w” to write the new partition table to the media.
Press “q” to quit.
At this point it may be necessary restart the PC. Fdisk will state if it was unable to persuade the Kernel to reread the partition table. If a reboot is needed, do so now after removing the USB memory stick.
4) Create a file system on the new partition and mount it:
sudo mkfs -t vfat /dev/sdb2 sudo mount /dev/sdb2 /media/usb/sdb2
5) Download and copy the extra firmware to the memory stick
The firmware can be downloaded from:
The files are located in the browser’s download directory, for example /home/username/Downloads and need to be copied to the UBS memory stick. This is will be copied the sdb2 root and firmware directories as there is some uncertainty about the correct location.
cd /home/username/sdb2 cp /home/username/Downloads/iwlwifi-8000C-27.ucode . cp /home/username/Downloads/iwlwifi-8000C-31.ucode . mkdir /home/username/sdb2/firmware cp /home/username/Downloads/iwlwifi-8000C-27.ucode firmware/ cp /home/username/Downloads/iwlwifi-8000C-31.ucode firmware/
6) Copy the contents to the USB stick
sudo -r cp /home/username/sdb2/* /media/usb/sdb2 umount /dev/sdb2
At this point the USB memory stick has the firmware required to install Debian 9.
7) The Debian installer can use UEFI, switch the BIOS to use this and reboot with the USB memory stick inserted into the USB port.
The first few boots seemed to enter the BIOS immediately, simply exiting the BIOS without saving any changes allowed the installer to start.
8) Start the installation
Choose appropriate options for your location, language and keyboard. When detecting the network hardware, it will fail, with a prompt to provide additional firmware.
iwlwifi-8000C-26.ucode iwlwifi-8000C-25.ucode iwlwifi-8000C-24.ucode iwlwifi-8000C-23.ucode files are missing.
Switch to the command line (Ctrl+Alt+F2) and press [ENTER].
Mount the 2nd partition on the UBS memory stick:
mkdir /media/sdb2 mount /dev/sdb2 /media/sdb2
Switch back to the installer (Alt+F5, not Ctrl+Alt+F5)
Select the option for the installer to use the additionally mounted media and proceed with the installation.
Once Debian 9.1 is installed the track pad works as expected as does bluetooth, wifi, sound and video.