-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 over serial via syslinux is unecessarily fiddly #58198
Comments
My reading of the GRUB2 config suggests in GRUB2 the serial terminal isn't enabled by default: nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix Lines 311 to 317 in 2c07a08
What's the rationale for this, and does this apply for syslinux? |
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
The remaining step is step 2.
This is just a matter of copying the existing serial boot entry for GRUB ( https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/cd-dvd/iso-image.nix#L325-L330 ) and adapting it to be a boot entry for syslinux: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/cd-dvd/iso-image.nix#L120-L146 I'll do this when I have time to test it. |
This would be very useful to me, as I'm trying to install nixos via virt-install without vnc (headless, serial console). |
Actually, I think just spawning a getty on the serial console after boot would be fine for my use case. |
sneak@, if you're able to test #91086 that'd be much appreciated. It should make installation easier for you. |
Do you have an ISO I can download for that? Happy to test out. |
FYI I started a thread about this here: https://discourse.nixos.org/t/feature-request-spawn-getty-on-serial-console-in-installer-iso/9195/2 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/feature-request-spawn-getty-on-serial-console-in-installer-iso/9195/3 |
#91086 has instructions on building an ISO. See "I tested this change by building the image". |
FWIW, I think the installer already does this. You just have to sit through a blank Linux boot process. If the boot succeeds, getty should open on the serial console. If the boot fails, getty won't get chance and it's hard to diagnose the boot failure since the Linux boot doesn't write to the serial console (that's what #91086 aims to fix). |
Stage-1 doesn't support multiple consoles yet. #42255 was a first draft towards supporting this. "Just" adding I mean to eventually get back to this problem and properly implement tests for bootlogd, in use in Mobile NixOS. |
It does not. VNCing in and running The only output from the system via serial is:
...and that's it. |
Prior to this commit, installation over serial console would requiring manually having to modify the kernel modeline, as described in #58198 . This is unnecessarily fiddly, so this commit adds a syslinux boot entry that has serial enabled. GRUB already has a serial console entry: https://github.com/NixOS/nixpkgs/blob/2c07a0800a76be01a3c255f39e21877a9a389f84/nixos/modules/installer/cd-dvd/iso-image.nix#L311-L317 Why 115200 bps? This is already used in other places, e.g. #58196 I tested this change by building the image, booting the image, and observing the boot process over serial: $ cd nixos/ $ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix $ sudo cp /nix/store/arcl702c3z8xlndlvnfplq9yhixjvs9k-nixos-20.09pre-git-x86_64-linux.iso/iso/nixos-20.09pre-git-x86_64-linux.iso /dev/sdb $ picocom -b 115200 /dev/ttyUSB0
NixOS#58198 (cherry picked from commit 81e0471)
Installing nixos over serial via syslinux is fiddly, because:
38400115200 (fixed in #58196)stty
)In practice this means the user must either patch their image, or perform an installation while switching bitrates and adding serial terminals to kernel boot parameters.
We can make this smoother, by enabling serial on all stages, and ensuring they use the same bitrate.
console=tty0 console=ttyS0,115200
to all boot entries.The text was updated successfully, but these errors were encountered: