Install Linux on your F50 or U30 Air

Four steps, about 15 minutes. Every question the installer asks is explained below, with the answer to give when you are not sure.

  1. Back up

    Copy your device's own irreplaceable data to your computer. Recommended.

  2. Check

    --check reads the device and says where Linux fits. It writes nothing.

  3. Install

    Answer a few questions, read the summary, type INSTALL.

  4. Log in

    About a minute later, over USB: SSH or a web browser.

Before you start

In one sentence: the device must already be rooted, and your computer must be able to talk to it with adb. Here is the full list.

The device

Your computer

ComputerWhat it needsHow you run the installer
macOSadb, Python 3, lz4 and curl (usually already there)./install.sh in Terminal
Linuxadb, Python 3, lz4 and curl./install.sh in a terminal
Windows 10/11adb and PowerShell. The installer installs Python 3 and its lz4 module by itself when they are missing..\install.ps1 in PowerShell, or install.cmd in cmd (no execution-policy change needed)

adb comes with Android's platform tools. On Windows the installer also finds a platform-tools folder unzipped next to the project, in your Downloads or on the desktop, even when it is not on the PATH.

Get the project

Clone it with git, or download it from GitHub (the green "Code" button, then "Download ZIP") and unpack it. Either way the installer brings itself up to date with GitHub when it starts.

git clone https://github.com/dikeckaan/mu300-linux
cd mu300-linux

Then make sure the computer sees the rooted device:

adb devices          # your device should be listed as "device"
adb shell su -c id   # should print uid=0(root)

The first time, the device asks to allow USB debugging from this computer, and Magisk may ask to grant root to the shell: allow both.

Read this once

Installing writes to one boot partition (boot_b, or boot_a when Android runs from slot b, as it often does after an update) and to 32 bytes of misc. On the usual 64 GB device, Android, its data and the partition table are never modified. Still, a power cut at the wrong moment, a bad cable or a mistake can leave a phone-class device needing a recovery tool. Keep a backup and do not install on a device you cannot afford to lose.

Back up what cannot be replaced

Recommended. This copies your unit's own data (prodnv, the modem calibration and IMEI partitions, the bootloader chain) to your computer and checks every copy against the device.

tools/backup-device.sh          # macOS / Linux, device in rooted Android

Installing never touches these partitions, but if they are ever lost, no firmware download can bring them back and the modem stays broken. Keep the folder somewhere safe and out of any repository: it contains your IMEI. The script runs on macOS and Linux.

Check your device

This only reads; it writes nothing.

./install.sh --check          # macOS / Linux
.\install.ps1 -Check          # Windows (PowerShell)
install.cmd -Check            # Windows (cmd)

It prints the storage size, where Android's partitions end and how much free space follows them. The last line starting with result: is what matters:

If it saysIt means
OK: free and empty, same layout as the tested device (~32 GiB after userdata on the 64 GB eMMC)The usual 64 GB device. Go on to step 2.
OK: free and empty, ... but room for one system only, or OpenWrt fits, Ubuntu does notA smaller free area. Install what fits, or use an SD card (F50).
too little free eMMC space for Linux; the installer will offer the SD card insteadThere is a card in the slot; the installer will offer it, and nothing is repartitioned.
OK: a MU300 Linux installation is already presentLinux is there already: the installer will offer update or wipe.
WARNING: the unpartitioned space is not emptySomething has written to the free area. Installing would overwrite it; the installer asks you to type overwrite.

No free space at all: the 32 GB variant

If the check finds no room, you have the 32 GB variant, where Android's userdata fills the whole disk. You have two ways:

Use an SD card (F50)

Put a card of at least 700 MiB in the slot while the device is switched off. The installer offers it, formats it, and nothing on the internal storage is repartitioned.

Shrink userdata (experimental)

The installer can make room by shrinking userdata. That rewrites the partition table and erases everything in Android. It asks first and wants ERASE typed. Back up with tools/backup-device.sh before saying yes.

If the numbers look like neither case, stop and open an issue with what --check printed: they identify the variant.

About the SD card (F50 only)

  • A card of at least 700 MiB. It is formatted as ext4 with the label mu300sd. A card that already holds another Linux (ext4) filesystem is never formatted.
  • Insert it while the device is off. A card inserted while Linux runs can only be read after the next restart.
  • A mu300sd card always starts first. Without the card the device starts the internal installation if there is one. With none, it waits a few seconds for a card, then returns to Android after about five minutes.
  • All three kernels read the card. The U30 Air has no slot.
  • The device starts any card labelled mu300sd, so whoever has the device can also start their own system from a card.

Install

./install.sh                  # macOS / Linux
.\install.ps1                 # Windows (PowerShell)
install.cmd                   # Windows (cmd)

First it asks for the language, brings your copy of the project up to date with GitHub (and restarts itself if there was anything new), and checks the device again. Then come the questions below. After them it:

  1. downloads the ready-made images of the newest release and checks their checksums,
  2. copies the Wi-Fi and modem files from your own device (the downloads contain no proprietary files),
  3. shows exactly what it is about to write and waits for you to type INSTALL,
  4. copies the systems to the device, writes the Linux boot image and arms the Linux slot,
  5. adds a small Magisk module to Android, so you can start Linux from Android later without a computer,
  6. restarts the device into Linux.
The installer in a terminal: the language menu, the device check, the free eMMC region found, then the questions about which systems to install, which Ubuntu, and whether Linux boots by default.
A real run of the installer, from the language question to the first choices.

The installer's questions, one by one

The text in grey boxes is what the installer prints (shortened). The value in square brackets, like [yes], is the default: pressing Enter takes it. Some questions only appear when they apply.

Language / Dil / 语言 [1]

The language of the installer: 1 English (the default), 2 Türkçe, 3 中文.

Press Enter for English.

Where should the Linux filesystem go: internal storage or the SD card (...)? (internal/sd)

Asked only when an SD card is in the F50. internal uses the free internal space, sd formats the card for Linux (everything on it is erased, and you will type ERASE to confirm).

Not sure? internal on a 64 GB device; sd on the 32 GB variant.

What should be installed? 1) Ubuntu LTS 2) OpenWrt 3) both

Ubuntu is a full Linux system with apt (about 500 MiB of RAM in use). OpenWrt is a router system with a web interface (about 140 MiB). Both installs the two side by side; you switch later with mu300-os.

Not sure? 3, both (the default), if the check said both fit. See choose a system.

Which OpenWrt? 1) the standard LuCI web interface 2) with the MU300 control panel

Asked when OpenWrt is chosen. The control panel adds a dashboard, cellular locks, SMS, an AT terminal and USB modes.

Not sure? 2 if you want to see signal and SMS in the browser; 1 for plain OpenWrt (the default).

Which one should boot (ubuntu/openwrt)

With two systems: which one starts first. The other stays installed.

Press Enter for Ubuntu.

Which Ubuntu? 1) 24.04 LTS 2) 26.04 LTS

24.04 is the default and the longest tested, supported until 2029. 26.04 is the newest (systemd 259, newer packages), supported until 2031, and needs a mainline kernel (6.18 or 7.2).

Not sure? 1, 24.04 (the default).

Boot Linux by default instead of Android (falls back to Android if Linux fails)? (yes/no)

yes: every start goes to Linux, and Android only after failed starts or when you ask for it. no: Android stays the default and you start Linux when you want it.

Press Enter for yes.

Failed boots before Android (1-6)

How many unfinished starts in a row before the device goes back to Android by itself. A start counts as failed when it never finishes within about a minute: the power goes, the battery runs out, or Linux hangs. Higher forgives a flaky cable; lower gets you to Android sooner. It is also your way back with no computer: cut the power while it is starting this many times in a row.

Press Enter for 5. Change it later with mu300-next-boot attempts N.

Copy Android's hotspot name and password to Linux? (yes/no)

Your phones already know the Android hotspot, so they join Linux's hotspot without new settings.

Press Enter for yes.

Include the Mali GPU (OpenCL) userspace (~90 MiB)? (yes/no)

The graphics chip, for computing with OpenCL. There is no screen either way.

Press Enter for yes; say no to save the space.

Install the VPN module (about 40 MB more to download, 120 MB on the device)? (yes/no)

The optional VPN of mu300-linux-vpn. You can add it later on the device with sudo mu300-extra install vpn.

Not sure? no (the default on a first install).

Which kernel? 1) 5.4 2) 6.18 3) 7.2

The kernel is the core of Linux that talks to the hardware. 5.4 is Unisoc's vendor kernel, the longest tested. 6.18 is mainline Linux's long-term release with newer drivers and the same functions. 7.2 is the newest, tested less than 6.18.

Not sure? 1, 5.4 (the default). Ubuntu 26.04 needs 6.18 or 7.2. Change it later with sudo mu300-update kernel 6.18.

update or wipe

Asked only when Linux is already installed. update reinstalls the systems and keeps your settings, users, home directories, SSH host keys and OpenWrt's settings. wipe erases the Linux filesystem and starts from scratch.

Press Enter for update.

Password for the "ubuntu" user (Ubuntu) and "root" (OpenWrt)

The password you will log in with, at least 6 characters, typed twice. Nothing shows while you type.

Choose one you will remember: you need it in step 3.

Type INSTALL to continue

The last stop. Above it the installer prints exactly what it will write: the systems, the kernel, the default boot and the partitions it touches. Read it. Anything other than INSTALL cancels.

Type INSTALL in capitals.

The installer's summary before installing: the release, the systems, the kernel, the default boot, the filesystem and exactly which partitions are written, followed by the prompt to type INSTALL and the end of the install.
The summary before anything is written, and the end of a successful install.

Log in

Wait about a minute after the restart. The device appears on your computer as a new network adapter over USB. Then, in a terminal (on Windows, PowerShell has ssh built in):

ssh ubuntu@192.168.77.1        # Ubuntu on the F50
ssh root@192.168.77.1          # OpenWrt on the F50
ssh ubuntu@192.168.78.1        # Ubuntu on the U30 Air

Use the password you chose during the install. The first time, ssh asks whether you trust the device's key: answer yes.

F50 / MU300U30 Air
Address over USB192.168.77.1192.168.78.1
Ubuntussh ubuntu@192.168.77.1ssh ubuntu@192.168.78.1
OpenWrtssh root@192.168.77.1 or http://192.168.77.1 in a browserssh root@192.168.78.1 or http://192.168.78.1

The two addresses differ so that an F50 and a U30 Air can be plugged into one computer at the same time.

The Wi-Fi network the device broadcasts is its hotspot: unless you chose otherwise, it has the name and password copied from Android.

On a Mac, unlock the screen the first time

macOS does not set up a network interface it has never seen while the screen is locked. The first time you plug the device in (or after an update that changed its USB addresses), unlock the Mac and the interface appears.

When the network does not come up at all, there is also a serial console over the same cable, which works even without networking:

screen /dev/cu.usbmodem* 115200   # macOS

After the install

sudo mu300-toolkit             # a menu for everything
sudo mobile-data status        # is the 5G/LTE connection up?
sudo mu300-update check        # is there a newer release?

mu300-toolkit is a menu like raspi-config: temperatures, CPU and RAM use, network speeds, performance profiles, Wi-Fi, VPN and software updates. The features page lists the direct commands, and updates and safety explains updating, rolling back and switching to Android and back.

Choices you can skip by setting them in advance

SettingWhat it does
MU300_LANG=tr ./install.sh, .\install.ps1 -Lang zhskips the language question (en, tr, zh)
MU300_STORAGE=sd or internalanswers the internal storage or SD card question
MU300_OPENWRT=plain or lucianswers "Which OpenWrt?"
MU300_NO_SELF_UPDATE=1, -NoSelfUpdatedoes not update the project from GitHub first
MU300_FETCH_JOBS, MU300_RELEASE_URLparallel download chunks (8 by default), or your own mirror of the release files

Without a computer: Magisk zips

If the device already runs a rooted Android with Magisk 26 or newer, Linux can be installed from the device itself. Every release has one zip per system and kernel; the same zip works on the F50 and the U30 Air and finds the place by itself (the internal storage or an SD card).

ZipSystemKernel
mu300-magisk-<tag>-openwrt-k5.4.zipOpenWrt5.4
mu300-magisk-<tag>-openwrt-k6.18.zipOpenWrt6.18 LTS
mu300-magisk-<tag>-openwrt-k7.2.zipOpenWrt7.2
mu300-magisk-<tag>-openwrt-luci-k5.4.zipOpenWrt with the control panel5.4
mu300-magisk-<tag>-openwrt-luci-k6.18.zipOpenWrt with the control panel6.18 LTS
mu300-magisk-<tag>-openwrt-luci-k7.2.zipOpenWrt with the control panel7.2
mu300-magisk-<tag>-ubuntu-24.04-k5.4.zipUbuntu 24.045.4
mu300-magisk-<tag>-ubuntu-24.04-k6.18.zipUbuntu 24.046.18 LTS
mu300-magisk-<tag>-ubuntu-24.04-k7.2.zipUbuntu 24.047.2
mu300-magisk-<tag>-ubuntu-26.04-k6.18.zipUbuntu 26.046.18 LTS
mu300-magisk-<tag>-ubuntu-26.04-k7.2.zipUbuntu 26.047.2
  1. Take one zip from the latest release and check it with SHA256SUMS-magisk. A release has 11 of them, OpenWrt with the control panel included.
  2. Install it in the Magisk app (Modules, Install from storage), or from adb shell:
    su -c 'magisk --install-module /sdcard/Download/<zip>'
    Not from recovery.
  3. Read the output. It shows the device it found, where Linux goes, what it writes, and the password it generated. The password is also in /data/adb/mu300-linux-password.txt; delete that file after your first login.
  4. Restart. Linux starts; if it does not, the device returns to Android by itself.

For two systems, install the OpenWrt (or control panel) zip and the Ubuntu zip one after the other. The zips never shrink userdata; that stays with the computer installer. Settings such as the storage, the boot default or your own password go in a mu300-install.conf file, explained in the README.

Removing it again

With the device back in Android, run ./uninstall.sh (Windows: .\uninstall.ps1 or uninstall.cmd). It makes Android the boot system again, restores the second boot partition and erases the Linux filesystem. Your Android data is left alone. The choices it offers are on the updates and safety page.