How to change boot device order?

Hi all. I finally got around to installing a wifi card and NVME drive into my reform today. The wifi works without any issues.

But, when I try to boot the system, I only see about half a screen of the booting process and then a blank screen. When I removed the NVME drive, it boots from the SD card without issues.

How and what do I need to change so that it defaults to booting from the SD card? I only want to use the NVME for storage at this time until I learn more.

I’ve used Linux a lot in the past, Raspbian and Ubuntu mainly for robotics (robot operating system, ROS). But I don’t have much experience with understanding things at this lower level.

SoC is iMX8MQ and OS is debian trixie (most recent image from MNT).

Thanks!

1 Like

I don’t know enough about u-boot to actually answer your question, but I think the general idea is u-boot is loaded from somewhere (either always the eMMC or possibly SD card then eMMC? I’m unsure), and then it uses a config file to load a kernel and device tree off of the boot partition. I’m not sure if using an SD card is using the same uboot on the emmc but with a different boot partition + config, or if something searches for a partition with a uboot, and loads that particular uboot.

I think the extlinux.conf file in the boot partition is the right spot to make changes?

References:

There’s docs for building for the evaluation board for imx8mq here, but I’m not sure it’s directly applicable to the MNT Reform or not, and doesn’t seem like it’s more about compiling and installing than configuring:

Sorry i can’t actually answer. :frowning:

Oh, this might have useful information embedded in it, too:

Sorry for all the replies. I think this implies it might be controlled by a dip switch for the imx8mq?

MNT does not offer Debian trixie images. Did you download the system image from reform.debian.net? If yes, those are not from MNT as it says in the big yellow admonition on the front page.

That being said, the answers to your questions are independent on whether you get your system image from MNT or from reform.debian.net.

This depends on what “booting from” means. There are three things that “booting from” does usually mean:

  1. where is u-boot loaded from
  2. where is the /boot partition loaded from
  3. where is the rootfs loaded from

The answer to 1. depends on the setting of the DIP switch on your imx8mq:

That document should also answer your other questions but the summary is that on imx8mq, the dip switch will choose where to load u-boot from, u-boot will prefer loading boot.scr or extlinux.conf from sd-card over loading it from emmc and boot.scr and extlinux.conf can then load the linux image and rootfs which in turn starts the kernel and can mount the rootfs from anywhere including (possibly encrypted) nvme.

Let me know if you want to know more.

Thanks for the replies UnlikelyLass and josch. i pasted below the output from sudo reform-check. It might help you help me….

I guess, the main thing I don’t understand is how installing a blank NVME (the 512GB Transcend 110S M.2 PCIe NVMe from Crowd Supply) into the Reform will result in it not booting up. I don’t have the NVME installed right now, which is how I am able to type this… :grinning_face:


I: Contents of /proc/device-tree/model: MNT Reform 2
I: `uname -a` output: Linux linuxrobot 6.15.4-mnt-reform-arm64 #1 SMP Debian 6.15.4-1\~exp1+reform20250628T170930Z (2025-06-28) aarch64 GNU/Linux
I: Version of linux-image-mnt-reform-arm64: 6.15.4-1\~exp1+reform20250628T170930Z
I: Version of reform-tools: 1.75-2+reform20250622T103710Z+1
I: Mount source of /: /dev/disk/by-label/reformsdroot (n.a.)
I: Mount source of /boot: /dev/mmcblk1p1 (SD-card)
W: /etc/flash-kernel/machine does not exist
W: /dev/mmcblk0p2 doesn’t exist.
W: To update your eMMC to sysimage-v4 you can run reform-flash-rescue
W: Only run reform-flash-rescue if you intend a factory-reset of your eMMC
W: Do not use reform-flash-rescue if you boot from eMMC because this will overwrite your /boot partition
E: /etc/flash-kernel/machine doesn’t exist
E: It should contain either ‘MNT Reform 2’ (for single display) or ‘MNT Reform 2 HDMI’ (for dual display).
E: You can run reform-display-config as root to create a working version.
E: Your /etc/skel/.profile contains an outdated line that attempts to print /etc/reform-help or run reform-help.
E: Consider simply deleting that offending last line of your /etc/skel/.profile.
I: the following files differ from how they are shipped by reform-tools (ignore /var/lib/alsa/asound.state):
??5???   /var/lib/alsa/asound.state
I: kernel boot parameters which are the default but your system doesn’t use them:
* console=ttymxc0,115200
* cma=512M
* pci=nomsi
W: /etc/u-boot-menu/conf.d does not exist – create it by running reform-display-config
W: /etc/u-boot-menu/conf.d/reform.conf does not exist – create it by running reform-display-config
W: eMMC does not contain latest uboot
W: You can update it to the latest version by running as root:
  reform-flash-uboot emmc
I: SD-card contains the latest u-boot version 2024-07-19

This is worrysome. Can you paste me the output of this command:

cat /proc/device-tree/chosen/u-boot,version

And, if it’s not a bother, could you provide the position of your DIP switch on your imx8mq module? You’d have to remove the heatsink to see it.

The output from the command is:

cat: /proc/device-tree/chosen/u-boot,version: No such file or directory

I manually navigated to that directory and that item isn’t there.

Also, the DIP switch on the SoC is set to OFF

Whoops. This means that this line is now the most important one:

And since you get:

The u-boot on your eMMC is probably ancient. We could have a look at the binary if you are curious which version you are running.

In any case, it seems to be ancient enough to not have cma=512M pci=nomsi. You should upgrade that.

After updating uboot on the eMMC, I was able to see (using lsblk), partition, and mount the nvme drive!

Thanks to both of you for the help. :slightly_smiling_face:

1 Like