NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.05k stars 14.08k forks source link

RD image overlaps OS image #295660

Closed Martin1887 closed 2 weeks ago

Martin1887 commented 7 months ago

Describe the bug

In a Pinebook Pro using the SD image instead of nixos-install and TowBoot, as recommended in the documentation, modifying the kernel or the kernel parameters produces a generation that fails to boot with the obscure message 'RD image overlaps OS image'.

Steps To Reproduce

  1. Create a new configuration that modifies the boot.kernelPackages attribute.
  2. sudo nixos-rebuild switch.
  3. sudo reboot.
  4. Select the last generation in the boot entry.
  5. The last generation cannot be booted, with the message RD image overlays OS image, and the previous generation is booted instead.

Expected behavior

The last generation is booted after selecting it after the reboot.

Screenshots

N/A.

Additional context

I think the problem is modifying the kernel or kernel parameters in the SD image, but I'm not sure. The problem could also be specific of Pinebook Pro, but I think it is a problem of using a SD image instead of nixos-install. This problem should be mentioned in the documentation if not solved, and probably recommending using nixos-install with detailed instructions instead of using the SD image for a serious usage.


Add a :+1: reaction to issues you find important.

w1kee commented 7 months ago

it's not "overlays" but "overlaps"

w1kee commented 7 months ago

have you got any updates? i am facing the same error message.

Martin1887 commented 7 months ago

Thanks for the correction. I couldn't fix it anyway.

The single solution for me was not modifying the kernel package with parameters, nor using another kernel package (from unstable, nixos-hardware, etc.).

Note however than updates over the default kernel package work well.

w1kee commented 7 months ago

this issue started when i updated my os configuration flake, which updated the kernel version from 6.6.21 i think to 6.6.25. i set boot.kernelPackages to a lower kernel version and the issue doesn't appear anymore for me.

9R commented 3 months ago

This also affects the currently available sd-card images. I tried to boot the 24.05 and the unstable LTS and both failed. So it is not possible to install NixOS with a current SDcard image on a PinebookPro at the moment.

fpletz commented 3 months ago

Try upgrading Tow-Boot to the most recent version https://github.com/Tow-Boot/Tow-Boot/releases/tag/release-2023.07-007 which includes https://github.com/Tow-Boot/U-Boot/pull/3. This may fix the issue.

Alternatively, I've been booting my Pinebook Pro with EFI successfully. Tow-Boot does support EFI out of the box and installing GRUB or systemd-boot on an EFI System Partition just works. I've also used https://github.com/NixOS/nixpkgs/pull/324419 and https://github.com/fpletz/nixpkgs/commit/190fcc5a73dc6295e4ac701ef1ee4b5928e80754 to get a compressed linux kernel that supports EFI.

9R commented 3 months ago

I can confirm switching to latest tow-boot resolved the issue for me.

miniBill commented 2 weeks ago

Yupp, switching works, this can probably be closed.

nixos-discourse commented 5 days ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-on-rock64pro/50514/13