You are not logged in.

#1 2021-06-16 21:39:49

boredhero
Member
Registered: 2020-10-14
Posts: 23

Issues with pacstrap installing out of date packages on custom ISO

Hey,

      I have built a custom ISO following the archiso instructions on the wiki. My company uses arch for some of our machines and it's nice to have a branded installer that consistently installs the same things on lots of machines, so I embedded my install script into the iso. This has been working fine and i've been making new builds about every month, but my recent builds seem to have an issue. For some reason pacstrap is trying to install hwids-20201207 despite the fact that the most recent version is hwids-20210613. I thought maybe my releng folder had somehow gotten out of date so I made a fresh copy and embedded my script and name modifications into that, but the same issue still occurs. Running pacman -Syu before pacstrap hasn't helped this. Pacman and/or pacstrap will freeze during the install while trying to download hwids-20201207 and then eventually spit out a bunch of errors about servers not having that package (duh, it's ancient). It then fails to install the packages and crashes and reboots. Here's the first part of my install script where the issue occurs (the second part is a seperate script due to the need to copy it over and then run it in chroot) Any thoughts on what causes this? I tried googling and searching the forums but there doesn't seem to be anyone else with this issue that I can tell.

Here's my install scripts if it helps

non-chroot script

#!/bin/bash
timedatectl set-ntp true
sgdisk --zap-all /dev/sda
sgdisk -g -n 1:1MiB:512MiB -t 1:ef00 -c 1:"EFI System Partition" /dev/sda
sgdisk -n 2:513MiB:4608MiB -t 2:8200 -c 2:"Linux Swap Partition" /dev/sda
sgdisk /dev/sda -N 3 -t 3:8304 -c 3:"Company Name"
mkfs.fat -F32 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
yes | mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt
mkdir -p /mnt/boot
mount /dev/sda1 /mnt/boot
pacstrap /mnt base base-devel linux-lts linux-firmware dhcpcd # Things go wrong here
genfstab -U /mnt >> /mnt/etc/genfstab
cp fgchroot.sh /mnt/
chmod +x /mnt/fgchroot.sh
# Some other scripts are also downloaded and copied over at this point as well, but they aren't related to this issue
arch-chroot /mnt ./fgchroot.sh
# The reboot is here because after exiting out of chroot it returns here and reboots. This has always worked just fine for like half a year
sudo reboot now

chroot-script

hwclock --systohc
# A locale gen file is downloaded from our company's server here
cp -r locale.gen /etc/locale.gen
rm -rf locale.gen
locale-gen
hostnamectl set-hostname companyname
echo '127.0.0.1 localhost' >> /etc/hosts
echo '::1 localhost' >> /etc/hosts
echo '127.0.1.1 companyname.localdomain companyname' >> /etc/hosts
pacman -Sy --noconfirm
pacman -S --noconfirm --needed linux-firmware dhcpcd networkmanager nano sudo fakeroot binutils make termite autoconf automake gcc pkgconf wget noto-fonts openssh xfce4 
# a prebuilt version of yay is downloaded from our company's server here
sudo pacman -U --noconfirm yay-10.2.3-1-x86_64.pkg.tar
rm -rf yay-10.2.3-1-x86_64.pkg.tar
systemctl enable NetworkManager.service
passwd
pacman -S --noconfirm grub efibootmgr os-prober
mkdir -p /boot/EFI
mount /dev/sda1 /boot/EFI/
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=company_name --recheck
sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/' /etc/default/grub
echo 'GRUB_HIDDEN_TIMEOUT_QUIET=true' >> /etc/default/grub
grub-mkconfig -o /boot/grub/grub.cfg
sed 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers > /etc/sudoers.new
export EDITOR="cp /etc/sudoers.new"
visudo
rm /etc/sudoers.new
useradd -m -g users -G wheel -s /bin/bash companyname
passwd companyname
# Other scripts are downloaded and executed to install specific proprietary drivers here
# A getty script is downloaded and setup here to launch our company's software rather than a desktop environment (the xfce earlier only exists for debugging reasons)
exit 0

Offline

#2 2021-06-16 22:25:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: Issues with pacstrap installing out of date packages on custom ISO

Fix your mirrorlist to use one that is actually up to date.

Offline

#3 2021-06-18 20:20:12

boredhero
Member
Registered: 2020-10-14
Posts: 23

Re: Issues with pacstrap installing out of date packages on custom ISO

V1del wrote:

Fix your mirrorlist to use one that is actually up to date.

This did it! Thanks so much!

Offline

#4 2021-06-18 22:15:40

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: Issues with pacstrap installing out of date packages on custom ISO

Please remember to mark your thread [SOLVED] (edit the title of your first post).


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB