Commit Graph

979 Commits

Author SHA1 Message Date
Thomas Lamprecht
980c69bf7c pbs: disable bridged network
We do not host any guests or the like here, so a bridged setup is nor
really required. Disable it for now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-06 12:07:37 +01:00
Thomas Lamprecht
731e8a306b PBS: drop obvious alpha from SVG banner
If, we want to display the version (ISO name?) in a dynamic way for
all products.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-06 12:04:08 +01:00
Oguz Bektas
53748662fe adapt installer for pbs alpha build
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2020-02-06 11:56:43 +01:00
Thomas Lamprecht
8ee12a1c34 drop unused policy-disable-rc.d
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-01 14:34:31 +01:00
Stoiko Ivanov
56510a1989 umount testdir recursively in check-* and clean
recursively unmount testdir before removing it. This prevents the subsequent
call to try to remove files in potentially still bindmounted /proc, /sys, /dev
filesystems.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-11-29 16:05:06 +01:00
Dominik Csapak
c82fffd868 restrict admin email to same format as the JSONSchema
Use the same regex as the 'email' format in JSONSchema (copied from there).
Otherwise, users can enter an email address which does not match our
schema and breaks the userlist API Call with a 'return value
verification failed', and one cannot rectify this via the gui
(the user has to manually edit the user.cfg or set the email via
pveum)

i noticed this while testing and using the 'insert emoji' menu in the
context menu

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-28 14:08:05 +01:00
Thomas Lamprecht
b3afd5d162 bump version to 6.1-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 19:20:51 +01:00
Thomas Lamprecht
57a0306918 followup: add fixme comment with buglink for dosfstools cluster size issue
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 19:17:26 +01:00
Stoiko Ivanov
e1b490865f use by-id paths for all vdevs on pool creation
currently only the first vdev of a ZFS rpool gets created with the stable
/dev/by-id paths, all later vdevs (in a RAID0 or RAID10 setup) are left as
sdX.

By iterating over all disks in the pool and replacing their occurence with
their by-id path we get consistent and recommended names for all vdevs.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-11-27 19:17:26 +01:00
Stoiko Ivanov
34e4499419 wipe partitiontable after early exits
by wiping the partition table after the initial sanity checks regarding
minimal size and blocksize of the device, no data is destroyed for an
install that would fail in any case.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-11-27 19:17:26 +01:00
Stoiko Ivanov
5ea943cf82 fix #1211: allow install on 4kn disks
Installation on disks with 4k logical blocksize (4kn) failed, because
the bios_boot (a.k.a. gdisk partitiontype EF02, place for grub in
legacy BIOS boot mode) partition is created using start and end
sectors (and sector 2047 is not at 1M, where the ESP starts)

This patch addresses the issue by not creating the bios_boot
partition on 4kn disks at all - legacy boot from 4kn disks is not
supported by most BIOS implementations and grub does not support it
[0].

Checks for 4kn disks, when booted in legacy mode are added, and
prevent from leaving the harddisk selection page, if an not bootable
selection was made.

The partition numbering was kept (esp is partition 2, data is
partition 3, for consistency with other installations)

If any of the bootable disks is 4kn then the installation of the grub
legacy installation is skipped altogether.

Additionally the invocation of mkfs.vfat needs to add the parameter
'-s1' to create a bootable ESP on 4kn disks.
For a 512M vfat partition on a 512n or 512e disk, mkfs.vfat
calculates a default value of 8 sectors per cluster. For a 512M
partition on a 4kn disk, we need to scale this by 512/4096=8 and
explicitly set '-s' to 1 accordingly, since the calculation in
mkfs.vfat is brokenly assuming 512b sectors[1].

Tested with a qemu-machine by passing
'logical_block_size=4096,physical_block_size=4096' to the disk's device lines
and installing in UEFI and legacy booted mode:
* ZFS RAIDZ1
* ZFS single-disk
* ZFS RAID10 (in legacy mode grub fails to install, if any 4kn disk is in the
  pool, even if it's not in the first vdev)
* EXT4

[0] http://savannah.gnu.org/bugs/?46700
[1]: https://github.com/dosfstools/dosfstools/issues/111

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 19:15:26 +01:00
Stoiko Ivanov
5ff5a8d03c linewrap bootdevinfo generation
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-11-27 18:59:51 +01:00
Stoiko Ivanov
17fd908e93 add logical_blocksize to hd_list infos
in preparation for 4kn installer support add the logical_blocksize to each
disk found.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-11-27 18:59:51 +01:00
Stoiko Ivanov
69f2883cba expand comment on /sys/block/$dev/size
/sys/block/$dev/size is also given in 512b sectors even for 4kn disks.

Since it surprised me - mention it explicitly in the comment

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-11-27 18:59:51 +01:00
Thomas Lamprecht
860f938def bump version to 6.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-20 10:35:52 +01:00
Stoiko Ivanov
29da2d423b ensure /etc/aliases.db is generated
postfix relies on /etc/aliases.db for forwarding mail, without this file
all mails get deferred. (see `man newaliases`)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-23 18:16:44 +02:00
Stoiko Ivanov
b0f2ae3809 raise postifx main.cf compatibility_level to 2
otherwise a warning was issued (when missing /etc/aliases.db) that the system
is using the backward compatible setting of $mydestination for $relay_domain
(see [0]).

[0] http://www.postfix.org/COMPATIBILITY_README.html#relay_domains

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-23 18:16:44 +02:00
Thomas Lamprecht
0b4a801df9 bump version to 6.0-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-08-17 10:31:51 +02:00
Dominik Csapak
ba741e5d1c fix #2313: load country.dat file with utf8 encoding
this fixes the display and selection problem with countries that
have non-ascii symbols in them, like "Côte d'Ivoire"

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-08-12 17:36:37 +02:00
Thomas Lamprecht
be1a181eff bump version to 6.0-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-25 12:40:50 +02:00
Fabian Grünbichler
bcde5d7b56 efiboot: remove redundant call to zz-pve-efiboot
this is already done by 'pve-efiboot-tool init'

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-23 18:35:06 +02:00
Fabian Grünbichler
1f8429eb92 handle bootloader installation errors gracefully
by collecting them, but proceeding with the rest of the installation. it
is possible that only either legacy or EFI boot fails, and even if both
do, manually fixing the bootloader setup by booting a live CD is very
often possible.

still display the error screen at the end if bootloader setup was not
successful, so that expectations are not set too high..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-23 18:35:06 +02:00
Thomas Lamprecht
3bcac16b25 success: show real final IP addr with port
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-16 15:07:51 +02:00
Thomas Lamprecht
9b9ce0e2cb bump version to 6.0-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 19:22:56 +02:00
Thomas Lamprecht
795e7ee5f0 use pve-efiboot-tool for systemd boot ESP preparation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 23:35:22 +02:00
Thomas Lamprecht
4566af04f7 prompt user if a vgrename is OK for exisiting 'pve'/'pmg' VGs
If one has a 'pve' VG on a disks not selected as install target
(e.g., on re-installation to different disk or if putting a used disk
into another server where PVE was installed on) the vgcreate call
errored out, as for creation the VG names must be unique.

Cope with that by asking the users if a rename to a
'<vgname>-OLD-<short-uid>' name is OK in this case. It ensures that
no data is lost and that we can safely continue with the
installation. The admin can then later on wipe the renamed VG if it
was really decommissioned or save data from it (or actually use it)

This can cope (tested) with:
* a single 'pve' VG on another device
* a single 'pve' VG spanning multiple devices
* multiple 'pve' VGs spanning different sets of devices

This is achieved by using the VG UUID for rename, and by recording
all PVs with said UUID as index.

Note, while this commit message talks mostly about 'pve' VG the patch
itself is actually agnostic of the specific name, works for 'pmg' and
possible (future) other VG names too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-09 21:52:41 +02:00
Stoiko Ivanov
a346a962db copy /etc/hostid from installer root to target
/etc/hostid is used by ZFS (spl.ko) to determine which host last imported a
pool creating and importing a pool with one hostid during install and booting
with a different one (or none) leads to the system refusing to import the pool
see spl-module-parameters(5) and zpool(8).

by copying the /etc/hostid from the installer into the target system we ensure
that it stays consistent

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-07-09 19:10:25 +02:00
Stoiko Ivanov
72d2dcd00f fix #1603: create a new and unique machine-id
see machine-id(5). The machine-id serves as a partial replacement to the hostid
(gethostid(3)) used by systemd and should be unique.

By generating a new one with `systemd-id128 new` (see machine-id(5),
sd-id128(3)) after the installation the newly installed system gets a unique
one.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-07-09 19:10:25 +02:00
Thomas Lamprecht
dea730ea4c also umount efivars and minor improvements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-08 18:03:25 +02:00
Thomas Lamprecht
f238dd03ab mount efivarfs to ensure we can read bigger variables
In short, EFI variables can get quite big, and the old sysfs
interface was made for when they couldn't. A few firmwares out there
have such big variables, and if those are accessed through the sysfs
backed interface one gets a "Input/Output Error". 'grub-install'
chokes on that error when it iterates over all variables to do it's
stuff, and thus fails our installation. When we mount the efivarfs,
which does not has this limitations, one can read all variables just
fine - at least as long as the NVRAM backing them is not broken.

from Linux Kernel Documentation/filesystems/efivarfs.txt:
> The efivarfs filesystem was created to address the shortcomings of
> using entries in sysfs to maintain EFI variables. The old sysfs EFI
> variables code only supported variables of up to 1024 bytes. This
> limitation existed in version 0.99 of the EFI specification, but was
> removed before any full releases. Since variables can now be larger
> than a single page, sysfs isn't the best interface for this.
> Variables can be created, deleted and modified with the efivarfs
> filesystem.

Also mount it in the installer environment for debugging purpose.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-08 16:21:07 +02:00
Thomas Lamprecht
3befbf9770 underline that we detected less than 1024 MB of *useable* memory
firmwar, kernel, and some PCI(e) devices can use some memory, which
then is not available for userspace, thus the total memory installed
for this server normally differs at least about 50 MB from the
useable one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-05 15:43:04 +02:00
Thomas Lamprecht
2f4aa276e9 hd_list: skip all devices with iso9660 as FS
This ensures that when booting from a USB stick, or similar device,
we do not show that device in the "Target Harddisk" selector.

While there may be some constructed cases where this actually worked
and was wanted, e.g., one created a partition on the end of a USB
storage device, put the ISO on that and used the beginning of that
device as target, I'd say that even if that worked with luck, it's
better not actively not support it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-05 15:21:12 +02:00
Thomas Lamprecht
0fbecc5e35 bump version to 6.0-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 18:12:15 +02:00
Thomas Lamprecht
438d2f6105 summary: s/drive/drive(s)/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 18:12:15 +02:00
Thomas Lamprecht
18a9811ee5 add $product_fullname hash and use it
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-03 10:21:49 +02:00
Thomas Lamprecht
ca951e7724 followup: refword, coding style and do not die
If a user really want's to try it, why not.
Also, no point in dividing by 1024 if we have a less-than operator

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-03 07:37:57 +02:00
Oguz Bektas
2b85ee1b31 abort installation if memory is less than 1GB
show a message on screen about memory requirement, then die and abort
the installation. (Note: followup removes the die again - Thomas)

The "magical" limit seems around 850 - 900 MiB memory needed, it's
a bit strange, as we do not need that much, proxinstall + webkit +
base system are around 300 MiB, the rest is page cache, but it seems
that the memory pressure gets to big.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-03 07:34:00 +02:00
Thomas Lamprecht
2780ea4fe3 fix typo: s/virtualisation/virtualization/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-03 07:33:51 +02:00
Stoiko Ivanov
e1fdd3d069 use by-id diskpath for zpool create
With the recent fixes to the installers initial /dev creation, the installer
and the kernel should now have the same view on the created devices and links
2019-07-03 06:29:05 +02:00
Stoiko Ivanov
063ae64af3 clear zpool labels on selected disks' partitions
along with `pvremove -ff` and writing zeroes to the first 16M of all
partitions, which belong to disks selected in the installer run `zpool
labelclear`.

This prevents a failure to boot after installation, if the disks were
previously also used as a zpool called rpool, but in a different configuration
(e.g. installing a raidzX first and then changing to raid10).
2019-07-03 06:28:54 +02:00
Thomas Lamprecht
091c347599 followup: reword summary sentence a bit
change the really short sentence to something with more "reading
flow"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-02 14:15:28 +02:00
Oguz Bektas
64683b9551 align lines in summary screen
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-07-02 14:00:10 +02:00
Thomas Lamprecht
f2afc0fc4a followup: only do zz-pve-efiboot if ZFS and EFI is used, for now
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-01 22:36:59 +02:00
Stoiko Ivanov
03c686b77e update systemd-boot config after initializing esps
run the kernel-postinst hook once (like we do for update-grub) instead
of once per ESP. This fixes an error (the hook does not write entries for
mounted partitions), and save quite a bit of (un)mounting and copying in case
of multiple ESPs

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-07-01 22:20:01 +02:00
Thomas Lamprecht
1cd1a8b994 bump version to 6.0-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-28 14:03:28 +02:00
Thomas Lamprecht
597db5de5a refactor out prepare_grub_efi_boot_esp code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-28 13:02:27 +02:00
Thomas Lamprecht
4fb6ac6041 minor coding style cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-28 13:02:08 +02:00
Thomas Lamprecht
e691666e36 depreacate grub_platform variable, replaced by $boot_type
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-28 13:01:26 +02:00
Stoiko Ivanov
e38884af03 add support for ZFS on EFI
use systemd-boot in case of ZFS on EFI and prepare the ESPs of all bootable
devices by installing systemd-boot to them
2019-06-28 12:35:31 +02:00
Thomas Lamprecht
5da2ffd1db bump version to 6.0-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-25 10:28:25 +02:00