Commit Graph

134 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
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
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
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
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
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
44ec1afe88 Do not create pristine snapshot for cloned datasets 2024-02-01 13:43:04 +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
themylogin
68cb874536 Do not leave leftover datasets when installation fails 2024-01-31 23:23:16 +01:00
themylogin
bcb7e87bde Do not copy files when datasets were cloned 2024-01-31 23:23:16 +01:00
themylogin
91592f0c18 Support cloning updated BE datasets 2024-01-31 23:22:16 +01:00
themylogin
f21b96f860 Copy logs on upgrade
(cherry picked from commit 8b9eca2d60)
2024-01-31 23:22:16 +01:00
M. Rehan
7b3f63d5be Fix conditional checking for nvram directory existence in old BE 2024-02-01 00:17:53 +05:00
M. Rehan
2960a08d92 Preserve nvram files of vms across scale upgrades 2024-01-31 06:03:02 +05:00
themylogin
f1a5547ee1 Restore progress reporting accidentally removed by e29b5d5b1c 2023-11-22 12:21:15 +01:00
Andrew Walker
24a95474b0 Fix upgrade path for Core to SCALE (#512)
TrueNAS Core installs by default do not have a /home directory and
so it should be omitted when copying data to new boot environment
on that platform. No attempt is made to copy a non-default /home
configuration because that directory is used in SCALE and may cause
undesired behavior post-upgrade.
2023-10-16 05:14:14 -07:00
Andrew Walker
e500ae81fd rsync home dir to new boot environment on upgrade (#504)
We now store SSH keys for admin user in /home and so we should preserve
it on upgrades.
2023-10-05 11:46:46 -07:00