buildsys: depend on full known-to-git file list for installer sources
basically only used for change-tracking on what targets to rebuild,
so avoid the need to have the list here duplicated, most files known
to git are installer files
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Make it clearer that we actually pass one, or a list of, test-images
as CLI option and move the is-test-mode state into the setup module
(not enough code/reason to make a separate "env" or so module) in
preparation of further splitting out code into separate modules where
we then need to have the info about test-mode state available there
too.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Christoph Heiss [Thu, 16 Mar 2023 10:01:36 +0000 (11:01 +0100)]
fix #4430: add UTC timezone as option to installer
Adds 'Etc/UTC' as option to the timezone selection, regardless of what
country is selected.
The 'Etc/' prefix needs to be stripped for the installation, as this
value is written to /etc/timezone. PVE/PMG/PBS already use 'UTC' without
the prefix, so avoid regressing them.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Thomas Lamprecht [Tue, 29 Nov 2022 06:10:21 +0000 (07:10 +0100)]
compute swap size: align down to 4 MB
For one as this just avoids very oddly specific swap size values, and
more importantly, storage systems like LVM that need to align their
sizes to their internal extent size won't round up on odd numbers
anymore.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stoiko Ivanov [Mon, 28 Nov 2022 20:41:10 +0000 (21:41 +0100)]
create lvm: align LV size down to 4MB boundary for non-pve products
Following commit 1a5fa7b0936381314f613e525255078093f7f258 but for
the non-PVE code path we also need to align down to 4 MB with the
adapted auto-sizing, especially on smaller disks.
For PMG and PBS installations. Without it installation fails due to
one missing extent when creating the root LV. Minimally tested on a
VM of mine
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
[ T: reworded commit message a bit ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 18 Nov 2022 15:29:17 +0000 (16:29 +0100)]
create lvm: improve rounding/alignment
stay in MB size range for longer to have some accuracy level we need
and mask the last 2 bits (= 4 MB) to align down to a level that
should not interfere with LVM anymore.
Otherwise, with $rest sizes that hit the second if branch < 48
regressed on LVM due to missing one extend of expected space.
Dominik verified this off-list to fix the case Stefan run into.
Reported-by: Stefan Hanreich <s.hanreich@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 14 Sep 2022 13:47:23 +0000 (15:47 +0200)]
fix #4236: split disk space check into soft and hard limits
Make the 8 GB disk check a soft limit, as most products are still
installable with less space, even though it may need some special
options in the disk selection. Still notify the user with a prompt to
avoid an expected possible error seem like it was unexpected.
Keep 2 GB as hard limit for now, makes no sense to install on such
small devices, only pain.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 25 Apr 2022 15:49:33 +0000 (17:49 +0200)]
drop enabling timesyncd, wrong since chrony switch & unnecessary anyway
It should actually fail since the switch to chrony, but syscmd only
returns the exit code and we did not check it.
Shortly thought about checking for the existence of
"$targetdir/lib/systemd/system/chrony.service" and enable
chrony.service in that case, but that is unnecessary too, as we know
due to this bogus enable timesyncd which never stopped chrony to run
happily enabled after installation anyway.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 25 Apr 2022 15:41:21 +0000 (17:41 +0200)]
disks: raid: avoid restting hdsize when reopening options
The"auto get lowest disk size from selected set" logic also reset it
to that if the previously chosen value was already lower on reopening
the disk dialogue.
That can be rather surprising for an user as the hdsize field is a
bit hidden in the advanced dialogue, so just reopening to ensure the
correct disks are selected may interfere with a previously lowered
hdsize.
Reported-by: Fabian Ebner <f.ebner@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 20 Apr 2022 11:12:30 +0000 (13:12 +0200)]
hd size: defuse, rework and comment hd size computation
we explicitly have an "Deselect All" Button if we got more than 4
disks, and if that's hit nothing is selected and we'd die with an
internal error in an normal, to be expected case; which must not
happen.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
fix #3587: make hdsize configurable for btrfs setups
as described in the bug-entry it is still not possible to have a
swapfile on general btrfs setups (only on single disk (single data
profile - documented in [0,1], and my quick tests confirmed it).
Users who still need/want swap can now set a hdsize smaller than their
disk-size to keep a part unpartitioned for adding a swap-partition
after installation (like with ZFS).
I quickly considered sticking with a single 'advanced raid' tab and
adapting the visibility of the individual lines, but did not see an
elegant way (as far as this is possible with GUI code) of doing that.
fix #3188: update hdsize spin-button on disk-selection change
the patch splits get_hdsize_spinbtn into a sub for generating the adjustment
gtk-element and one for the button itself and moves them above
create_raid_disk_raid (so that the adjustment sub can be called)
The adjustment gets it's data from the disks selected for installation
in the GUI, if a size is not provided.
Additionally the bogus 'zfs' argument to the create_raid_advanced_grid
was dropped.
Tested with a VM with 2x 100G disks, and one with 20G
Stefan Reiter [Thu, 24 Jun 2021 12:30:13 +0000 (14:30 +0200)]
zfs: allow RAID0 with different-sized disks
zfs_mirror_size_check is already called in get_zfs_raid_setup when
necessary, so don't call it unconditionally, as this will cause a
false-positive error on RAID0 devices (where size mismatches are fine).
Thomas Lamprecht [Fri, 10 Sep 2021 12:11:29 +0000 (14:11 +0200)]
init: do not sync on actual reboot
we actively synced two times already at this point, immediately after
the installer GUI exited and before starting to unmount stuff, so
reboot should not be required to sync and may even hang if trying to
do
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
and handle that one via a snippet instead of touching the main
'/etc/default/grub' config file.
distributor (and disabling os-prober for PVE) are already handled by the
product-specific meta packages via snippets - proxmox-ve was the last to
join this club in 7.0-2.
back in 2018, commit 1accc6da659d8a02dcf1c2a636749e6f48fb9c2d
"Inotify : write network config : use modern syntax for options"
changed pve-common's /etc/network/interfaces writer to prefer options
with '-' over those with '_'.
having the installer write the old variant makes any modification of the
vmbr0 interface via the API also change these three lines to the new
variant - so let's do it right from the start.
Thomas Lamprecht [Tue, 15 Jun 2021 13:03:09 +0000 (15:03 +0200)]
unconfigured: install busybox applets
We may be using a more minimal debootstrap nowadays, but busybox is
still available, so compensate that by telling it to install
symlinks in /bin and /sbin for those applets it knows and are not
already existing.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 15 Jun 2021 12:56:26 +0000 (14:56 +0200)]
unconfigured: heuristically detect high-dpi and adapt font/GDK_SCALE
Use the biggest terminus font we can get our hands on, and use the
Uni2 variant, which seems like an OK trade-off (the installer is
rather ascii anyway).
The detection uses the console columns in such away that high-dpi
screen should be detected but just wide-formats (like 21:9) should
not. This is a bit brittle, but even miss-detecting it should still
allow using it (the installer is made for 1024x768, which when
doubled still fits on WQXGA (2560x1600) and mostly on 1440p too.
It could be more robust to depend on edid-decode, but as physical
dimensions are not required there, and even if specified often quite
off, it's not a sure thing either. So go for simple first.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 14 Jun 2021 13:55:51 +0000 (15:55 +0200)]
unconfigured: allow very crude and manual wlan management through iwd
can for now only work if booted via debug mode as one needs to
manually call iwctl in the debugshell, so only call it in the debug
case. This is currently more of a rough experimental way for the
brave and knowing.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 14 Jun 2021 10:35:04 +0000 (12:35 +0200)]
unconfigured: fix getting swap devices
Previously we used a ugly hack to extract the device from the whole
line returned by passing it to bash's `set`, which assigns remaining
arguments it does not know about (or after "--") to $1, $2, etc.
This is ugly due to:
* not using "--", so it could break easily
* being quite subtle in general, e.g., shellcheck does not likes
unquoted variable expansions, so one would add quotes around
breaking the actual use case
Just use awk to do both the grep and extraction, which is much
clearer to do
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>