Problems booting on Raspberry Pi 3b+

Here’s what I’m doing:

  1. Download the 22.11 image from https://nixos.wiki/wiki/NixOS_on_ARM#Installationhttps://hydra.nixos.org/job/nixos/release-22.11/nixos.sd_image.aarch64-linux. Got the file nixos-sd-image-22.11.1991.36a81812f29-aarch64-linux.img.zst.
  2. Uncompressing:
➜  ~ unzstd -d nixos-sd-image-22.11.1991.36a81812f29-aarch64-linux.img.zst
nixos-sd-image-22.11.1991.36a81812f29-aarch64-linux.img.zst: 2897481728 bytes
➜  ~ ll nixos-sd-image-22.11.1991.36a81812f29-aarch64-linux.img
Permissions Size User  Date Modified Name
.rw-r--r--  2.9G stian 25 Jan 19:54  nixos-sd-image-22.11.1991.36a81812f29-aarch64-linux.img
  1. Formatting:
➜  raspberrypi git:(main) ✗ nix-shell -p parted

[nix-shell:~]$ date && sudo parted /dev/mmcblk0 --script -- mklabel msdos && sudo parted /dev/mmcblk0 --script -- mkpart primary fat32 1MiB 100% && sudo mkfs.vfat -F32 /dev/mmcblk0p1 && sudo parted /dev/mmcblk0 --script print && date
Wed Jan 25 08:26:28 PM CET 2023
mkfs.fat 4.2 (2021-01-31)
Model: SD SD64G (sd/mmc)
Disk /dev/mmcblk0: 63.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  63.9GB  63.9GB  primary  fat32        lba

Wed Jan 25 08:26:32 PM CET 2023
  1. Transferring:
➜  ~ date; sudo dd if=/home/stian/nixos-sd-image-22.11.1991.36a81812f29-aarch64-linux.img of=/dev/mmcblk0 bs=4M conv=fsync status=progress; date;
Wed Jan 25 08:27:06 PM CET 2023
2730491904 bytes (2.7 GB, 2.5 GiB) copied, 1 s, 2.7 GB/s2897481728 bytes (2.9 GB, 2.7 GiB) copied, 1.07606 s, 2.7 GB/s
690+1 records in
690+1 records out
2897481728 bytes (2.9 GB, 2.7 GiB) copied, 115.693 s, 25.0 MB/s
690+1 records in
690+1 records out
2897481728 bytes (2.9 GB, 2.7 GiB) copied, 115.973 s, 25.0 MB/s
Wed Jan 25 08:29:02 PM CET 2023

When I put this into my raspberry pi and boot it up, I first get to select the generation, then I see a bunch of text pass by, and then the screen goes black. The raspberry seems to be on still, but nothing shows on the screen. I have a video of what it looks like that I’ll share if I find somewhere to upload it to.

Question 1: Am I doing anthing wrong above? Should this work?
Question 2: Any tips for how to share that video of what the boot looks like?

I also tried the “unstable (LTS kernel)” (nixos-sd-image-23.05pre446903.f203bcdff14-aarch64-linux.img) and “unstable (Latest kernel)” (nixos-sd-image-23.05pre446903.f203bcdff14-aarch64-linux (1).img) images. The former gave a similar result, while the latter also got to the black screen but did it faster.

I’ve just started with Nixos on the Pi, so very noob. But here are some thoughts…

The parted command I don’t fully understand but it looks like there is just one FAT formatted partition…I’m used to having a boot partition and a root partition but I can’t say yours is “wrong”.

I’m using ZFS, and this caught my eye when I was exploring the build:

which looks like your issue maybe.
I copied images like yours onto a USB disk, and some new and old ones didn’t seem to boot at all - I ended up with the 22.11 small which seemed to work. Perhaps some are more fragile than others?
Hope that gibes some food for thought - if not apologies for the rabbit hole!

1 Like

Thanks for responding! I’m not 100% sure, but I think that parted-command is correct. I have another pi running with nixos, and the sd card image I downloaded back then (21.11.337975.eabc3821918) still works. I think there may be a difference in between that version and the current version that causes this not to work.

1 Like