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

installation not working when device is not named /dev/nvme* #21

Closed
TonyBostonTB opened this issue Nov 5, 2023 · 15 comments
Closed

installation not working when device is not named /dev/nvme* #21

TonyBostonTB opened this issue Nov 5, 2023 · 15 comments

Comments

@TonyBostonTB
Copy link

TonyBostonTB commented Nov 5, 2023

My disk's name is sda but the installer doesn't recognize it

...
+ sgdisk --set-alignment=2048 --align-end --new=1:0:+100M --change-name=1:disk-vdb-ESP --typecode=1:EF00 /dev/nvme0n1
Problem opening /dev/nvme0n1 for reading! Error is 2.
The specified file does not exist!


@dustinlyons
Copy link
Owner

Sorry about that, I'll get a patch out shortly.

@dustinlyons
Copy link
Owner

dustinlyons commented Nov 6, 2023

Okay, I've made this change:

  • During bin/apply, you'll get asked to choose the installation disk. We also now give you a warning that the disk will be reformatted.

I haven't had time to test it, however, I think it's correct. If you want to give it a try, just follow the steps as you did before and run bin/apply. If there are any errors, they are likely syntactical, as I didn't introduce anything new or novel. This means I can quickly fix them, or the bin/apply script may require minor edits on your end.

Essentially, we need the correct device name in the nixos/disk-config.nix file. The bin/apply script assists in doing that by replacing the token %DISK% found inside nixos/disk-config.nix with the user's input.

Let me know how it goes.

Thank you!

@TonyBostonTB
Copy link
Author

Since I have to issue following command
sudo nix run --extra-experimental-features 'nix-command flakes' github:dustinlyons/nixos-config#installWithSecrets
I do get an error where the installer doesn't find "/dev/%DISK%" of course
I do not get to a point where I may issue "bin/apply

@dustinlyons
Copy link
Owner

dustinlyons commented Nov 7, 2023

Okay, sorry about that. I was confusing myself with the Mac installation. The bin/apply actually runs as part of the installWithSecrets nix-command. But that was broken now that the %DISK% token was introduced, so I just released a patch. To test, I'm currently building a new VM by just running

sudo nix run --extra-experimental-features 'nix-command flakes' github:dustinlyons/nixos-config#install

So can you try again?

@TonyBostonTB
Copy link
Author

Cool! Moving forward with this.
Now the next issue is that, if running the setup with keys, one would not have a chance to set an own github repo for nix-secrets. It's always trying to use your own repo.

As a sidenote: As far as I understand, you'll have to put your SSH Keys in the ROOT USers $HOME as you running sudo iwht the install command, correct?

@dustinlyons
Copy link
Owner

dustinlyons commented Nov 7, 2023

Yes, check out these steps here: https://github.com/dustinlyons/nixos-config#2-optional-setup-secrets

To use secrets, you need to have created this repo beforehand. The repo can be empty just needs to exist.

There are helper commands that give you a few options to bring your keys in. Let me know if you need any clarification on the README steps.

@TonyBostonTB
Copy link
Author

TonyBostonTB commented Nov 7, 2023

Sure I did that setup and brought my own keys, but if I run the install command, it tries to use your repo for the secrets

error: unable to download https://api.github.com/repos/dustinlyons/nix-secrets/commits/main*: HTTP errar
• 404
response body:
"message": "Not Found"
"documentation_url": "https://docs.github.com/rest/commits/commits#get-a-commit"
(use
*--show-trace' to show detailed location information)
configuration file /mnt/etc/nixos/configuration.nix doesn't exist

@dustinlyons
Copy link
Owner

Oh, understood! Let me patch that shortly :) I'll add that to the installation.

@TonyBostonTB
Copy link
Author

Maybe asking for the correct repo in the setup would be sufficient

@dustinlyons
Copy link
Owner

dustinlyons commented Nov 7, 2023

Yeah, then I can just sed/replace another token as part of install before using the flake. I can get it out within the next couple hours, gotta do some work stuff first.

@dustinlyons
Copy link
Owner

Can you try now?

@TonyBostonTB
Copy link
Author

TonyBostonTB commented Nov 8, 2023

Awesome. Installation went fine. Only thing after reboot, my user password didn't work. Had to set it again with the root user. And thanks for the quick support here, much appreciated!

@dustinlyons
Copy link
Owner

@TonyBostonTB Awesome, great to hear! Yeah, when you enter your password during installation that's actually for root. User pass isn't set during installation. I need to find a proper way to either have a default password or let the user set it.

What else would be helpful for first-time usage? Anything you're finding confusing/hard to use?

I probably need to add the default key bindings to the README and how to change them.

@TonyBostonTB
Copy link
Author

TonyBostonTB commented Nov 8, 2023

Actually after the first reboot, nothing really works. I get a huge segfault list with failed files and did stop for now to further investigate. :(
If somebody is interested, I might install again and get to all the errors in a new issue.

@dustinlyons
Copy link
Owner

Oh wow, okay. I've got it running on a VM and an x86 machine w/ UEFI at home, and this should be very reproducible, the whole point of Nix :). So something is going on. I'd love to see the errors you're getting if you have the time. Thanks for all the input so far.

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

2 participants