Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install 22.11 ARM image to Pinebook Pro #14

Open
ahoneybun opened this issue Dec 5, 2022 · 14 comments
Open

Unable to install 22.11 ARM image to Pinebook Pro #14

ahoneybun opened this issue Dec 5, 2022 · 14 comments

Comments

@ahoneybun
Copy link

Hello!

I tried to install the 22.11 ARM image to my Pinebook Pro but it looks like bootctl is failing to install the bootloader. I have logs which I'll link below and attach as well.

http://termbin.com/6lc8

nixos-22.11-PBP-failed_install.txt

@vlinkz
Copy link
Member

vlinkz commented Dec 6, 2022

Relevant section seems to be the end:

installing the boot loader...
setting up /etc...
/etc/tmpfiles.d/journal-nocow.conf:26: Failed to resolve specifier: uninitialized /etc detected, skipping
All rules containing unresolvable specifiers will be skipped.
Initializing machine ID from random generator.
Created "/boot/efi/EFI".
Created "/boot/efi/EFI/systemd".
Created "/boot/efi/EFI/BOOT".
Created "/boot/efi/loader".
Created "/boot/efi/loader/entries".
Created "/boot/efi/EFI/Linux".
Copied "/nix/store/ing1j8p8snkav9bz3i76d0gcv9lz14jl-systemd-251.7/lib/systemd/boot/efi/systemd-bootaa64.efi" to "/boot/efi/EFI/systemd/systemd-bootaa64.efi".
Copied "/nix/store/ing1j8p8snkav9bz3i76d0gcv9lz14jl-systemd-251.7/lib/systemd/boot/efi/systemd-bootaa64.efi" to "/boot/efi/EFI/BOOT/BOOTAA64.EFI".
Random seed file /boot/efi/loader/random-seed successfully written (32 bytes).
Failed to write 'LoaderSystemToken' EFI variable: Read-only file system
Traceback (most recent call last):
  File "/nix/store/n2wzq0a0h0vl2jdiixmfbicjnxxqwb06-systemd-boot", line 315, in <module>
    main()
  File "/nix/store/n2wzq0a0h0vl2jdiixmfbicjnxxqwb06-systemd-boot", line 243, in main
    subprocess.check_call(["/nix/store/ing1j8p8snkav9bz3i76d0gcv9lz14jl-systemd-251.7/bin/bootctl", "--esp-path=/boot/efi"] + flags + ["install"])
  File "/nix/store/fyz2jal0ircpdlplcrn25ki5r826lrdp-python3-3.10.8/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/ing1j8p8snkav9bz3i76d0gcv9lz14jl-systemd-251.7/bin/bootctl', '--esp-path=/boot/efi', 'install']' returned non-zero exit status 1.

I don't have an ARM device to test on myself. Maybe @mweinelt or @Thra11 knows something?

@ahoneybun
Copy link
Author

I'm not 100% sure if this is the installer or something else as I haven't been able to get GRUB to install as well but I don't know if it is my configuration or what. If it helps I'll list my own installer and my configuration.nix:

Installer: https://gitlab.com/ahoneybun/nyxi-installer/-/tree/main-pbp
Configuration: https://gitlab.com/ahoneybun/nix-configs/-/blob/main/systems/pbp.nix

@mweinelt
Copy link
Member

mweinelt commented Dec 6, 2022

Failed to write 'LoaderSystemToken' EFI variable: Read-only file system

That likely means EFI vars are not writable. Maybe try boot.loader.efi.canTouchEfiVariables = false;.

@ahoneybun
Copy link
Author

At least for my setup that doesn't allow GRUB to install though that might be a different issue altogether. It tries to update GRUB 2 menu but then gives me this:

Die at /nix/store/...-install-grub.pl line 608

So I think it might be a different issue.

@mweinelt
Copy link
Member

mweinelt commented Dec 6, 2022

How does your partitioning look like? Do you have an EF00 partition?

@ahoneybun
Copy link
Author

How do I check that? I did make the boot partition FAT32 and marked it as an ESP partition.

@mweinelt
Copy link
Member

mweinelt commented Dec 6, 2022

That doesn't sound wrong. A command to print the partition table would be parted /dev/sdX print.

@ahoneybun
Copy link
Author

So parted isn't included in my install and I can't finish due to the issue with GRUB. This is how I partitioned it:

(
echo g # Create new GPT partition table
echo n # Create new partition (for EFI).
echo # Set default partition number.
echo # Set default first sector.
echo +1G # Set +1G as last sector.
echo n # Create new partition (for root).
echo # Set default partition number.
echo # Set default first sector.
echo # Set default last sector (rest of the disk).
echo t # Change partition type.
echo 1 # Pick first partition.
echo 1 # Change first partition to EFI system.
echo w # write changes.
) | sudo fdisk $driveName -w always -W always

@Thra11
Copy link
Member

Thra11 commented Dec 6, 2022

I've not tried calamares yet and I have minimal experience with EFI boot. @samueldr might have some ideas.

@samueldr
Copy link
Member

samueldr commented Dec 6, 2022

Haven't tried calamares, but following the standard UEFI install instructions from before calamares, and ensuring efivars aren't involved (notes in the UEFI section from the NixOS on ARM wiki section) should work.

I am using NixOS installed from the UEFI USB iso from around early 2021. I am using GRUB, with the suggested config from that previously and currently linked section.

@ahoneybun
Copy link
Author

So I was able to get my own installer to work (I see GRUB) but then it black screens, do you I still need your configuration and overlay @samueldr ?

@samueldr
Copy link
Member

samueldr commented Dec 6, 2022

In all cases, you might prefer using the latest kernel.

If you have LUKS enabled, you will need the appropriate drivers in stage-1 for the display. (Like on every system, but most are detected for you already).

So you don't need the whole shebang, just enough for it. This is more than enough most likely, and if you have some time to go through a lot of reboot cycles, can probably trim it down some:

If you don't have LUKS enabled, it should be able to go to stage-2 and thus load modules implicitly. So if it doesn't I don't really know what to say.

@samueldr
Copy link
Member

samueldr commented Dec 6, 2022

Oh, right, there is one caveat: if there is no console on the kernel cmdline, it's also plausible it's using serial out.

@ahoneybun
Copy link
Author

Looks like it doesn't like this layout:

https://gitlab.com/ahoneybun/nix-configs/-/blob/main/systems/pbp.nix

It's failing to built the init from the looks of it:

error: unable to make '/' private: Invalid argument

That error is right after trying to copy the path for the 6.0.11 kernel but it also happens with the default kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants