Commit Graph

38 Commits

Author SHA1 Message Date
Christoph Heiss
82bab215de proxinstall: replace usage of hacky mngmt_nic_id config option
The option was more or less a hack from the beginning anyway, introduced
during the split of the GUI and the installation configuration.

The required information is already there from `mngmt_nic` - which
carries the name of the network interface - and is easily reused to
replace the functionality.

In short, the `mngmt_nic_id` setting was only used to check whether
another NIC was selected, avoiding needless updates to the IP address
and mask textboxes.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2025-04-04 10:32:00 +02:00
Christoph Heiss
7698b8240a fix #5579: setup: introduce 'first_boot' low-level installer options
.. to enable the setup of the 'proxmox-first-boot' service, as well as
optionally setting the ordering.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-18 22:29:23 +01:00
Christoph Heiss
9a1494bad8 test: add test for kernel commandline parsing
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 13:30:20 +01:00
Christoph Heiss
470af1d60e low level: config: filter out all installer-related kernel arguments
For one, include the auto-installer arguments, which weren't filtered
out before. Secondly, include the aliases as introduced in [0].

[0] de7f779 ("unconfigured: accept more telling boot cmdline option names")

Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 13:30:20 +01:00
Christoph Heiss
46bdcbf5a1 low level: config: filter out kernel cmdline on word boundaries
Otherwise, substrings might get replaced, e.g. the replacement
`proxmox-start-auto-installer` -> `pxmox-start-auto-installer` would be
done.

Fixes: a02a78a ("fix #4747: pass kernel cmdline parameters to target system")
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 13:30:20 +01:00
Christoph Heiss
80b6a2de5f fix #5250: install: config: add new btrfs_opts with compress config option
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-10 19:41:55 +01:00
Stoiko Ivanov
49219542da installer-common: do not drop nomodeset from target kernel cmdline
dropping the `nomodeset` here makes little sense:
* currently users need to explicitly add it when booting the kernel,
  which is probably only done when the system needs it to show any
  output when booting
* it was originally removed, because the installer had a grub-entry
  that explicitly disabled it - and the reasoning was to remove
  everything installer-specific - but I assume that it should cause
  less problems to keep it in place in all cases.

This was also partially pointed to in:
https://bugzilla.proxmox.com/show_bug.cgi?id=4230#c38

Fixes: a02a78a865
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2024-11-10 19:19:49 +01:00
Christoph Heiss
517121ac56 low-level: change root password option to contain either plaintext or hash
A hashed password can be created e.g. using the `mkpasswd(1)`.
This then will allow the auto-installer to pass along a
already-hashed password from the user, instead of simple plaintext.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Tested-by: Theodor Fumics <theodor.fumics@gmx.net>
2024-07-22 18:40:34 +02:00
Christoph Heiss
0e1d973b3d install: config: rename option lvm_auto_rename -> existing_storage_auto_rename
As this is an internal option for the low-level installer anyway, no
real functional changes here.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-07-16 17:51:41 +02:00
Christoph Heiss
9a5b563dfe auto-installer: move ssh keys setup to low-level installer
.. thereby, also fixing a accidental shell injection.

Since run_cmd{,s}() is nowhere else used anymore, they can be removed
too.

Also mostly reverts commit

  5878dc4ae "auto-installer: handle auto-reboot info messages directly"

in the process too.

Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-04-23 17:24:24 +02:00
Christoph Heiss
ec7b635613 low-level install: add option to automatically rename LVM volumes
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-04-22 14:50:35 +02:00
Stoiko Ivanov
a02a78a865 fix #4747: pass kernel cmdline parameters to target system
Parameters needed for booting during installation are best preserved
in the target cmdline as well - e.g. if you need a particular
cmdline switch for your system to boot at all - not having to add it
for the first boot of the installed system and manually adding it to
the bootloader config is an improvement.

This additionally enables us to drop the console parameter handling
for serial consoles (it is just one of the parameters to pass along).

Finally it fixes the regular expressions for the installer settings we
read from the cmdline (swapsize, maxroot,...) which were broken if
added as last entry.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-16 16:29:20 +01:00
Stoiko Ivanov
c1279c8250 serial install: fix console parameter parsing
The regex matching in Proxmox::Install::Config was blindly copied from
above - so the other parameters are also likely to not get recognized
if they are the last on the cmdline

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-14 18:34:11 +01:00
Stoiko Ivanov
4c1473ce32 pass optional console parameter from installer to target
If an installation needs to provide a dedicated console parameter
(e.g. because it runs on the serial console) the target system most
likely will need the parameter too.

This patch adds the parameter to the kernel-commandline (in case zfs
is used for both grub and systemd)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-12 19:28:54 +01:00
Christoph Heiss
42aa2fa7ef fix #4829: install: add new ZFS arc_max setup option
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-11-06 15:49:31 +01:00
Thomas Lamprecht
55c2fb999b config: avoid warning if no country was detected
e.g., due to having no network (no DHCP lease)

Reported-by: Christian Ebner <c.ebner@proxmox.com>
Reported-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 10:45:31 +02:00
Thomas Lamprecht
e90bb4efa2 config: fix missing include of Log module
Reported-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 10:44:40 +02:00
Thomas Lamprecht
b7ad1ad4c2 gtk: fix initial default for FQDN
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:25:07 +02:00
Thomas Lamprecht
8e66eb8eee config: always parse kernel cmdline on initialization
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:00:47 +02:00
Thomas Lamprecht
44e93c11f2 config: note that we want to remove mngmt_nic_id in the future
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 14:24:16 +02:00
Thomas Lamprecht
5bcefda0b4 switch "target_hd" & "disk_selection" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 12:02:48 +02:00
Thomas Lamprecht
6edd095ad4 switch "zfs_opts" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 11:08:32 +02:00
Thomas Lamprecht
7f3941d1fe switch "cidr", "gateway" & "dns" over to central config
allows to drop quite a few module wide variables for GUI widgets,
which haven been re-created everytime the step got visited anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 10:42:27 +02:00
Thomas Lamprecht
e02f38dcb6 switch "hostname" & "domain" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 09:51:40 +02:00
Thomas Lamprecht
8a7e31ce11 switch "mngmt_nic" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 09:37:01 +02:00
Thomas Lamprecht
8924c14514 switch "mailto" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 09:20:32 +02:00
Thomas Lamprecht
a024147be9 switch "password" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 09:18:33 +02:00
Thomas Lamprecht
b3bcf70e76 switch "keymap" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 09:08:59 +02:00
Thomas Lamprecht
2959225ba4 switch "timezone" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 09:03:16 +02:00
Thomas Lamprecht
74041d68e1 switch "country" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:55:28 +02:00
Thomas Lamprecht
140f2e85e3 switch "maxvz" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:42:52 +02:00
Thomas Lamprecht
35e7bf169d switch "minfree" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:38:32 +02:00
Thomas Lamprecht
b4ab3f1926 switch "maxroot" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:33:21 +02:00
Thomas Lamprecht
ef41b04996 switch "swapsize" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:28:36 +02:00
Thomas Lamprecht
a8a14c4d44 switch "hdsize" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:24:01 +02:00
Thomas Lamprecht
cd1a45ade1 switch "filesys" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:16:26 +02:00
Thomas Lamprecht
0a3ac9827b switch "autoreboot" over to central config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:04:40 +02:00
Thomas Lamprecht
390889ab51 add beginnings of central config module with singleton
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 08:03:04 +02:00