Skip to main content

Netboot: Booting postmarketOS from the Internet

Categories   Smartphone Linux Phone
Tags   PostmarketOS
Table of Contents


Booting postmarketOS from Internet.

Netboot works like “Live-USB” that users could try postmarketOS without flashing the OS. Of course, the bootloader must be unlcoked in the first place.

  • Device: Xiaomi Redmi 5 Pro (whyred)

Run pmbootstrap and choose xiaomi/whyred. Then we have to modify kernel configs.

1. Check netboot compatbility of Linux kernel

  1. Check if the kernel supports Netboot
pmbootstrap kconfig check --netboot linux-xiaomi-whyred
  1. If the kernel does not support Netboot, this message should pop up:
WARNING: linux-xiaomi-whyred/config-xiaomi-whyred.aarch64: CONFIG_BLK_DEV_NBD should be set.
ERROR: kconfig check failed!
  1. Edit kernel configs
pmbootstrap kconfig edit
Symbol: BLK_DEV_NBD [=n]
Type  : tristate
Prompt: Network block device support
 -> Device Drivers
     -> Block devices (BLK_DEV [=y])
        -> Network block device support
  1. Compile Linux kernel
pmbootstrap build linux-xiaomi-whyred

2. Netbooting

  1. Create rootfs
pmbootstrap --extra-space 3000 install --no-sparse
  1. Reboot the phone into fastboot mode. Connect it to PC. Then postmarketOS logo will show up and wait for rootfs
pmbootstrap initfs hook_add netboot
pmbootstrap flasher boot
  1. Open 9999 port of firewall on the PC. Then start Netboot server:
pmbootstrap netboot serve
  1. Now the phone should boot. We could ssh into it:
  1. Now we can try out postmarketOS on the phone. Everthything works like real installation. And postmarketOS will stop working if the phone is unplugged from PC.

The data of Netboot postmarketOS is located at ~/.local/var/pmbootstrap/images_netboot/.



[Root] Running docker container on Redmi Note 5 Pro
Categories   Smartphone Root and Custom Rom
Tags   Termux Android Linux Docker
[Root] Box86 + Wine in 64bit chroot on Android
Categories   Smartphone Termux Tutorial
Tags   Termux
Convert images to AVIF/AVIFS with open-source tools
Categories   Linux Linux Good Software
Tags   AOMedia Video 1

Leave a comment

Choose the comment system you like. Giscus for codes, Disqus for anonymous comments.

Please login to your Github account to leave a comment. You can post codes here for discussion. For images, please upload to Imgur and copy links. Your comments would be visible to everyone on Github Discussions.

This comment system is provided by Disqus, you may see forcing Disqus ADs on this page. Sometimes your comment may need to be reviewed, resulting in delayed display. Thank you for your understanding.