NixOS on Pocket

Hey @Cyb3rVix3n o/

Was this using the nixos-hardware project or the hardware-mnt-reform project (the one currently under my GitLab namespace)? Glad you got it working!

Calamares support would be cool - but beware, I’m not aware of anyone having worked yet in the NixOS ecosystem on getting graphical install working on SD image based install media. Currently the graphical install media generation profiles are all tied up to the iso-based installer image profiles. You can see more of what I mean by inspecting the profile used to generate the graphical images here and comparing that with how the SD images are put together here

I looked into this at one point and it would need porting of the profiles to be able to use the sd-image profiles as a base, as you can see currently they import the cd-dvd profiles as base, which aren’t really usable in their current form on most aarch64 systems. Hope this helps!

1 Like

Hey there :grinning_cat:

I used the nixos-hardware project to create the boot medium. I used the standard Reform setup which might later need some tweaking for the pocket. Not much software on it but it works.
I also kinda managed to set up and install a system from it (deleting the installed Debian).

But somehow I didn’t manage to get the new system to boot. I’m not sure whether I chose the wrong boot drive or fucked up some parameters or flags. Unfortunately I’m not that familiar with u-boot.

Anyway, it should work with someone who knows their way around u-boot.

Gotta dive a little deeper once I got the time for it. I also wanna switch to encrypted disks once I got everything to work.

Cheers,
Triss

1 Like

The installer won’t install U-boot, if you repartitioned and formatted you would need to do that manually before installing. It’s probably best to install to an SD card until you are able to boot a working system, that way you have Debian as a fallback.

If you did install U-boot, you could try USB serial to see what is happening. Also boot may just be slow, and U-boot is not currently graphical on Pocket, so wait a few seconds and press enter to see if something happens.

I want to write up a guide for building and installing a minimal system starting from a stock Debian, once I get there myself.

1 Like

Hey @mountain

I moved Debian from the emmc to the nvme using the standard MBT tools. That leaces a boot partition on the emmc as far as I understand. Then I reformatted the nvme but I kept the emmc where u-boot should look for boot data.

Well, looks like I messed it up. Gonna have to either reinstall Debian and go from there or try to install u-boot.

Thanks for the help.

Cheers,
Triss

1 Like

Hey there :grinning_cat:

I finally got some time again to go into this. Looks like nixos-hardware doesn’t put the right files into the /boot folder.

I only got two folders there called “extlinux” and “nixos”.

Looks like nixos-install doesn’t place the kernel and u-boot files in the right place. Now I wonder what’d be the best way to fix this. I don’t really wanna go for debian because I want to use niri and some other tools that are not part of debian unstable so far.
Gonna have to see how to get this to boot. Maybe someone of you got an idea.

Cheers,
Triss

edit: I might have found my error. I tried to use the channel method to install NixOS and not the flakes. Maybe that got me into trouble but I’m not sure.
Anyone else got this kind of problems?

I finally got around to upgrading my “classic” mnt reform with the RK3588 module. I already had nixos running on the IMX8MQ on encrypted nvme storage, so I did not use the installer image. I had prepared a separate specialization in advance that disabled my IMX8MQ-related config and applied the module (by @leif) from nixos-hardware. To switch over I only had to chroot into my nix install on the nvme disk, update the boot partition id in hardware-configuration.nix to point at /dev/mmcblk0p1, make my specialization the default boot option, wipe the boot partition to create enough space and finally run nixos-rebuild boot.

I was half expecting a broken boot but rebooting worked on the first try! The only change I needed to make was to add the proper render-drm-device to the niri config.

As a final tweak I deleted the second partition on the mmc and expanded the boot partition to 2 gigs so I can fit a larger number of nixos generations for rollbacks.

I’m not sure how applicable my experience is with regards to running on the pocket, but the boot partition layout should at least be valid I think. I also only have the extlinux and nixos folders under /boot and that’s working completely fine for me. @Cyb3rVix3n, if you’re still having trouble booting I think you should look for some other explanation.

So I am currently trying to install Nixos on my Pocket Reform with RK3588. I want to try to create a ‘dual boot’-setup to keep the existing Debian install on the eMMC. For this, I want to use a NVME disk as NixOS root and a micro sd card as NixOS Boot. The goal is to boot NixOS when the micro sd card is inserted and to boot the factory Debian otherwise.

I built a NixOS Image using nixos-hardware/mnt/reform/rk3588 at master · NixOS/nixos-hardware · GitHub and flashed it to an sd card. It boots fine! :partying_face:

I partinioned the nvme with LUKS and btrfs and mounted it to /mnt.

I then mounted the other sd card i want to use as /boot via an adapter. Its available as /dev/sdb but I mounted it by uuid to /mnt/boot, as described here: Rane / hardware-mnt-reform · GitLab

Then I generated the config, created a little flake, added nixos-hardware as an input and the module like nixos-hardware.nixosModules.mnt-reform-rk3588. Then I installed it.

After the installation however, I cannot boot into NixOS, when I have the sd card inserted. The display does show nothing at all, so I hooked up a USB UART. It shows u-boot trying to boot NixOS, but then it gets stuck at “Starting kernel…”:

U-Boot 2024.10 MNT Pocket Reform with RCORE RK3588 Module 2026-01-28-g424c714eb247-dirty (Jan 27 2026 - 22:55:37 +0000)

Model: MNT Pocket Reform with RCORE RK3588 Module
DRAM:  32 GiB (effective 31.7 GiB)
Core:  327 devices, 26 uclasses, devicetree: separate
MMC:   mmc@fe2c0000: 1, mmc@fe2e0000: 0
Loading Environment from nowhere... OK
In:    serial@feb50000
Out:   serial@feb50000
Err:   sNT Pocket Reform with RCORE RK3588 Module
[mnt-reform-series-rk3588] setup_usb()
Hit any key to stop autoboot:  0 
Scanning for bootflows in all bootdevs
Seq  Method                       Filename
---  -----------  ------  --------  ----  ------------------------  meth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
No EFI system partiiled to persist EFI variables
No EFI system partition
Failed to persist EFI variables
No EFI partition
Failed to persist EFI variables
  0  efi_mgr      ready   (none)       0  <NULL>     Booting bootflow '<NULL>' with efi_mgr
Loading Boot0000 'mmc 1' failed
Loading Boot0001 'mmc 0' failed
EFI boot manager: Cannot load aScanning bootdev 'mmc@fe2c0000.bootdev':
  1  extlinux     ready   mmc          1  mmc@fe2c0000.bootdev.part /extlinux/extlinux.conf
** art_1' with extlinux
------------------------------------------------------------
1:	NixOS - Don 2-default (2026-03-30 21:16 - 25.11.20260316.48652e9)
3:	NixOS - Configuration 1-default (209)
Enter choice: 1:	NixOS - Default
Retrieving file: /extlinux/../nixos/8dgsaypcz0cv3wd65vbnjcdzlx0wxmx3-linux-6Retrieving file: /extlinux/../nixos/iflx3jiw1sphfgbhicmhvlblaj9wrd-linux-6.18.8-mnt-reform-initrd
append: init=/nix/store/zbxx6crqlml6aj3k4qv9c26c85gs3662-nixos-smandy-25.11.20260316.48652e9/init no_console_suspend console=tty1 pcie_aspm=off loglevel=4 lsm=lxtlinux/../nixos/8dgsaypcz0cv3wd65vbnjcdzlx0wxmx3-linux-6.18.8-mnt-reform-dtbs/rockchip/rk3588-m## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
Working amdisk to ec22f000, end eceb05af ... OK
   Loading Device Tree to 00000000ec1fe000, end 00000000ec22OK
Working FDT set to ec1fe000
Starting kernel ...

(sorry, its a little choppy, my usb uart does not seem to work very reliably :see_no_evil_monkey: )

Soooo, does anyone have any idea what might have gone wrong? :sweat_smile: I am very happy for any input :slight_smile:

// EDIT:

By comparing kernel cmdlines with the default debian install, I noticed that the NixOS cmdline was missing console=ttyS2,1500000 and added it. Now I get output from the kernel and it seems to be unable to mount the NVME:

Starting kernel ...

[    0.681787] sdhci-dwcmshc fe2e0000.mmc: Can't reduce the clock below 52MHz in HS200/HS400 mod
<<< NixOS Stage 1 >>>

loading module btrfs...
loading module dm_mod...
running udev...
Starting systemd-udevd version 258.3
kbd_mode: KDSKBMODE: Inappropriate ioctl for device
Waiting 10 seconds for device /dev/disk/by-uuid/75a33dfb-bc3d-41.......... - failure
/dev/disk/by-uuid/75a33dfb-bc3d-4130-9472-1ae5870166
An error occurred in stage 1 of the boot process, which must mroot filesystem on `/mnt-root' and then start stage 2.  Press onowing keys:

  r) to reboot immediately
  *) to ignore the ernue

// EDIT 2:

I know have put the nvme module in boot.initrd.kernelModules. Now I just get a kernel panic after some time and there seems to be no output before that (or it does not really make it to the serial port, i dont know :sweat_smile: )

[    0.685834] sdhci-dwcmshc fe2e0000.mmc: Can't reduce the clock below 52MHz in HS200/HS400 mode
[   13.275044] Kernel panic - not syncing: Attempted to kill ini100
[   13.275721] CPU: 7 UID: 0 PID: 1 Comm: init Not tainted 6.18.8 #1-NixOS VOLUNTARY 
[   et Reform with RCORE RK3588 Module (DT)
[   13.276987] Call trace:
[   13.277202]  show_stack+p_stack_lvl+0x60/0x80
[   13.277857]  dump_stack+0x18/0x24
[   13.278150]  vpanic+0xf4/0x2f0
ume+0x0/0x70
[   13.278784]  do_exit+0x9e8/0x9f8
[   13.279073]  do_group_exit+0x3c/0xa0
[   +0x20/0x28
[   13.279776]  invoke_syscall+0x50/0x120
[   13.280107]  el0_svc_common.constprop.0_svc+0x24/0x38
[   13.280814]  el0_svc+0x3c/0x180
[   13.281097]  el0t_64_sync_handler+0xa0/0+0x198/0x1a0
[   13.281790] SMP: stopping secondary CPUs
[   13.282221] Kernel Offset: 0x4e8610000000
[   13.282753] PHYS_OFFSET: 0xfff1000000000000
[   13.283120] CPU features: 0x180000,0283624] Memory Limit: none
[   13.283898] ---[ end Kernel panic - not syncing: Attempted to kil