From: Ian Kelling Date: Tue, 3 Dec 2024 09:30:25 +0000 (-0500) Subject: minor fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=230a69192033d8b7421cf7ff868e5f9173490ccb;p=automated-distro-installer minor fixes --- diff --git a/fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE b/fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE index 9579b1a..7009cb0 100644 --- a/fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE +++ b/fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE @@ -8,7 +8,7 @@ deb-src http://archive.ubuntu.com/ubuntu/ noble main universe multiverse restric ###### Ubuntu Update Repos deb http://archive.ubuntu.com/ubuntu/ noble-security main universe multiverse restricted deb http://archive.ubuntu.com/ubuntu/ noble-updates main universe multiverse restricted -deb http://archive.ubuntu.com/ubuntu/ noble-backports main universe restricted +deb http://archive.ubuntu.com/ubuntu/ noble-backports main universe multiverse restricted deb-src http://archive.ubuntu.com/ubuntu/ noble-security main universe multiverse restricted deb-src http://archive.ubuntu.com/ubuntu/ noble-updates main universe multiverse restricted -deb-src http://archive.ubuntu.com/ubuntu/ noble-backports main universe restricted +deb-src http://archive.ubuntu.com/ubuntu/ noble-backports main universe multiverse restricted diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index ec23344..393c730 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -188,7 +188,7 @@ fi bpart() { # btrfs a partition case $raid_level in - 0) mkfs.btrfs -f $@ ;; + 0) mkfs.btrfs -f $raid_metadata_arg $@ ;; *) mkfs.btrfs -f -m raid$raid_level -d raid$raid_level $@ ;; esac } @@ -382,8 +382,8 @@ EOF /dev/mapper/crypt_dev_ata-ST6000DM001-1XY17Z_Z4D29EBL-part1 /mnt/rust2 btrfs nofail,$fstabstd,noatime,compress=zstd,subvolid=0 0 0 EOF fi - fi fi +fi } @@ -528,6 +528,30 @@ if (($(nproc) > 2)); then mopts=,compress=zstd fi +# Use conservative btrfs mount settings for single disk x200. I got this +# error below on intel drive and I had several errors on a crucial +# enterprise drive after sudden power off due to low battery. +# +# nodiscard based on +# https://lore.kernel.org/linux-btrfs/d76a88d8-4262-4db4-88fd-d230139a98e0@gmx.com/ +# +# flushoncommit based on the man page info it sounds sensible. +# +# Nov 25 07:28:04 x3 kernel: BTRFS error (device dm-4): bad tree block start, mirror 1 want 358059982848 have 12696086966779840503 +# Nov 25 07:28:04 x3 kernel: BTRFS error (device dm-4 state A): Transaction aborted (error -5) +# Nov 25 07:28:04 x3 kernel: BTRFS: error (device dm-4 state A) in btrfs_drop_snapshot:6162: errno=-5 IO failure +# +# +# smartctl -a /dev/sda +# .... +# Model Family: Intel S4510/S4610/S4500/S4600 Series SSDs +# Device Model: INTEL SSDSC2KB038T7 +# Firmware Version: SCV10150 + +if [[ $HOSTNAME == x[23] ]]; then + mopts=,nodiscard,flushoncommit +fi + declare -A disk_excludes if ! $mkroot2 && ! $mkroot2tab && ! $mktab ! ifclass USE_MOUNTED; then ## ignore disks that are mounted, eg when running from fai-cd @@ -723,9 +747,16 @@ done first_boot_dev=${boot_devs[0]} even_raid=false -if ifclass RAID0 || (( ${#boot_devs[@]} == 1 )); then +if (( ${#boot_devs[@]} == 1 )); then raid_level=0 raid_duplication=1 +elif ifclass RAID0; then + raid_level=0 + if (( ${#boot_devs[@]} >= 3 )); then + # Default is raid1 metadata for >=2 devices, but metadata is <.5% + # data use, so lets increase that redundancy. + raid_metadata_arg="-m raid1c3" + fi elif ifclass RAID1 || (( ${#boot_devs[@]} == 2 )); then if (( ${#boot_devs[@]} == 2 )); then even_raid=true diff --git a/fai/config/package_config/DEBIAN b/fai/config/package_config/DEBIAN index e3ced93..f66232b 100644 --- a/fai/config/package_config/DEBIAN +++ b/fai/config/package_config/DEBIAN @@ -1,3 +1,14 @@ +# DEBIAN.gpg was originally just: +# pub rsa4096/2BF8D9FE074BCDE4 2013-07-30 [SC] +# B11EE3273F6B2DEB528C93DA2BF8D9FE074BCDE4 +# uid [ unknown] Thomas Lange +# uid [ unknown] Thomas Lange +# sub rsa4096/3EE0AA36517A03DA 2013-07-30 [E] +# +# I added all the keys from a bookworm chroot etc/apt/trusted.gpg.d/*, which are the generated distro keys from debian 10-12 by importing them then exporting with +# gpg --export debian-release@lists.debian.org ftpmaster@debian.org lange@debian.org >DEBIAN.gpg + + # otherwise sshd takes like 10 seconds to start. # not sure if this applies to bullseye or just buster, installing it so i dun have to worry. PACKAGES install BUSTER BULLSEYE BOOKWORM diff --git a/fai/config/package_config/DEBIAN.gpg b/fai/config/package_config/DEBIAN.gpg index 0d5b7a9..49eefc0 100644 Binary files a/fai/config/package_config/DEBIAN.gpg and b/fai/config/package_config/DEBIAN.gpg differ