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>
Thomas Lamprecht [Tue, 25 May 2021 17:51:03 +0000 (19:51 +0200)]
override grub default config via installer
We used to ship our own grub in the installer, originally due to ZFS
support, but we also used it to setup a slightly modified
`/etc/default/grub`. We do not need a self-build grub for technical
reasons like ZFS support anymore, so avoid the need to ship it and
move over deploying the config changes to the installer.
Just write out the whole config, much easier to see what's going on
compared to some `sed` calls.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 25 May 2021 12:34:34 +0000 (14:34 +0200)]
restructure html in repo and installed package
placing the common stuff top-level and the per-product stuff one
directory-level down allows to access all used resources (css,
images) from a common base path without hacking to much around.
Per-product files are always preferred.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-boot-tool now supports configuring grub to boot from the ESPs
the installer creates on all (bootable) disks - use this approach
for zfs installs.
Thomas Lamprecht [Thu, 22 Apr 2021 15:13:44 +0000 (17:13 +0200)]
zfs: assume that all devices are boot devices
the argument "but if someting in raid0 fails all is dead" is true but
misses the point completely, namely:
* firmware is weird and sometimes allows booting only from certain
devices, which we cannot know here
* potentially only the boot partition could be corrupted/broken/...
in which case another dev in the raid 0 could allow successful
booting
In short, we can only win if we use all devices as boot devices, the
512 MiB lost in some devices are negligible, and they resulted in an
uneven storage space distribution.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 26 Mar 2021 14:43:56 +0000 (15:43 +0100)]
fix #3165: start chrony after DHCP client for an opportunistic time-sync
We had reports about problems stemming from skewed clocks during
installation, especially if their time was in the future during
installation and on first real boot got synced up, certs may not be
valid yet, RRD may has written data before that correcting time-sync
went through and errors afterwards, once time jumped back, and lots
of other issues.
So, depend on the modern and nifty, but still small, NTP
implementation `chrony`. Start its daemon just after we asked for a
DHCP lease, as then it can directly try to sync with one of the
(Debian namespaced) NTP pools time server.
In the worst case (no network, no server available) we are as good as
now, but if chrony can sync the time we avoid lots of issues and
breakages
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dylan Whyte [Fri, 11 Dec 2020 07:55:52 +0000 (08:55 +0100)]
installer: minor language fixup
just some nitpicky changes.
v2:
- remove tag files
@Thomas: Like you thought, they are autogenerated by some vim plugin.
They usually sit quitely in the untracked files, but this time, I guess
I somehow I managed to add them in without noticing.. Apologies!
Stoiko Ivanov [Tue, 10 Nov 2020 14:15:30 +0000 (15:15 +0100)]
set the keymap on the installer console
this patch partially reverts 8bc528041ba85e1b9bd4c17638a2302088bc19ce
by writing /etc/default/keyboard and running `setupcon` in the background
the delay should not harm the UX in the installer
Stoiko Ivanov [Tue, 10 Nov 2020 14:15:29 +0000 (15:15 +0100)]
add run_in_background
certain tasks done during the installer need not block the GUI (e.g. setting
the keymap of the console, to have the correct one set in the shell on vt3)
and take a longer time.
This patch adds a simple run_in_background method, which forks and runs the
provided code in the child. Before exiting the children get reaped.
Stoiko Ivanov [Tue, 10 Nov 2020 14:15:28 +0000 (15:15 +0100)]
memorize keyboard layout selection
currently when using the previous/next buttons the keyboard layout gets
defined based on the detected/selected country, even if it was set to a
different value explicitly.
This patch changes the behaviour to only update the layout and set it in
the installer if it got actively changed, or if a different country was
selected
Oguz Bektas [Mon, 9 Nov 2020 15:17:30 +0000 (16:17 +0100)]
don't configure vt keyboard during installation
in create_country_view() when setting the keyboard config
setupcon is too slow, causing installer to hang for some
seconds when switching to/from country view.
setxkbmap is enough during the installation (next step
password & email works fine with different keymaps), vt
is largely unused during it anyway.
fix #3093: allow to automatically reboot on installation success
Only auto reboot if no error happened.
default to on, as this is normally wanted behavior - the success
screem does not allow to do anything else anyway, and the IP address
gets then also showed as issue banner after that reboot.
show some countdown (it's set to 5 seconds, but due some internal
delay it more like 3s)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Having a shell waiting on vt3, it improves user experience if it has the
same keyboard map as the X11 installer.
This is accomplished by setting the contents of '/etc/default/keyboard' and
then running `setupcon`. Simply calling `loadkeys` would not work, since the
keymaps in debian are generated from the x11 definitions by ckbcomp and then
saved in '/etc/console-setup/'.
currently the installer prepares the ESP disks for ZFS, irrespective of the
boot-mode (EFI, legacy) - in order to enable users to change the boot-mode
in the BIOS and keep the system bootable.
This patch updates /etc/kernel/cmdline in both boot-modes, which is necessary
to make the system actually bootable (else the systemd-boot config uses
the cmdline from the installer).
we now can create a datastore on new disk(s) over api/ui so a
default datastore on the root mountpoint makes no sense anymore.
partially reverts commit ca74501dce14088005bd4a998bfe2d25ca5881f6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 24 Apr 2020 13:17:26 +0000 (15:17 +0200)]
unconfigured: make agetty listen on tty9
it's a bit brittle and login is weird (enter root user twice, pw
doesn't matters) and once exited it's gone, but it's just for
"emergency debugging" anyway
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>