Open jackdesert opened 2 weeks ago
Screenshots:
We're already logging every command executed into a file https://github.com/archlinux/archinstall/blob/040a6aba27d20361f0c833a04b75fce09690bb51/docs/help/report_bug.rst isn't that sufficient?
I actually built this to educate myself about the arch install process, and to demonstrate to a fellow arch newb the patterns used by the guided installer.
For me the --teach
option is about education in the moment. Seeing the play-by-play inline with the narration. The existing narration tells me in friendly words what the installer is about to do. Then seeing the actual commands right after that lets me know how those friendly words are enacted. This lends itself to realizations such as: "Oh look, it takes three commands to make those friendly words happen!" / "Oh look, that's the command where I always wondered how they got it to run without asking for human input!" / "Oh look, that command takes a looong time to run and generates a log of output!"
I also envision the --teach option to be super easy to point newcomers to. For example: "Boot up this .iso, run these three iwctl commands to connect to WiFi, and then run archinstall --teach
for a guided install that also shows you what commands are running under the hood."
Here's one more plug for --teach
mode:
@svartkanin Today I looked at the contents of /var/log/archinstall/cmd_history.txt
to see if it could serve as a stand-in for the --teach
mode that I have proposed in this PR. Here is what I observe:
cmd_history.txt
appears to contain the cumulative logs from all the times I've run archinstall
during this boot. (This makes it hard to see which commands were used in just one invocation of archinstall
)
cmd_history.txt
appears to include the commands that were run even before the menu was populated. (This makes it challenging to separate out which commands were run just to set up the menu vs which commands were run to actually install the system. I am most interested in learning the latter.)
The timestamp format in cmd_history.txt
is numerical. (Example: 1731611189.3625734) This makes it hard for my human eyes to determine how many minutes passed from one command to the next.
archinstall
is essentially an automation tool for the arch wiki. It tends to implement commands and instructions as they are described in the wiki.
It adds maintenance cost that doesn't necessarily translate into a larger benefit as I think most folks are looking for an automated installation rather than going through it manually step-by-step. And in the latter case the wiki should be the first point of entry for gathering knowledge.
I agree. While it's a novel idea, I think it adds maintenance cost and some times generate a lot of noise (for instance when we probe devices for internal reasons, something users wouldn't have to do).
If anything, I think we could be better about informing the users that IF they want to learn what we did - there is a file they can look at to track the steps - and that these steps can be further read about in the wiki.
Because ultimately, these commands won't tell the user much unless they follow along the installation guide anyway.
I like the idea tho, but I think we can achieve the same result with guiding the user to /var/log/archinstall/cmd_history.txt
at the end of an installation.
(we could probably improve this file too, if it's of use for others.. it's mainly for internal debugging and more advanced error debugging and can for sure contain sensitive information)
PR Description:
Adds a flag through ArgParser for
--teach
, which does the following:Tests and Checks