Comments (15)
Yeah, for OVH, don't even bother with the networking, just rip it out completely.
Change this:
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
$NIXOS_IMPORT
];
to this:
imports = [
./hardware-configuration.nix
$NIXOS_IMPORT
];
I just successfully installed doing that. Debian 9
from nixos-infect.
The network detection part of the script is not very robust and assumes digitalocean's idiosyncrasies. Likely , it didn't grab the right settings for your host. I'll probably improve it sometime in the future, but for now, try the following to manually provision your hosts:
(if you have console access to an already-provisioned host, do only step 5, instead using the ip info provided in the OVH web UI, and then nixos-rebuild switch
)
- copy over the nixos-infect script
- edit it
- comment out the last 4 lines (
makeSwap
toreboot
) - run
source nixos-infect; set +e
. This will generate the config files but not try to install everything yet. - edit /etc/nixos/networking.nix, correcting any obvious errors. Use commands
ip addr
,ip route
, andcat /etc/resolv.conf
to obtain any missing info. Probably remove eth1 entirely. - edit nixos-infect again, and uncomment the lines you commented
bash -x nixos-infect
Post me the networking.nix contents, if you still can't get it working.
from nixos-infect.
I should probably add a --no-networking
option that does this, or detect when the original system's network uses dhcp instead of manual config.
from nixos-infect.
Is this still an issue, since we do this?
from nixos-infect.
I'll try to check it out, then tell you if it's okay now.
from nixos-infect.
@asymmetric Yes, this is still an issue.
from nixos-infect.
I have big issues to make it run on master, does any of you (@asymmetric, @charlycoste, @kniteli ) would have a functioning version ? I could take care of piggy-backing on it to set up a PR for master to function on OVH.
from nixos-infect.
Don't use OVH, sorry.
from nixos-infect.
@TheSirC if you still need help, attach a .log here with the output after you set -x
and run the script (comment out the reboot), because I have no detail on what your "big issues" are.
from nixos-infect.
@elitak Yes, of course. Here is the error-log :
Error log
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 11.4978 s, 93.4 MB/s
swapon: /tmp/nixos-infect.rbzUv.swp: found swap signature: version 1d, page-size 4, same byte order
swapon: /tmp/nixos-infect.rbzUv.swp: pagesize=4096, swapsize=1073741824, devsize=1073741824
The problem lies in the fact that even with reboot
command on the system does not reboot and the instance is not provided with usual NixOS commands (nix-env
, nixos-rebuild
, etc).
I "bisected" that execution arrive to the makeConf
function and just "don't execute it" (I can not find any trace of the commands in there leaving any traces on the system). The script exits with error code 1.
from nixos-infect.
Run set -x
, before you run the script, for more detail; that should get you the exact line that fails.
from nixos-infect.
I actually added it to the script itself without further output.
I added to the interactive session with this output :
root@address:~# ./nixos-infect
+ ./nixos-infect
And immediately returning to the interactive prompt.
from nixos-infect.
After further testing (and multiple reinstalls of the VPS to make sure to work on a clean system each time) I found that :
- the script is stopping here, on the grep part; running the command myself sends back an empty string, totally normal the file is empty but does exist ! (that is considered as a fail for grep: it sends back error code 1).
- Here the script does not include a refresh of the packages list (e.g.
apt-get update
) which can make it fail.
Fun fact :
The following commands do not produce the same output and I really would like to know why :
bash -x script
(<-- I ran this one to have output on the script)- adding
set -x
to the script after the shebang - doing
set -x
in your interactive prompt and then running./script
from nixos-infect.
So after applying patches for the above-cited issues I opened a pull-request that worked for me on OVH.
from nixos-infect.
Resolved since 3 years....
Anyway i've similar problem on different budget provider. It's kinda weird -> vps does respond to ping but seems that it have all ports closed. Any ideas what's the problem?
Anyway if i've enought time, i'll try do step by step what this script does and play a little with config. Maybe #61 is the solution?
from nixos-infect.
Related Issues (20)
- Report for GCE T2A Ampere arm64 aarch64 instance HOT 1
- Fails at /nix/var/nix/profiles/system/bin/switch-to-configuration boot HOT 1
- The authorized-keys migrator does not correctly handle sk-variant ssh keys HOT 1
- Allow to modify /boot partition or give a warning when the /boot partition is small
- Does NOT work on DigitalOcean Droplet with Ubuntu 22.04 without `export doNetConf=y` HOT 4
- Intermittent 'ERROR: Missing bzcat' error
- nixos-infect crashes with a nix syntax error on scaleway instances
- Trimming SSH lines removes spaces from them HOT 1
- Hetzner Cloud IPv6 not working HOT 2
- wishlist: disk encryption HOT 2
- New lightsail instance use /dev/nvme0n1 instead of /dev/xvda as boot device HOT 1
- Does not work for Hetznercloud using cloud config HOT 1
- nixos-infect on Ionos HOT 3
- Tested on arubacloud: working with `doNetConf=y`
- nix-env errors about using a symlink path HOT 3
- No space left on device on nixos-rebuild HOT 2
- SSH key extraction doesn't work with ssh-import-id
- DigitalOcean: `rm: cannot remove '/boot/efi': Device or resource busy` HOT 4
- (Security/Privacy) Stop supporting Vultur, i.e. remove it from the readme HOT 1
- cannot find name for group ID 30000 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixos-infect.