Commit Graph

147 Commits

Author SHA1 Message Date
Ameer Hamza
8dcd9878d7 Skip creating EFI boot entry on upgrades to avoid NVRAM exhaustion (#984)
The `efibootmgr -c` command always creates a new boot entry rather than
updating an existing one. Prior to commit c6ba53c, the GRUB installation
block only ran on fresh installs. That commit extended it to run on
upgrades when GRUB versions differ, which also caused `efibootmgr -c` to
run on upgrades, creating duplicate TrueNAS-X entries. While firmware
typically cleans up duplicate entries on reboot (as observed on TrueNAS
MINI hardware), EFI NVRAM has limited space and users with NVRAM already
full from other sources reported `No space left on device` error during
updates as creating a new entry fails before the next reboot can clean up.

The boot entry created during fresh installation remains valid across
upgrades since GRUB binaries are updated at the same path
(`/EFI/debian/grubx64.efi`). Only create the boot entry on fresh installs
where `old_root` is None.
2026-02-05 19:45:53 +05:00
Qubad786
5992e3c6c5 Remove incus from build (#907) 2025-12-04 12:09:01 +05:00
themylogin
7d2bb83fde Fix updating from 25.10 (#926) 2025-09-22 18:46:01 +02:00
sonicaj
8e86e2d981 NAS-137225 / 26.04 / Fix scale build for trixie (#925)
* Trixie related changes for scale-build

* Point to HM mirrors

* Update apt preferences for trixie

* Update debootstrap changes for trixie

* Minor fix

* Remove python3 package

* Remove mandatory explicit dep

* Use openjdk-21-jdk for kernel

* Update passwd

* There is no need for custom openssl now

* Move from libssl3 to libssl3t64

* Remove util-linux from build manifest

* Set env variable for spdk

* Don't buidl spdk for now

* ipmctl is not available in stable

* Remove legacy sysv unit stuff

* Comment out netdata for now

* Small umount fix

* Also umount efivars

* Update build manifest to reflect updated branches

* Remove nfs entry from mtree

* Make sure to umount efivars

* Properly have apt sources fixed in update image

* Pull in grub2-common

* Add netdata mirror

* Fix url

* Make sure corepack is non-interactive

* Update netdata groups

* Fix efivars mounting

* Properly use clean_mounts

* Add fixme for netdata

* Properly comment out spdk explicit deps

* Remove grub-efi-amd64-signed from iso

* Make sure efivarfs is definitely mounted

* Bring in isc-dhcp-client for now

* Revert "Bring in isc-dhcp-client for now"

This reverts commit 259ffebba5.

* Only try to umount efivarfs if host is actually efi based

* Update repo's branches
2025-09-19 21:55:20 +05:00
Ameer Hamza
9e87ee3465 Follow up to 79885c5 to fix indentation issue (#917) 2025-09-04 03:07:45 +05:00
Ameer Hamza
7191b53ddc Fix GRUB upgrade for systems missing BIOS partition with variable EFI (#913) 2025-09-03 07:45:46 -04:00
sonicaj
531dcaea20 Send a final event to notify that upgrade/installation completed (#886) 2025-07-10 21:51:38 +05:00
bugclerk
d4b414e93b Revert "Remove legacy VM usages from build" (#879)
This reverts commit 7e91fb8bb6.

(cherry picked from commit 1072fbbc17)

Co-authored-by: M. Rehan <mrehanlm93@gmail.com>
2025-06-23 20:44:04 +05:00
Mark Grimes
6b0d0dee21 Fix typo that could be source of headline issue. (#872) 2025-06-11 05:16:08 -04:00
Andrew Walker
5b7ae38ded Add python version check to truenas_install module (#857)
This commit adds a basic python version check to the truenas_install
module so that we can raise a useful error message if someone
is somehow running the installer in the context of a really old
python version (like in 13).
2025-05-14 13:07:17 -06:00
sonicaj
c6ba53c7e5 Make sure grub binary is updated on ESP if grub version changed (#854) 2025-05-12 16:36:24 +05:00
themylogin
eb9167f61a Fail on FreeBSD before trying to import anything (#841) 2025-04-18 19:31:58 +02:00
mgrimesix
b56062dead Remove 744 mode set on /var/lib/incus. Use the Debian default of 755. (#828) 2025-02-14 08:10:10 -08:00
Qubad786
59863f33c4 Remove legacy VM usages from build (#823) 2025-02-14 17:44:57 +05:00
Caleb St. John
a506fbac05 NAS-133293 / 25.04 / remove psutil from truenas_install (#796) 2024-12-28 16:18:59 -05:00
mgrimesix
b272ff58c7 Save snmp config directory. (#772) 2024-11-22 07:20:42 -08:00
Qubad786
fa080d77bb Change libvirt uid (#746) 2024-11-07 11:17:57 +05:00
William Grzybowski
f6ea817bf9 NAS-130523 / 25.04 / Create /var/lib/incus with "dev" (#745) 2024-10-24 16:03:10 -03:00
themylogin
76434ecf9e Fix unsquashfs error reporting (#741) 2024-10-14 14:45:38 +03:00
Caleb St. John
c155c70d1c fix deprecated service logic (#733) 2024-09-30 14:56:09 -04:00
Andrew Walker
d0febd9b3c Do not clone systemd journal on upgrade (#711)
During the upgrade process its possible for the syslog-ng cursor for
the systemd journal to advance beyond what is present in the newly
cloned logs dataset. This results in syslog-ng re-reading the same
messages and sending them a second time to remote syslog servers, our
audit databases, and local files.

For typical purposes the systemd journal is treated as ephemeral data,
but is not something we want to lose on reboot or upgrade. This means
that volatile storage is undesirable. As a compromise solution that
absolutely prevents duplicate entries we have settled on creating a new
dedicated systemd journal dataset on upgrades. The old journal contents
dataset are preserved in the previous boot environment.

This has the added advantage of allowing us to disable ACL support
on the logs dataset.
2024-09-12 07:23:36 -06:00
Umer Saleem
730b589cb0 Remove noexec permission for /etc (#709)
grub2 installs config generation scripts under /etc/grub.d/. If
update-grub cannot run those scripts, config generation fails and
update-grub errors out.

We should remove noexec for etc dataset. There has been an upstream
ZFS fix that enforces the correct mount options for Linux runtime.
To enable that patch, we should first remove noexec permission for
/etc, otherwise installation would break.

Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
2024-09-09 19:02:20 +05:00
themylogin
5db2017951 Do not use pending uploaded database on the new system 2024-08-30 16:25:51 +02:00
Andrew Walker
2b505e05c0 Preserve the syslog-ng.persist file on upgrades (#701)
The syslog-ng.persist file contains information about last read
systemd journal message which will prevent duplicate audit table
insertions and sending duplicate messages to remote syslog server.
2024-08-28 09:28:36 -06:00
Waqar Ahmed
81e20aef68 Fix upgrades when we have apps running
This commit adds changes to fix upgrades when we have apps running with same processes which we check for removed services.
2024-08-13 12:09:21 +05:00
themylogin
aa3c448833 Do not crash if non-UTF-8 filenames are present in the upgraded BE 2024-07-24 11:49:09 +02:00
Andrew Walker
be17040d84 Fix setting posixacl on logs dataset (#663)
We need to explicitly specify to create with posixacl.
2024-07-11 10:16:37 -07:00
Aiden Baker
419d74c096 Add .vendor to iso 2024-07-11 10:44:44 -04:00
Aiden Baker
b97988103d Minor schema update 2024-06-24 14:49:43 -04:00
Aiden Baker
a9ddfbf2a1 Proper /data/sentinels permissions 2024-06-24 14:41:21 -04:00
M. Rehan
d5c3b3711a Correctly reference entry key 2024-06-02 23:08:59 +05:00
M. Rehan
5b6668f186 Enforce data directory paths and permissions 2024-05-24 01:06:00 +05:00
themylogin
b4fa838aed Do not treat processes ran in jail as part of the system 2024-05-17 20:15:41 +02:00
M. Rehan
9941716bb1 Make changes to correct perms on /data 2024-05-08 23:15:27 +05:00
Andrew Walker
cd8a2deeba Allow systemd to set ACLs on log files (#630) 2024-05-01 13:07:10 -07:00
themylogin
81f9bd6e02 Write /data/post-install.json 2024-04-16 12:32:32 +02:00
M. Rehan
e7ce75c036 Merge pull request #609 from truenas/NAS-127880
NAS-127880 / 24.10 / Make sure we copy over netdata state from previous BE to new BE
2024-04-04 18:32:47 +05:00
themylogin
51d5f07215 Merge pull request #594 from truenas/NAS-127426
NAS-127426 / 24.10 / Use new installer
2024-04-03 19:18:40 +02:00
M. Rehan
f57ba5224d Make sure we copy over netdata state from previous BE to new BE 2024-04-02 21:56:57 +05:00
themylogin
61d736103e Remove legacy BSD-related code 2024-03-15 12:15:58 +01:00
themylogin
8e32cf8d5c Perform database migration right in installer 2024-03-04 13:23:57 +01:00
themylogin
214b0ab4e5 Use new installer 2024-02-22 15:13:49 +01:00
themylogin
9ade226dae Do not pass -exclude-file to unsquashfs on FreeBSD
(cherry picked from commit c55c693fd9)
2024-02-14 12:31:20 +00:00
themylogin
44f5ff3540 Properly cleanup old manifest from the cloned /data directory
(cherry picked from commit 1827421be6)
2024-02-14 11:57:42 +00:00
themylogin
0c6af8f823 Do not create pristine snapshots for /data and /root 2024-02-07 18:35:45 +01:00
themylogin
44ec1afe88 Do not create pristine snapshot for cloned datasets 2024-02-01 13:43:04 +01:00
themylogin
3f015a19aa Update fhs manifest 2024-01-31 23:26:01 +01:00
themylogin
6479060aaf Preserve nvram files of vms across scale upgrades 2024-01-31 23:24:22 +01:00
themylogin
68f4081b26 Umount child datasets on extraction failure. Do not overwrite existing files when extracting squashfs 2024-01-31 23:23:16 +01:00
themylogin
3e366b1e4c Clone datasets using new fhs manifest options 2024-01-31 23:23:16 +01:00