-
gwr
It boots from disk again, after a... zpool destroy; zpool create ... ; all to carve out some space...
-
jclulow
Wait is the slog for a second pool on other disks
-
gwr
yes
-
gwr
Boot, rpool, zil, are all on the NVMe device (small-ish SSD)
-
gwr
Spinning rust for (mostly) backups etc. Favoring low power and cost over perforance.
-
jclulow
Fair enough
-
gwr
Builds of illumos gate on the NVMe SSD are faster than my old system (down from about 1h30m to about 35m). And at less than half the power and in nearly complete silence.
-
jclulow
That's neat. What kind of CPU does it have?
-
gwr
The setup I wrote about on developers.
-
gwr
I think I figured out SoL. Looks like it's just the baud rate. needs to be 115200 starting in loader, staying that way into the OS ec.
-
gwr
I think I figured out SoL. Looks like it's just the baud rate. needs to be 115200 starting in loader, staying that way into the OS etc.
-
gwr
(Oh yeah, no typo corrections here:)
-
gwr
Could someone please write up how to arrange for a getty to run on all of: wscons, ttya, ttyb (regardless of which is the "console"). I think SmartOS did that.
-
gwr
Would be nice to have the service instances defined (at least) even if disabled by default.
-
gwr
emailed that.
-
jclulow
I replied to your mail
-
jbk
hrmm.. macOS still doesn't seem to handle the restart of smb/server too well :(
-
jbk
i had been testing my smb+mDNS stuff just with a VM on my home server.. but decided to build it and actually run my home server w/ it (serving SMB out of a zone).. and switched over from afp
-
jbk
aside from that, seems to work minus it only seems to check/advertise the time machine flag on startup.. so gotta fix that
-
nahamu
Does anyone who uses vanilla wireguard and experience reviewing bash have time to review
WireGuard/wireguard-tools #17/files ?
-
nahamu
I'm guessing there's a bug or two lurking in there.
-
gwr
FYI, @jbk, for time machine disks, I use the simple work around of "connect to server" in Finder first, after which the time machine "select disk..." button will offer to use what you mounted in Finder.
-
gwr
That method does not require mdns or bonjour or whatever for locating. That stuff is handy, but not absolutely necessary.
-
tsoome
jbk this would be neat.
-
tsoome
I have been using time machine on top of illumos smb for years now:)
-
jbk
yeah, this is just a 'quality of life' thing..
-
jbk
it's probably more useful for small/home use, but still just a nice bit of integration
-
jbk
Any SMB share on an illumos system can function as a Time Machine backup disk by explicitly providing the host/IP and name of the share in the client Time Machine configuration. This setting is purely informational to aid in discovery on a client system.
-
jbk
is what I put in the man page as part of the change
-
jbk
(obviously can be wordsmithed/changed once i throw it up for review)
-
jbk
I probably need to add a note if you're using netatalk that the tm option can interfere with it
-
jbk
i don't think there's a way to conditionally reject a mount option in the current share api
-
jbk
i.e. 'don't allow it to be set if netatalk is already advertising the adisk service'
-
jbk
tsoome: if you want to play with it (obviously w/ the usual 'work in process' caveats), there is a branch out there you can pull the changes
-
jbk
-
jbk
it's not squashed, but also just rebased if off master, and it's just a handful of commits
-
jbk
certainly any feedback you can give would be good
-
tsoome
oh, nice.
-
jbk
one thing I do still want to do based off my own testing on it so far is see if there is a conflict with the mDNS stuff, I think that could be logged better (and clearer)
-
gwr
My main concern the last time I saw an attempt at making the SMB server advertise shares on startup or share was about the flexibility of it. I'd like to see this use something like a configurable run script with some provide environment variables, perhaps similar to the tree map/unmap scripts.
-
gwr
In a similar vein, we could really use logon/logoff scripts for SMB. Windows has these...
-
jbk
i guess the question though is what sort of flexibility to you think is needed?
-
gwr
Enough so we don't have to "wire in" the publication mechanisms?
-
jbk
that sort of defeats the purpose then though
-
jbk
honestly trying to do stuff like that with scripts in my experience is clunkly and error prone
-
gwr
I'm not doing a deep technial dive in IRC. You can call me sometime about it, or write something up.
-
jbk
mDNS is a part of the OS, this is an opt-in integration
-
jbk
and it's not even up for review yet
-
jbk
(and something people have wanted enough to write pages to do it in a klunky/ad-hoc fashion)
-
jbk
this does it better, and more seamless
-
richlowe
lack of share discovery is among the things that has made my cifs-y life hard
-
richlowe
but it's not the major thing, which is windows being a pain in the ass.
-
richlowe
I've been vaguely disturbed that gwr holding my hand has been a necessary step in the last 3 times I used this stuff outside of a big enterprise environment though.
-
jbk
i had thought about something like svc.ipfd but for multicast -- a service's manifest could supply static info to advertise via mDNS when it's enabled
-
jbk
but not sure how much stuff is out there outside of smb/time machine that'd make use of it
-
richlowe
so if your concern is normal people, of which, technically, I am one, I think your best bet is to get a stock illumos system, and a stock win 10 home, win 10 pro, win 11 ..., and make that work smoothly from soup to nuts
-
jbk
and doesn't work well for information that's more dynamic in nature
-
richlowe
I think you're currently nuts, when the soup is awful too
-
jbk
well I can at least handle the soup (or do that later)
-
gwr
@tsoome around?
-
tsoome
yes
-
gwr
I've figured out some of what's going on with IPMI/BMC console redirection to COM2 (ttyb) on that AsRock X570D4U board.
-
tsoome
ou?
-
gwr
It turns out IPMI access (via ipmitool) works for access to ttyb (with the rate set correcty, meaning 115200)
-
richlowe
9600,8,n,1 for life
-
gwr
The surprise was that, unlike older systems I've used, the loader never prints anything on ttyb, nor does it appear sensitive to input.
-
gwr
Every board with IPMI to a com port I've seen used 115200. Sorry, @richlowe :)
-
tsoome
despite the console variable setting?
-
gwr
So, @tsoome, does that seem right that the loader only deals with the wscons?
-
gwr
I didn't change anything except ttyb-mode
-
tsoome
if you have OS running, you can: tr '\0' '\n' < /system/boot/environment | grep console
-
tsoome
and grep tty too
-
gwr
console=text, os_console=ttyb
-
tsoome
ok, that means, loader was only using console=text, and asked kernel to use ttyb
-
gwr
I changed console to ttyb in the loader menu.
-
tsoome
so first output (and input) should work on ttyb when kernel is sstarting
-
gwr
Right, that works. Again, on other systems, I could interact with the loader on any or all of text, ttyb
-
gwr
On this system, ttyb is inactive until the OS starts.
-
tsoome
but could you get 'grep tty' too
-
gwr
No appearance other than in os_console
-
tsoome
even no ttyb-mode ?
-
gwr
(and ttyb-mode)
-
tsoome
no ttya-mode?
-
gwr
That stuff is there.
-
gwr
Should console have a list of values, comma separated?
-
tsoome
comma or space
-
tsoome
I'm actually interested if ttyb-spcr-mode was set
-
gwr
tr '\0' '\n' < /system/boot/environment |grep ttyb
-
gwr
os_console=ttyb
-
gwr
ttyb-ignore-cd=true
-
gwr
ttyb-mode=115200,8,n,1,-
-
gwr
ttyb-pcidev=
-
gwr
ttyb-rts-dtr-off=false
-
tsoome
thats UEFI boot?
-
gwr
I think so. It boots from NVMe.
-
gwr
How can I tell for sure?
-
tsoome
in that environment should be efi-version
-
gwr
The setup menus for boot refer to UEFI
-
jclulow
gwr: I usually just do this for systems with a BMC and SOL:
gist.github.com/jclulow/b76a9f1add72d66f75f734042f22ceea
-
jclulow
Most boards I have used lately have also required: enabling serial redirection of the BIOS menu at all, and then making sure you disable redirection _after_ the BIOS menu so that it doesn't stomp on the serial port later
-
jclulow
They're all different, and basically shoddy, but that is generally what works (at least once you figure out whether it's tty[a-d])
-
gwr
I could not find any options about that for this BIOS.
-
jclulow
That is somewhat surprising
-
tsoome
ok, when you reboot, it would be interesting to get efi-show -g global -v ConOut (or ConOutDev). it seems, your system does not list serial port as part of ConOut...
-
tsoome
I assumed, the sol would add serial to console devices list...
-
jclulow
Perhaps the firmware is rubbish
-
jclulow
Well, more rubbish than usual, that is
-
jclulow
It is pretty strange for the system to have a SOL-capable BMC, though, and not be able to use it from the BIOS
-
tsoome
That is always a possibility.
-
tsoome
of course, it may be worth to check if there is an update.
-
jclulow
yeah
-
jclulow
which may make it better or worse!
-
tsoome
of course I can just add check for ACPI SPCR as we have in bios version.
-
jclulow
Can we have some mode where, if prodded, we just do I/O to the serial port directly
-
jclulow
I assume we used to do that for BIOS boot
-
tsoome
the mode should be set by firmware.
-
jclulow
Well, sure, but firmware is trash
-
gwr
OK, setting console="text,ttyb" works well.
-
jclulow
which is why the loader prompt doesn't work properly on about half the EFI systems I end up using
-
gwr
That lets me interact with the loader during boot.
-
jclulow
The OS works fine because we've deleted the firmware by then :P
-
jclulow
gwr: That's good
-
gwr
The firmware is AMI BIOS, which is pretty widely used. Don't know if it's trash or not. :)
-
jclulow
It definitely is
-
tsoome
if we detect serial port from ConOut, we should use the port settings. (in bios version, we get port settings from SPCR)
-
tsoome
there was actually "funny" bug, hyper-v arm version will hung the system if you attempt to change serial port speed with UEFI serialio api.
-
tsoome
(serial was used for console).
-
jclulow
-
jclulow
on this system there is an 80%+ chance that a keystroke will be randomly eaten
-
jclulow
so
-
jclulow
I don't think we should be trusting the firmware
-
tsoome
there you have serial + video
-
jclulow
sure, but I just want the serial console to work, like it does under grub
-
richlowe
jclulow: did anyone ever fix cscope, we didn't right?
-
jclulow
richlowe: err
-
jclulow
I mean probably not, but I also don't remember the specifics
-
richlowe
so that good cscope still found everything it should, and didn't get mangled by function pointers and random confusion.
-
tsoome
ConOutDev is list of all possible devices, but your ConOut has actually 2 serial port s and video...
-
richlowe
something about flex v. lex?
-
jclulow
oh, that thing
-
jclulow
with the lex
-
richlowe
all I know is I have cscope-fast which sucks, and cscope which sucks differently
-
richlowe
and an ever shortening tether
-
jclulow
yeah I think you found it was using some totally different hard coded set of ... whatever match rules, for different lexers?
-
richlowe
that is all I remember yeah. I thought one of us was going to try and do somtehing, but then everyone got busy
-
richlowe
but I held out a slim hope you fixed it angrily as part of being busy but forgot to tell me ):
-
jclulow
tsoome: Right but if I "set console=ttya" I expect it to work reliably and it does not
-
richlowe
everything seems to do it live, like LSP. Which is cool, but not the main use case
-
jclulow
EFI firmware is fundamentally untrustworthy, we need to be able to ignore whatever is wrong with it and just use the serial device
-
jbk
tsoome: (before I forget) is there an upstream for EFI guids + names in loader? or do we just add them as desired?
-
jbk
there's a few from the more recent UEFI standards that'd be nice to not have to look for by the GUID :)
-
tsoome
if you have patch, I can push it for FreeBSD
-
gwr
Looks like ttymon is doing 115200,p,7,1 rather than ...n,8,1. what's the right thing in ttydefs to fix that?
-
gwr
The ttydefs man page is not all that much help.
-
jclulow
How did you get there
-
jclulow
like, what configuration have you done so far
-
gwr
Rebooted, selecting ttyb as console
-
gwr
loader env has console="text,ttyb"
-
jclulow
Did you set os_console
-
gwr
Most of the time, I'll look at the KVM to see if it's crashed or something. Just when I'm actually debugging stuff or whatever, I'll boot with console=ttyb
-
jclulow
I would not do that
-
gwr
No. I let the loader do that based on the menu.
-
gwr
I'm not you :)
-
tsoome
ttymon should pick ttyb-mode if ttyb is used for console
-
jclulow
I know, but you're setting yourself up for pain haha
-
gwr
This all worked fine on other servers I've used.
-
gwr
One problem with "serial console all the time" (in typical lab environments) is that people see a black screen in the kvm and assume it's "dead".
-
jclulow
That's a people problem
-
tsoome
gwr what does ttyb-mode have in prtconf -v output?
-
jclulow
But if you can't fix the people, it would be pretty easy to have a startup service that does "echo the system is not dead do not reboot it >/dev/wscons" :P
-
jbk
echo "I feel happy! I feel happy" > /dev/wscons
-
jclulow
lol
-
gwr
Or run a getty :)
-
jclulow
Sure but you're then back to over-constrained territory if you want to sometimes use console=ttyb dynamically
-
gwr
prtconf doesnt
-
jclulow
as I outlined in the mail
-
gwr
prtconf doesn't show anything about the mode for ttyb
-
gwr
Oh, maybe I missed it the way I grepped the output.
-
tsoome
make sure you have -v
-
jclulow
you also need grep -A1 or whatever to get the ttyb it and the value
-
jclulow
*bit and
-
gwr
name='ttyb-mode' type=string items=1
-
gwr
value='115200,8,n,1,-'
-
tsoome
ok, so, your ttymon *should use 8 bit, not 7
-
jclulow
assuming you have the bits for illumos#14608
-
gwr
I'm not sure what happened, but now the SOL shows:
-
gwr
roc?co??ole?lo?i?:??
-
gwr
roc?co??ole?lo?i?:??
-
gwr
roc?co??ole?lo?i?:?
-
tsoome
I mean, if the os is recent enough, ttymon will pick ttyb-mode *if* ttyb is used for console.
-
jclulow
right which it is not here
-
jclulow
because you said console="text,ttyb"
-
jclulow
so the system console is wscons
-
gwr
No, on my system right now, wscons is blank, and console is ttyb
-
tsoome
um, if he did set console in menu, then os_console was set
-
gwr
Exactly.
-
jclulow
Ah, so what is os_console set to in prtconf
-
gwr
name='os_console' type=string items=1
-
gwr
value='ttyb'
-
gwr
That's from the loader menu interaction. os_console is not set in bootenv.rc etc.
-
jclulow
ok
-
jclulow
I can certainly see some of the expected letters haha
-
gwr
Just try try things: rebooted. Interaction with loader looks fine.
-
tsoome
does stty -a confirm you have 7 bits?
-
gwr
(over serial)
-
jclulow
Yeah how do you know it is 7 bits
-
gwr
Looks OK while kernel is writing startup stuff
-
gwr
As soon as ttymon starts, it's trash. Hm...
-
gwr
Just guessing based on what I see.
-
richlowe
the console is not a tty until autopush has run
-
richlowe
which might also be relevant
-
tsoome
does stty cs8 fix it?
-
richlowe
see the charmingly named /etc/iu.ap
-
gwr
# stty -a </dev/term/b
-
gwr
speed 115200 baud;
-
gwr
rows = 0; columns = 0; ypixels = 0; xpixels = 0;
-
gwr
csdata UTF-8
-
gwr
eucw 1:0:0:0, scrw 1:0:0:0
-
gwr
intr = ^c; quit = ^\; erase = ^?; erase2 = ^h; kill = ^u;
-
gwr
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
-
gwr
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
-
gwr
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-
gwr
status = ^t;
-
gwr
parenb -parodd cs7 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-
gwr
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
-
gwr
ixon -ixany -ixoff imaxbel
-
gwr
isig icanon -xcase echo echoe echok -echonl -noflsh
-
gwr
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
-
gwr
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel
-
jclulow
it would be good to pastebin/gist the big output if you could
-
richlowe
cs7 certainly looks unwanted.
-
tsoome
indeed its cs7 there
-
gwr
sorry. What's "big"?
-
jclulow
more than a line or two
-
tsoome
how is ttymon started?
-
jclulow
Is it just in the usual way under svc:/system/console-login:default ?
-
gwr
yes
-
jclulow
(did you end up adding any new console-login instances)
-
gwr
nope
-
tsoome
on my OI, it has -l console -- this means it should pick console entry from /etc/ttydefs
-
jclulow
booooo: ctfdump: failed to open file /usr/lib/saf/ttymon: File does not contain CTF data
-
jclulow
yeah what does... svcs -p console-login:default | awk '/ttymon$/ { system("pargs "$(NF-1)); }'
-
jclulow
tell you
-
gwr
yeah, this fixes it: stty cs8 -parenb </dev/term/b
-
tsoome
and in addition to console entry, we pick up ttyX-mode line, and set the speed.... um, well, perhaps, if we pick ttyX-mode, we should set all settings, not just speed.
-
richlowe
yeah, I have never seen anything like this. It feels vaguely like either something was done incorrectly, or something does a lookup and gets confused
-
gwr
This system is a nearly brand-new install, so I haven't done anything relevant other than what I mentioned above.
-
tsoome
ttydefs does not actually set cs8 for console, so the number of bits et al should come from terminal defaults
-
tsoome
default_termios does have cs8
-
tsoome
may want to check ttymodes in options.conf
-
gwr
I tried to add " -parenb cs8" to the flags in ttydefs, and restarted the service. Something is still setting cs7 parenb
-
tsoome
anyhow, its 1am here, i better get sleep...
-
jclulow
FWIW any testing that was done on SmartOS for 14608 probably didn't test the change
-
jclulow
none of the ttymons on SmartOS use /dev/console
-
jclulow
(which is unfortunate but true)
-
jclulow
gwr: what does... svcs -p console-login:default | awk '/ttymon$/ { system("pargs "$(NF-1)); }'
-
jclulow
tell you?
-
richlowe
I am suspicious of our use of "sane" in ttydefs, and the DEFAULT Gdef in ttymon, which seem like they default to "reasonable values" including CS7
-
richlowe
and I believe we fall into the default case if we can't find the right one in ttydefs, _and also_ we're on the console or ttymode is NULL
-
gwr
-
gwr
I don't see where "cs7 parenb" is coming from.
-
richlowe
it's probably coming from the "sane" entry in ttymon
-
richlowe
I would debug if, and if so how, you end up using "sane"
-
gwr
console:115200 hupcl opost onlcr:115200::console
-
richlowe
see sttytable.c:121
-
richlowe
(see also other entries in that table, but "sane" looks like the one that we'd potentially fall back onto)
-
richlowe
you have "sane" in some ttydefs entries, though not the ones you should use, you also have "sane" in the DEFAULT struct Gdef in tmglobal.c
-
gwr
The svc cfg and ttymon args show the "console" label for /etc/ttydefs so I'm stumped.
-
gwr
I also tried adding "cs8 -parenb" to the entry. Did not help.
-
richlowe
I've just said a whole lot of stuff you should check that doesn't involve ttydefs.
-
jclulow
right because omething is going wrong in get_speed() of ttymon it seems
-
jclulow
or merge_flags()
-
jclulow
Unfortunately ttymon doesn't have CTF
-
gwr
hm. OK. Just weird, as this works fine on the old machine...
-
jclulow
Your old machine is on what bits
-
gwr
Slightly older OI
-
richlowe
but you've obviously editted stuff (like that console line), so it's hard to really do things while not being you.
-
jclulow
is slightly older before or after Jul 13 21:54:45 2022
-
gwr
SunOS sm20 5.11 illumos-d9be5d44a9 i86pc i386 i86pc
-
richlowe
that's sep 25th
-
jclulow
October 13th!
-
richlowe
oh yeah, commit date
-
jclulow
but yes that should have 14608
-
jclulow
on _that_ system what do you get "prtconf -v | grep -A1 console"
-
gwr
Sept. 2022?
-
jclulow
yes 2022
-
jclulow
so it is recent enough to have 14608
-
gwr
name='console' type=string items=1
-
gwr
value='ttyb,text'
-
jclulow
and os_console?
-
gwr
nothing
-
jclulow
hmm
-
jclulow
does this tell you a path on that system: mdb -ke '*rconsdev::dev2snode | ::print struct snode s_vnode | ::print vnode_t v_path'
-
richlowe
if you remember how, and god knows I don't right now, could you anonymous dtrace for an ioctl setting these modes?
-
jclulow
I don't think you would need to do that
-
jclulow
I think just restarting the service instance would be enough?
-
jclulow
(from, say, an SSH session)
-
richlowe
it could be, I've suffered here recently for unrelated reasons so I'm paranoid
-
jclulow
You could also run the ttymon by hand
-
jclulow
under DTrace or truss
-
richlowe
it just feels like if we see _where_ it's coming from, we could backtrack to how.
-
gwr
Uhm. I haven't tried to use the tty console on sm20 (my old server) in a couple updates. It's apparently not working right now.
-
gwr
It used to... but I guess we can't use that as a reference right now.
-
jclulow
is it not working in the same way?
-
gwr
SOL connects but is unresponsive.
-
richlowe
notably CS7|PARENB also appears to be, in at least some ways, kernel defaults too
-
jclulow
yeah probably hard coded in asy or comes from options.conf or whatever
-
jclulow
or both!
-
richlowe
so finding if it's coming from ttymon, or just being left to default internally would also be good to know.
-
gwr
Oh, right. It's booted to use kbd/vga right now.
-
gwr
I can reboot it to use ttyb...
-
jclulow
but you said it has ttyb,text as the console setting
-
gwr
right.
-
jclulow
I wonder if we split on the comma or if we just treat that as invalid and fall back to the framebuffer
-
jclulow
I don't see how it could be using the framebuffer console unless we're fumbling that
-
gwr
That one is an (old!) supermicro
-
gwr
BIOS redirection etc.
-
jclulow
sure, but if the OS was told "ttyb,text" for console and no os_console value, then either it should split on the comma and just use the "ttyb" bit, or we are fucking that up somehow and it tried to match on "ttyb,text" which is an invalid value so we default to "text"
-
gwr
Oh my... I forgot. That's still on grub. :)
-
gwr
Ah well, that's totally busted now :)
-
gwr
That uses the really OLD Jave ap. for KVM, so it's hard to deal with.
-
gwr
My old system was configured to prefer ttyb and that seems to still work right up until getty runs.
-
gwr
I'm sure that used to work, but I don't get on the console often enough to know when it stopped working.
-
gwr
It does seem odd that os_console is not getting set.
-
jclulow
Well if it is grub there is no special logic to set it I believe
-
jclulow
Presumably it is coming from /boot/grub/menu.lst or /boot/solaris/bootenv.rc or something in that case?
-
jclulow
or ... /rpool/boot/menu.lst ?
-
jclulow
I don't remember how GRUB works haha
-
gwr
At least on there, the tty mode remains correct. Output to /dev/console reads OK.
-
jclulow
but there is no ttymon?
-
gwr
Not on wscons, and the one on ttyb does not seem to be working
-
jclulow
when you say output to /dev/console reads OK, where do you see it
-
gwr
If I echo stuff to /dev/console I see it on the SOL
-
jclulow
ah ok
-
jclulow
that is pretty odd!
-
jclulow
what if you "svcadm restart console-login:default"
-
gwr
I may have had enough of dealing with broken s/w today :)
-
gwr
or broken systems, or misconfigured or whatever.
-
jclulow
well please file bugs when you figure it out
-
gwr
Tried setting os_console="ttyb" in the loader, and then the ttymon for /dev/console works fine. Very strange...
-
gwr
I guess not all parts are getting their setting the same way, or something like that.
-
jclulow
on the old system or the new system
-
gwr
And yes, something apparently changed to break grub console selection, but I doubt anyone cares.
-
gwr
On the new.
-
jclulow
did the loader environment previously have os_console set in it
-
jclulow
when you did the menu version
-
gwr
Not in the bootenv.rc or conf.d no, but it was in the env. given to the OS.
-
jclulow
yeah /system/boot/environment is what ultimately matters
-
jclulow
to the kernel and eventually ttymon
-
jclulow
I believe
-
gwr
When I added it to conf.d/serial instead of letting the loader add that, then the ttymon works.