<nh2>
samueldr clever: after having read through the first 2500 diff lines, have a first guess: `CONFIG_BLK_DEV_SD=m` in NixOS, `=y` in ChromiumOS:
<nh2>
"Do not compile this driver as a module if your root file system (the one containing the directory /) is located on a SCSI disk"
<clever>
nh2: nixos relies heavily on an initrd to deal with things like that
<samueldr>
do you have an initrd?
<samueldr>
my thoughts :)
<clever>
nh2: if you provide an initrd to kexec, you likely can boot a stock nixos kernel via kexec
<clever>
nh2: then you can lsmod, find what it needs, and bake those in!
<nh2>
clever: hmm I tried that yesterday with kexec but it just hung
<clever>
nh2: with or without an initrd?
<clever>
nh2: and was the initrd made after nixos-generate-config guessed kernel modules?
<nh2>
clever: I think with initrd, but should retry to make sure. For the second question, no, I haven't run that yet
<nh2>
clever: I must have done something wrong last time, or not it's the fact that now I'm passing more --append args or that I changed the kernel somehow, but now kexec gets me further with
<nh2>
it can't be the middleone, as `--append=""` also seems to get me that far
<clever>
nh2: it may be that the --append parsing is dumb, and eats all further args
<nh2>
clever: no I mean both `--append="$(cat /proc/cmdline)"` and `--append=""` work now, so the thing that made it work compared to before must be something else
<clever>
ah
<nh2>
clever: hmm, kexec has some problems. When it tries to mount the root fs, busybox fsck.ext4 complains about unsupported features: FEATURE_R24 FEATURE_R25 ... FEATURE_R31 "Get a newer version of e2fsck"
<nh2>
clever: I suspect that is because before kexec, the root fs does not get cleanly unmounted
<clever>
nh2: you should be able to flag it as no-check in fileSystems
<clever>
nh2: oh, also
<nh2>
I'm just doing `kexec -e` after `kexec -l`; should I reboot more properly somehow?
<clever>
`systemctl kexec` will do a full shutdown, then kexec whatever is currently loaded
<clever>
if nothing was loaded, (and your using systemd-boot), it will try to load the current kernel (according to the docs, untested on nixos)
<nh2>
clever: OK, then I should try that better method so that it unmounts first
<samueldr>
:/ my previous assumptions about =n not working may have been clouded by *some* options not respecting =n somehow
<samueldr>
turns out I just don't know how to track down why it stays active I guess?
<clever>
samueldr: some options can force =y on others
<clever>
samueldr: check the KConfig files for all references to the one in question
<clever>
also try setting it to n in menuconfig, and see if it allows it or does other changes
<clever>
since menuconfig knows the rules and wont let you do invalid things
* samueldr
needs to track down how to menuconfig
<samueldr>
I know it's documented somewhere
<clever>
samueldr: just `make menuconfig` in a nix-shell
<nh2>
clever: hmm, I'll first have to do the fsck on another computer, because it's still marked unclean and the busybox can't do it
<samueldr>
thing is, FB_LOGO_EXTRA is not referenced anywhere, ONLY at the option
<samueldr>
the few uses are all in the logo related things, and only the logo Kconfig refers to FB_LOGO_EXTRA
<clever>
if defined, this header will declare a function type
<nh2>
clever: hmm, even if I clean it, busybox will try to run fsck and fail. I can press `*` to continue though, and then it works! I am now in the nixos kernel with the initrd via kexec
<clever>
when not defined, it declares an inlineable no-op function
<samueldr>
yes
<clever>
nh2: now lsmod and you can see what nixos is using, and needs baked into the kernel
<samueldr>
believe me I understand everything UP until the Kconfig definitions and how the kernel automatically changes options
<clever>
nh2: some stuff like alsa is obviously not needed to boot, so you can still make those modules if you want to
<gchristensen>
samueldr: xconfig isn't so hard to enter either
<samueldr>
yeah, turns out it wasn't; I'm mostly annoyed at the lack of clarity about linux config options
<clever>
samueldr: i think the Kconfig for something else (3rd party?) must flag FB_LOGO_EXTRA is required, and then call fb_append_extra_logo() at bootup
<samueldr>
not sure why you're linking to the code
<clever>
and if that 3rd party thing isnt involved, FB_LOGO_EXTRA will never be active
<samueldr>
nothing third paty in this build
<samueldr>
but I think that's because the config has no prompt
<samueldr>
it's a bit weirdly documented, so I'm not sure yet
<samueldr>
it looks like a config without prompt might be used to compute a config value dependent on others
<clever>
i think its an internal option, that should only be enabled by 3rd party things making use of it
<samueldr>
and only that
<clever>
and without 3rd-party stuff, it just never enables
<samueldr>
false
<samueldr>
here not even "third party uses it" but "only computed according to other config values"
<clever>
it also has a default value, that can mss with it
<clever>
ooo
<clever>
since you cant edit it, the default assumes full control
<samueldr>
seems like it
<clever>
so SPU_BASE is in control
<samueldr>
the option is why up to 10 penguins are shown depending on the number of CPUs
<samueldr>
(cores)
<clever>
kconfig may even assume that default is an override, since you cant possibly have edited it
<clever>
(and then you did edit it :P)
<samueldr>
yeah, though it's not written "configs without prompt are not configurable" I'm 99% sure the wording on everything in the doc means that
<samueldr>
this seems to match the behaviour I saw
<samueldr>
AND, an option *can* be re-defined, as long as its type match
<samueldr>
so your third party thing is right too
<samueldr>
(but no third party stuff here)
<samueldr>
so two ways to force a value (and keep it through make oldconfig)
<samueldr>
(1) add a prompt through a patch
<samueldr>
(2) add a new Kconfig option for your customizations and new defaults/ifs
<clever>
oh, the rpi kernel shows 4 raspberries on bootup
<samueldr>
yeah
<clever>
it may be interesting to see what it does differently
<samueldr>
they changed the ppm
<clever>
ah
<samueldr>
I want to show *only one* :)
<samueldr>
that's the thing that's not customizable
<clever>
dang
<samueldr>
you can enable/disable logo, but logo will always show x amount of logos (up to 10) , where x is the amount of cores
<samueldr>
I want to hijack that as a "debug" thing, where this'll allow mobile-nixos to show a specific logo at the first possible moment, before anything else
<samueldr>
(some android OEM kernel trees are quite broken and the console on framebuffer will not build)
<samueldr>
being stuck on that initial logo would allow determining that the kernel started, but something broke in the initrd
<samueldr>
thanks for sharing the debugging load
<clever>
there is an early-printk thing, but if fbcon and serial are down, that wont help much
<samueldr>
yeah, no serial on most android devices, and fbcon is not in good shape in those cases
<clever>
another thing you could maybe play with, but i'm not sure it would work so early on, is usb gadget support
<clever>
and usb otg
<samueldr>
needed some initrd involvement
<samueldr>
but it works fine
<samueldr>
networking + ssh + dropbear
<clever>
but if its booting fully, and its just an FB problem, that would help
<nh2>
clever: I think I tricked myself: the kexec only works if I kexec into a kernel that has the ChromiumOS kernel config. I noticed by seeing that the lsmod output is the same before and after kexec. If I kexec into a real NixOS 4.4 kernel, I get the hang as originally :(
<nh2>
Also I noticed that if I put the NixOS kernel (+modules) onto the root FS instead of the one with ChromiumOS config, then `lsmod` suddenly shows no loaded modules at all.
<samueldr>
and adbd too, but not on aarch64 :/
<samueldr>
(or might be the kernel)
<clever>
nh2: nixos looks for modules in /run/booted-system/kernel-modules/ and if they dont match the kernel, it cant load them
<nh2>
clever: but they should match, it's the same source code, just different config
<nh2>
clever: the nixos hardware detection had generated me `boot.kernelModules = [ "kvm-intel" ];`so I've put that into my system config for generating the root FS, but I see in journalctl in the state when there are no modules `systemd-modules-load: Failed to lookup alias 'kvm-intel': Function not implemented`
<clever>
nh2: there is a modsrc thing, where the kernel will bake its own hash into the modules
<clever>
and if the hash doesnt match, it wont load
<clever>
nh2: you could try manually running modprobe after booting in that "no module" situation, to see what the error is
<nh2>
clever: hmm looks like there are infinite barriers people invent to keep me away from the goal :D
<clever>
its mostly to prevent accidents from borking the machine :P
<nh2>
clever: `modprobe mii` says `version magic '4.4.178 SMP mod_unload modversions ' should be '4.4.178 SMP preempt mod_unload '`, I guess that's what you meant
<clever>
nh2: if you can rebuild the kernels to make those specific options align, then it will allow mixing modules between the 2 builds
<clever>
nh2: modinfo will also display that for a given module
<nh2>
clever: not sure how to control those specific ones. I'm also not sure if I should go into that, as it's just a thing I noticed that lsmod is empty. It shouldn't interfere with the kexec, right?
<clever>
yeah, if it boots with an empty lsmod, it should be fine
<samueldr>
bad news: I was wrong in my sleuthing and FB_LOGO_EXTRA doesn't matter in showing more than one logo
<samueldr>
good news: the fix is even more trivial
<kisik21>
I needed to partition stuff myself beforehand...
<kisik21>
probably
<etu>
I had that issue on my raspberry pi as well
<etu>
Until I switched sd-card and fixed it at the same time
<kisik21>
yep, RPis have that kind of stuff too because boot wasn't supposed to have, like, 5 kernels and 5 initrds
<kisik21>
RPi devs didn't know about NixOS
<kisik21>
:3
<etu>
:D
<etu>
Their loss ;D
<kisik21>
Can I run GParted from Wayland as root?
<kisik21>
I can't
<etu>
I'm on exwm, so I'm probably stuck on x11 for a good while :p
<joepie91>
pie_: unsure what that was in response to, but I agree, that's an annoyance of mine as well :P
drakonis has quit [Read error: Connection reset by peer]
drakonis_ has joined #nixos-chat
drakonis has joined #nixos-chat
drakonis_ has quit [Ping timeout: 268 seconds]
drakonis_ has joined #nixos-chat
drakonis has quit [Ping timeout: 258 seconds]
<MichaelRaskin>
gchristensen: well, code comments have space locality without time locality, and the commit messages the other way round. As for PR description — it has the same model as commit messages; so it indeed either follows from commit messages obviously, or talks about transient review-process things or belongs to release notes.
<infinisil>
gchristensen: FWIW that can't be done in general, because what files to import may not be known yet, e.g. with IFD
<gchristensen>
that source could be included written to a file and imported, no?
<gchristensen>
oh i see
<gchristensen>
well I'm happy to prohibit IFD if I can get this :)
<infinisil>
What is this for?
drakonis has joined #nixos-chat
<gchristensen>
to take a factored out NixOS configuration and make it a single blob for AWS USer-Data
drakonis_ has quit [Ping timeout: 257 seconds]
<joepie91>
gchristensen: ahh, you're writing a bundler :P
<joepie91>
Webpack, But For Nix(tm)
<gchristensen>
oh no I'm notwriting it :P
<gchristensen>
I'm hoping someone else does :)
<joepie91>
oh, lol
<joepie91>
maybe you can convince jD91mZM2
<joepie91>
this seems like a great testcase for rnix
<gchristensen>
:D
<joepie91>
(on both the parsing/stringifying and format retention points)
* joepie91
lets out a deep breath
<joepie91>
I finally have something approximating a comprehensive mount flag parser!
<gchristensen>
oh man
<gchristensen>
what for?
<joepie91>
gchristensen: on paper, a VPS panel - in practice, the inevitable "query your system state with arbitrary queries" projects that this piece of the VPS panel is going to spin off into
<joepie91>
gchristensen: anyway, I'm basically paying a one-time upfront cost to build an arbitrarily queryable system API so that I don't have to scatter exec()s throughout the rest of the codebase :P
<joepie91>
given that a VPS panel is basically a big pile of wrapped CLI utilities, parsing code, and some shiny UI
Myhlamaeus has quit [Ping timeout: 252 seconds]
das_j has quit [Remote host closed the connection]
<gchristensen>
what would that list look like for anything else?
<pie_>
could be worse i guess
<pie_>
like, im just coming to realize there is a pretty good amount of docs out there its just nontrivial to search
drakonis_ has joined #nixos-chat
drakonis1 has joined #nixos-chat
<pie_>
i just started writing an outline for "What I Wish I New When I Was Welcomed In Nix" (content pending)
<MichaelRaskin>
I hope it is «knew» there
<gchristensen>
please do
<MichaelRaskin>
Indeed, even an outline would be already quite helpful
drakonis has quit [Ping timeout: 255 seconds]
<pie_>
problem is i should have started writing it when im started
<pie_>
now im both experienced AND confused :P
<MichaelRaskin>
Pity
<gchristensen>
+1 that is a problem
drakonis_ has quit [Ping timeout: 240 seconds]
<pie_>
i should go back and scrape my old irc logs for things i asked but ugh sounds so tedious
drakonis has joined #nixos-chat
drakonis1 has quit [Ping timeout: 240 seconds]
<gchristensen>
simpson: it would be neat if https://graphs.matador.cloud was linked to from more than the privacy policy page :)
<gchristensen>
(although it seems down)
<simpson>
gchristensen: Not down, just no longer public. Thanks for the heads-up.
<gchristensen>
ah ok
<gchristensen>
simpson: where (in physical space) does matador store data?
endformationage has joined #nixos-chat
<simpson>
gchristensen: Datacenters belonging to one of Google, Microsoft, IBM, or DigitalOcean, somewhere in the USA.
<gchristensen>
lol.
<simpson>
Sorry, having trouble understanding the underlying motivation.
<gchristensen>
given I'm downloading data from systems in San Francisco CA, Dallas TX, or New York City NY, would my data cross the continent to get to any of them?
<simpson>
Yeah, it's gonna be interstate.
<gchristensen>
for all three locations?
<simpson>
In general, for Tahoe-LAFS, you'll connect "directly" to each storage server. But it's very easy for typical consumer ISPs to have gateways whose routes cross state lines.
<gchristensen>
right
<simpson>
For example, I might be in Portland, OR, with a storage server in a Google datacenter in The Dalles, OR, but my route still goes through a gateway in Seattle, WA, as well as a gateway in San Jose, CA.
Myhlamaeus has joined #nixos-chat
<Ralith>
simpson: matador uses tahoe?
<ar>
/41
<gchristensen>
matador's primary service is hosted tahoe
drakonis1 has joined #nixos-chat
<Ralith>
oh, I was confusing it with something else
drakonis has quit [Ping timeout: 258 seconds]
drakonis has joined #nixos-chat
<joepie91>
manpage says: "Ramfs is a memory based filesystem. Mount it and you have it. Unmount it and it is gone. There are no mount options. "
<joepie91>
samueldr: I don't speak C very well; is my experimentally-observed conclusion that `mode` refers to the mode that the root of the pseudo-fs will have, correct?
<samueldr>
feels like this is the mode of the root directory
<samueldr>
(of the fs)
<joepie91>
right
<joepie91>
thanks :)
<samueldr>
it's the only use of the mode mount_opts
<samueldr>
and it's next to make_root
<samueldr>
not an expert though
<joepie91>
this seems enough confirmation for a confident assumption :)
<joepie91>
good enough for me right now
<joepie91>
I have insufficient motivation to untangle this particular yarn in detail now, heh
<joepie91>
I've been reading manpages and source code for like 2 days straight now <.<
<nh2>
samueldr clever: Using manual bisection of the kernel config in `meld`, I have found that the minimal change to the NixOS kernel config to make the Chromebook's display work is setting these from `m` to `y`:
<samueldr>
though I guess it's possible that internally pineview uses something AGP-like
<nh2>
samueldr: yes, any =m here kills the display (also setting one of them to `m` also makes the respective "parent" in the config tree go to `m`)
<samueldr>
right
<nh2>
samueldr: so the question is: why does NixOS's initrd not work? Does it not contain the modules for one of these?
<samueldr>
don't know, maybe even with those as modules something fails due to them not being loaded too early?
<samueldr>
I guess the only way to know would be to (1) verify the modules are there in an extracted initrd (2) get some dmesg output
<samueldr>
though (2) has been provably hard
<pie_>
isnt agp something that was used before pciexpress stuff
<pie_>
i mean i wouldnt know
<joepie91>
yes
<nh2>
samueldr: now that I know how to turn on the display, I should be able to get dmesg output even while leaving everything else unchanged. But my suspicion is: The required modules are *not* in the initrd
<nh2>
how to map from CONFIG_* options to the names that can be given to `boot.initrd.availableKernelModules`?
<nh2>
maybe I just need to put more stuff in there or `kernelModules`
<clever>
2019-04-19 23:22:24 < clever> i also need some chachapoly1305 at one point
<clever>
adisbladis: i need to perform that unknown key derivation, and chachapoly1305 encryption, and some signing
<clever>
adisbladis: part of the issue is that i dont really know whats normal with HSM's, can i request that it do sign(derive(derive(uber_secret)),"blob") ?
drakonis_ has joined #nixos-chat
drakonis has quit [Ping timeout: 255 seconds]
<joepie91>
hackalot, a hackerspace in NL, officially has a cooler deployment of the photo gallery software than we (revspace) do
<joepie91>
that is a genuine floppy-powered digital camera
<joepie91>
and they have a reader that, when a floppy is inserted, uploads the pics to the gallery
drakonis has joined #nixos-chat
<adisbladis>
clever: Hmm.. sign(derive(derive(uber_secret)),"blob") should be fine. Though I'm not so sure about your combination of required crypto.
<adisbladis>
Yubikey does not have ed25519 support
<samueldr>
joepie91: bamboozled: that photo wasn't taken by the mavica itself
<adisbladis>
Btw, for developing HSM applications softhsm is great
drakonis_ has quit [Ping timeout: 258 seconds]
<clever>
adisbladis: i'm wondering about just throwing it together in an atmel chip for fun
<adisbladis>
Honestly.. Sounds like less headache
<joepie91>
samueldr: correct, but several others in the gallery were!
drakonis1 has quit [Ping timeout: 240 seconds]
drakonis has quit [Ping timeout: 255 seconds]
<clever>
adisbladis: what about TPM featurs?
<adisbladis>
clever: Never played with TPMs
drakonis has joined #nixos-chat
drakonis1 has joined #nixos-chat
drakonis has quit [Ping timeout: 268 seconds]
drakonis1 has quit [Ping timeout: 255 seconds]
<nh2>
clever: I successfully kexec'ed now after setting `noCheck` on the root file system. I suspect that the busybox fsck that hangs (I mentioned before) runs *before* the display driver module is loaded, so I can't see that it's prompting
<nh2>
simpson clever samueldr: There's still something I don't understand with module names. On https://cateee.net/lkddb/web-lkddb/AGP_INTEL.html it says the module is called `intel-agp`. But in `lsmod` it shows up as `intel_agp` :o
<samueldr>
it's... uh... complicated
<samueldr>
the filename will not be the module name in lsmod
<nh2>
clever: also that bash script that is stage1 seems to run without any of the normal bash "sanity" options like `set -e` or `-u`
<samueldr>
-e would be "dangerous" in some cases :/
<samueldr>
I'm pretty sure it's by design
<clever>
nh2: it failed to mount /mnt-root/ and you told it to continue without a rootfs!
<nh2>
samueldr: my experience is that all bash scripts in the world are bugged, and those without `set -e` are extra bugged, and that at least set `-e`should be turned off locally where needed
<samueldr>
I tend to agree, but when it's the only thing stopping you from booting, I can see why they didn't
<samueldr>
and with -u, considering it's not bash, not sure how expansions become more painful to work with -u
<nh2>
clever: that's right, I don't expect it to boot through given that the mount failed, but I also don't expect it to invoke switch_root "with bad syntax"
<clever>
nh2: continue just forces it to keep going
<clever>
nh2: you may want to add boot.shell_on_fail to the kernel args
<clever>
then youll have the choice to get a shell, and can debug it further
<nh2>
clever: there are 2 more things that I don't understand:
<nh2>
1) before, without `checkJournalingFS = false`, it booted through when I pressed continue. Why does skipping the check result in an error?
<nh2>
one that I cannot skip past?
<clever>
nh2: no idea
<clever>
getting a shell in either case could help debug
<clever>
as would getting a diff of the ext related CONFIG_'s
<nh2>
2) I also got before this change, and still get, various modprobe errors before that:
<nh2>
modprobe: FATAL: Module uhci_hcd not found in directory /lib/modules/4.4.178
<nh2>
loading module uhci_hcd...
<nh2>
clever: however, those can't be critical, as without the check disabled, I can just press * to continue
<clever>
yeah, id just ignore those for now
<clever>
oh wait
<clever>
ext4 not loading
<clever>
nh2: that would explain why you lack ext4 support!
<clever>
ext4 is just ext with some special features
<nh2>
clever: the reason for that mismatch might be non-perfectly-same kernel options as you identified yesterday, but it's still unclear why not-disabling that check "fixes" it
<clever>
yeah, thats a weird thing
<clever>
try making ext4 built into the kernel
<clever>
then modules wont play a role in mounting rootfs