tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
756 stars 76 forks source link

Installer fails to load #23

Closed malte-v closed 1 year ago

malte-v commented 1 year ago

Hi, I'm having some trouble trying to get U-Boot to boot the installer ISO I flashed to my thumb drive. When the USB drive containing the installer is plugged in, my MacBook powers off after the U-Boot screen and boots back into U-Boot, resulting in a boot loop. When the USB drive is not plugged in, U-Boot just complains that there's no drive to boot from (obviously).

Hardware: 2022 MacBook Air w/ M2 SoC

Things I've tried so far:

I do realize that it's hard to pinpoint any issue from the little information I've given, but maybe you could help me gather some more debug output :) Thanks anyway for the work you're putting into this project!

shayne commented 1 year ago

Were you able to install and boot the official Asahi Linux distro?

malte-v commented 1 year ago

Yes, that worked flawlessly.

shayne commented 1 year ago

Using latest iso? Maybe try an older one ln case there was a recent regression?

https://github.com/tpwrules/nixos-m1/releases/tag/release-2022-08-05

malte-v commented 1 year ago

I've tried the two most recent ones, same issue.

pingiun commented 1 year ago

I am having the same issue, and took a video to see if there are any useful messages. This is the last message I see before the machine reboots:

IMG_B7337FDB2BE4-1

I'm using a M1 Macbook pro

pingiun commented 1 year ago

I was thinking it could just be my usb drive that's faulty, so I wanted to buy a new one. Would a usb-c pendrive work too? The instructions say to use a usb c to A adapter but it doesn't say why

shayne commented 1 year ago

I personally used this (C end) https://www.amazon.com/PNY-Type-C-Drive-130MB-P-FD64GOTGSLTC-GE/dp/B07CTXDQKN

tpwrules commented 1 year ago

There's no specific reason not to use a USB-C drive, I just don't own any.

If you've just installed the Asahi distro using the official installer and are getting this reset without typing the commands into U-Boot to boot from the flash drive, then there is either a problem with janky firmware in your flash drive in particular or a problem with the installed version of U-Boot. No code I built or can control is running at this point.

I asked around on the IRC and was told there might have been a USB-C specific drive issue though and the U-Boot installed by the installer is still broken. Before you spend money, try booting into the Asahi distro and do a full upgrade (pacman -Syu I am led to believe) and reboot a couple times. This should replace the broken U-Boot with the latest version. Once NixOS is installed, it will take over managing U-Boot's version.

pingiun commented 1 year ago

I did buy a new usb drive, which fixed this issue for me. I think my previous usb A drive was just faulty and old. I bought a new USB C samsung drive

malte-v commented 1 year ago

I performed a full system upgrade on the official Asahi Arch distribution and used a different thumb drive at the same time, and one of these two did the trick. Thanks!

jacobgreenleaf commented 1 year ago

Note that SD card readers might not work, at least it did not work for me with my particular SD card reader, even though U-Boot appears to in at least some circumstances support SD card readers (so it may be m1n1 or a missing driver or something). Switching to a USB flash drive instead allowed me to boot the NixOS installer.