-
Notifications
You must be signed in to change notification settings - Fork 669
H2T (Host-to-target) installs and prevent host pollution #3978
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
Conversation
- Add running_from_host() function to detect if running from installed system vs ISO - Function checks for /run/archiso existence (ISO mode) vs host mode - Add clear logging of installation mode on startup - Skip keyboard layout changes when running from host system - Fix Pyright type error in jsonify() by using Any instead of object - Update README to mention installation from existing system This enables archinstall to be run from an existing Arch installation to perform host-to-target installs on other disks/partitions.
|
I understand the intention of the PR but I'm not a big fan of deviating behavior depending on where archinstall is run as it will make things more complex. Having said that I do agree that modifying the host system is not a good idea and I hope to find an alternative option that behaves the same as well, from a quick look:
So I guess the options would be
@Torxed any thoughts? |
|
Thanks for the feedback @svartkanin It might seem a bit too hacky but makes sense with how it works (usually from live medium but why not from an existing install). We just need to be able to differentiate maybe you have a better solution or better spot for it (I thought early is better) and make it abstract bool so that it can be re-used. It doesn't really affect much of the rest is more just of guardrails for H2T. The key here: is just the return early here and makes a lot of sense. And still sets for target ! (Please feel free to modify the rest!) ,because again it would just make it so that we do not touch the host's settings, if in live-install scenario vs being on an live-medium (where we don't care). If anything I don't think it adds much complexity but clearly states what archinstall should behave like in different scenarios. I've had run manually countless times before I found this hack and I think is one of the cooler parts of archinstall is not needing an ISO at all and being able to use your current install to create others :D About your other solutions I don't think it addresses the root cause: Unless we use |
|
So the assumption after this will be
To avoid confusion I'd still like to have the current keymap displayed in any input (can be done in a future PR as I have some major migration to |
This is where the issue is, if on host and select a keymap (different from host) I've polluted my host but only wanted this in target (and assumptions that they are the same is just wrong). I've had this many times installing for laptops (forced into a different keymap) from my main setup (us). I think the loadkeys (set in session only) + Again thanks for follow up ! And hopefully this makes more sense now. Sorry if I was unclear, it's a weird case I get a lot with French/Belgian layouts. |
I'm not too keen on using a tool that is not supported on Wayland as most system will be on Wayland by now. So this will add another layer of behaviour that needs to be understand as just looking at the code path is not enough. If you can change the |
H2T (Host-to-target) installs and prevent host pollution (archlinux#3978)
H2T (Host-to-target) installs and prevent host pollution (archlinux#3978)
This is a follow up to my last PR#3928 and original ISSUE#3599
What we achieve with such a patch:
running_from_hostdefinitionset_kb_layout(will be set on target only) viainstaller.set_keyboard_language()andset_vconsole()__init__.pyto print: EXAMPLE:Or
Running from ISO (Live Mode)And will be present in logs to have a trace too (useful if outdated system deps or straight up missing deps).
End result: Makes it so that if you are installing say from a US layout computer and target uses a different layout (ex: laptop), we do not modify the host system and can be built-upon for other host-checks if needed (say for example: extra deps checks or other host isolation related needs).