gchristensen changed the topic of #nixos-borg to: https://www.patreon.com/ofborg https://monitoring.nix.ci/dashboard/db/ofborg?refresh=10s&orgId=1&from=now-1h&to=now "I get to skip reviewing the PHP code and just wait until it is rewritten in something sane, like POSIX shell. || https://logs.nix.samueldr.com/nixos-borg
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nixos-borg
orivej has quit [Ping timeout: 246 seconds]
<Mic92_> uses rabbitmq some kind of clustering?
<Mic92_> s/clustering/service discovering/
orivej has joined #nixos-borg
FRidh has joined #nixos-borg
orivej has quit [Ping timeout: 264 seconds]
FRidh has quit [Quit: Konversation terminated!]
<samueldr> gchristensen: (sharing here since it's quiet) try serial_efi0 instead of serial... I'm testing it for the installer iso and uh, grub's documentation is a real mess
<samueldr> that is, serial_efi0 for terminal_input terminal_output
<Dezgeg> interesting, for me the efi serial has worked out-of-the-box on aarch64
<Dezgeg> maybe it's the lack of graphics though
<samueldr> that's where I found serial_efi0's existence
<samueldr> and maybe serial_com0
<samueldr> (and enabling both gfxterm and console is... a bad idea :), at least for qemu)
<Dezgeg> so grub is not smart enough to drive the same output to both serial console and display?
<samueldr> it is
<Dezgeg> is the size wrong then?
<samueldr> I meant the actual "console" and "gfxterm", which both use the video hardware
<samueldr> with qemu, it glitches a bit switching back and forth
<gchristensen> hmm so concretely this is what I have, https://gist.github.com/grahamc/06413dbf6e3f49cd35881fba69cc6066 what do you suggest?
<samueldr> grub may not be using the same sizes https://stuff.samueldr.com/screenshots/2018/05/20180513125728.png
<samueldr> terminal_output serial_efi0 serial_com0 console
<samueldr> terminal_input serial_efi0 serial_com0 console
<samueldr> (I'm testing it right now with qemu, soon will be pushing an update to my bootloader PR)
<Dezgeg> qemu + edk2 I guess?
<samueldr> yes
<samueldr> (I'm waiting for a disk image build with gfxterm + serial to show a screenshot)
<gchristensen> samueldr: shoul I change https://gist.github.com/grahamc/06413dbf6e3f49cd35881fba69cc6066 to serial_efi0 ...?
<gchristensen> oops
<gchristensen> serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
<samueldr> serial is an unknown command AFAICT
<samueldr> and --timeout=10 doesn't exist AFAICT
<samueldr> the documentation seems messy!
<samueldr> since grub literally told me it was unknown when I was setting it :)
<samueldr> ah, though, since then I added the module, which may have been missing
<samueldr> (you may already have it)
<gchristensen> samueldr: did you see the version of the config known to work?
<samueldr> yes, which has --timeout=10, weirdly enough
<samueldr> I don't know which version of grub "2" it uses
<gchristensen> grub-install (GRUB) 2.02~beta3-4ubuntu7
<samueldr> that's with qemu + edk2
<samueldr> serial isn't an output terminal :/
orivej has joined #nixos-borg
<gchristensen> I think I read serial is a generic way to do serial_<...>
<samueldr> that's what it seems to describe
<samueldr> but, there's a disconnect in the documentation, with the actual grub configuration files (what we're looking at) and the other kind of configuration which generates the actual configurations
<samueldr> (when implementing the PR I found loads of documentation that didn't match)
<Dezgeg> maybe some people try to put GRUB 1 stuff in GRUB 2 config files just in case? :P
<samueldr> I'm trying to look at the ubuntu patches for grub
<gchristensen> since this config works with grub2, so I'm going to assume it isn't grub1
<Dezgeg> did you try commenting out the nixos boilerplate yet?
<samueldr> right, you have gfxterm stuff there, I found out that as soon as gfxterm is used, serial won't work
<samueldr> even though terminal_output console works with serial :/
<gchristensen> I haven't yet, because I haven't had the heart to fetch andpatch nixpkgs on that box, yet :P I'll do that next
<samueldr> maybe just adding `terminal_output console`
* samueldr doesn't know how long it actually takes for your development cycle
<gchristensen> oh not that long ... just haven't.
<gchristensen> 5-10min to test something
<samueldr> the thing is terminal_output can take multiple outputs, but it *replaces* the currently used outputs
<samueldr> but... if there is an error (e.g. using a name that isn't availble) it seems to do nothing, except print an error...
<samueldr> ... where you wouldn't see it if you don't already have serial
<samueldr> that's from observations I just made
<samueldr> disk full! time to garbage collect
<Dezgeg> the fedora aarch64 installer in QEMU + U-Boot's EFI implementation does just a bunch of insmods but then automatically figures out to use the serial console
<gchristensen> ah ha!
<Dezgeg> heh, Active output terminals: console Available output terminals: gfxterm
<samueldr> console or serial_??? ?
<samueldr> yeah, Dezgeg, with testing it seems that console will always output serial properly :/
<samueldr> which is a bother if gfxterm was wanted
<samueldr> use `c`, then terminal_output at the command line
<samueldr> it'll print out the available ones
<samueldr> (I'm curious to see if serial will be in there)
<gchristensen> ok I'm bisecting my changes to see what did it
<Dezgeg> I doubt the gxfmode at least :P
<gchristensen> how about `rmmod pngg` :D
<samueldr> I'm 99% confident that `terminal_output gfxterm` causes issues
<gchristensen> grub> terminal_output
<gchristensen> Active output terminals:
<gchristensen> console serial
<gchristensen> Available output terminals:
<gchristensen> gfxterm serial_efi1 serial_efi0 serial_com1 serial_com0 spkmodem cbmemc audio
<samueldr> grub! where implementation sometimes doesn't matche reality!
<gchristensen> backspace doesn't really work here
<samueldr> I swear the moment I add `serial` to terminal_output, stuff stops working :(
<Dezgeg> how about just 'console' ?
<samueldr> works fine
<Dezgeg> I wonder what's the difference between them
<samueldr> I wonder *what* adds the `serial` terminal
<samueldr> that's related to this PR, Dezgeg https://github.com/NixOS/nixpkgs/pull/33686
<Dezgeg> aha, 'console' is some alias to the efi console protocol
<samueldr> I'd hope to get a reliable serial with `gfxterm`, without resorting to guessing serial console names
<samueldr> because gfxterm + console causes these kind of issues: https://stuff.samueldr.com/screenshots/2018/05/20180513132846.png
<samueldr> (at least for qemu, wouldn't be surprised to see similar effects on hardware)
<Dezgeg> right, I suppose that's the EFI console driver drawing to the same framebuffer
<gchristensen> I don't think gfxmode is being loaded?
<samueldr> I suppose too
<gchristensen> haha ok so the boilerplate isn't messing this up at all. maybe just the --timeout was breaking it?
<samueldr> maybe
<andi-> or at least sufficiently pretend to implement that..
<andi-> err wrong channel m(
<gchristensen> I mean its relevant
<gchristensen> ok I broke the config again
<samueldr> I need to find which module adds `serial`, with grub-install'ed grub from nixos, on hardware, I have the `serial` terminal available
<gchristensen> when it was just these, it is broken: grub> terminal_output
<gchristensen> Active output terminals:
<gchristensen> console serial
<gchristensen> Available output terminals:
<gchristensen> gfxterm serial_efi1 serial_efi0 serial_com1 serial_com0 spkmodem cbmemc audio
<gchristensen> oops
<gchristensen> serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
<gchristensen> terminal serial console
<Dezgeg> is everything getting printed twice perhaps?
<gchristensen> no, it shows "WELCOME TO GRUB" then nothing after
<samueldr> gchristensen: that's what I get when gfxterm is running without serial_efi0
<samueldr> what's weird: my coreboot+uefi laptop shows `serial` in the available terminal_* but when I use it "error: terminal `serial` isn't found."
<gchristensen> ok one more try and I think I'll know the minimal config needed
<samueldr> I'm definitely interested, I hope to be able to have serial+grub2 for the iso
<gchristensen> blahh I rebooted before running nixos-rebuild boot
<Dezgeg> heh, opensuse x86 installer has this comment # On EFI systems we can only have graphics *or* serial, so allow the user # to switch between the two hiddenentry 'Text mode' --hotkey 't' { ...
<samueldr> hmm
<samueldr> that may be a clean enough solution
<samueldr> switch to console, which automatically handles serial stuff
<gchristensen> serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
<gchristensen> terminal_output serial console
<samueldr> Dezgeg: link to their repo / source control for that?
<gchristensen> terminal_input serial console
<gchristensen> that is all it takes, it seems
<Dezgeg> I don't know the link to there, I just downloaded the image
<gchristensen> thank you all for the help and ideas :D
<samueldr> ah! I see, without the first call to `serial`, serial can't be used even though it's listed
<samueldr> Dezgeg: ah, I see
<gchristensen> the next release of the Packet images will be way better than the first :D
<samueldr> oh, thanks!
<samueldr> (I like how on nixpkgs everything is in nixpkgs, making it trivial to find such configuration files)
<Dezgeg> yeah, tell me about it, I wanted to PR some change to openSUSE cloud images... finding that was pain since google didn't index the source code
<samueldr> yeah, I searched for the comment on google and found only references to how opensuse has that feature
<samueldr> thanks gchristensen! setting `serial` beforehand makes serial + gfxterm work
<gchristensen> is there a nice system for testing Os installs to physical machines go properly?
<gchristensen> nice
<gchristensen> testing all this on ~12 instance types is tedious at best
<Dezgeg> the opensuse config doesn't mention serial at all, though
<samueldr> oh, but if it's console, console implies serial it seems
<samueldr> I say *it seems*
<Dezgeg> according to sources, "console" is the efi console protocol output
<Dezgeg> which probably is different than efi serial protocol output
<samueldr> so I'm guessing it's implicit with qemu because their efi console outputs to the serial output?
<samueldr> once my serial stuff arrives, I'll be able to test on hardware :/
<Dezgeg> no, opensuse does 'terminal_output console' and once I press 't' the same text-mode stuff is shown on both views of QEMU
<gchristensen> I think I might test this stuff with an expect script. will I regret this?
<Dezgeg> I doubt it handles these terminal escape codes
<samueldr> Dezgeg: ah, that's what I meant, that console goes both to graphical output (screen) and serial, right?
<Dezgeg> yes
<samueldr> that's good enough for most uses I guess
<Dezgeg> yeah, you lose the background pictures and fonts though
<samueldr> that's expected!
<Dezgeg> I wonder how that looks on a 4k screen?
<samueldr> must depend on the efi implementation
<samueldr> probably better than using the default gfxterm which always uses pixels
<samueldr> or at least, not worse
<Dezgeg> u-boot supports truetype fonts at least, IIRC :P
<samueldr> with gfxterm, when *using a theme*, grub has better fonts support
* samueldr sighs
<Dezgeg> I guess it's not too bad to do this echo "Please press 't' to show the boot menu on this console" thing?
<samueldr> I wonder how hard u-boot would be to use on "intel" pcs
<samueldr> Dezgeg: that's what I'm looking into
<Dezgeg> hard, I believe you use it as a bios replacement
<samueldr> oh
<samueldr> so it can't be used as an EFI bootloader?
<samueldr> because it seems grub is messing itself up with terminal_output :/
<samueldr> when using gfxterm + serial, re-setting it for a submenu (which is required) makes grub think gfxterm isn't available
<samueldr> though it works!
<samueldr> it stop you with an error message... and then works
<Dezgeg> would the plan be to keep using ISOLINUX for legacy boot?
orivej has quit [Ping timeout: 264 seconds]
<samueldr> it already is
<samueldr> it works, it's themeable
<samueldr> frankly, if it was useable for efi, it would have been syslinux too!
<Dezgeg> yeah grub's documentation is just nonexistent
<samueldr> I had to dive into the source too many times
<samueldr> at least using a patched bootloader with nixos for the iso was trivial
<samueldr> hah! got it, terminal_input gfxterm doesn't exist (obviously?) which is what was actually causing my issue
<samueldr> Dezgeg: you're knowledgeable with those things, I'm assuming `serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1` is sane enough as a default, would I be right?
<Dezgeg> yeah I think that's what most places use
<Dezgeg> but do you actually need to do that?
<samueldr> hmm, what would `serial` without parameters do... trying + looking into that
<Dezgeg> apparently those are the EFI default
<gchristensen> Dezgeg: expect seemed to work okay, actually!
<samueldr> yay, serial without parameters works with qemu
<samueldr> (and source makes me think it would work in any cases)
<gchristensen> expect is working really well actually
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos-borg
<infinisil> gchristensen: Not sure how everything works, but samueldr said he changed it so that the bot wouldn't spam 2-4 messages for every merged PR, can you deploy those? (I don't have the full picture, but I thought I'd ask)
<samueldr> :) I'm too polite, I was waiting a bit to notify him again
<infinisil> Heh :P
<samueldr> I've seen how busy the packet / borg deployment stuff makes him right now
<gchristensen> thanks :) I'm hoping to get that deployed tonight
<gchristensen> it doesn't take much, but I'm on a race against the clock
infinisil has quit [Quit: Configuring ZNC, sorry for the join/quits!]
infinisil has joined #nixos-borg
orivej has joined #nixos-borg
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nixos-borg