You are not logged in.

#1 2020-10-03 17:45:12

Orbital_sFear
Member
Registered: 2014-10-13
Posts: 50

/etc/mkinitcpio.d/linux.preset getting blown away after yay -Syu

Sometimes seemingly randomly when I run yay -Syu, successfully update and power off, my /boot/initramfs-linux.img is gone. It appears that the linux.preset file in /etc/mkinitcpio.d is empty? The fix is relatively simple, boot the arch live iso, copy a backup linux.preset to /etc/mkinitcpio.d, run pacman -S linux and then everything is fine.

It's happened twice on my laptop in the last couple months and this morning on my desktop. I wrote a little system update script to guard against it happening again, but does anyone know what could cause this?

#!/usr/bin/bash

yay -Syu --noconfirm

if [ -f /boot/initramfs-linux.img ] && [ -f /boot/vmlinuz-linux ]; then
    echo "boot looks good"
    exit
fi

echo "Restoring boot"
sudo cp /boot/linux.preset /etc/mkinitcpio.d
sudo pacman -S --noconfirm linux
sudo locale-gen

if [ -f /boot/initramfs-linux.img ] && [ -f /boot/vmlinuz-linux ]; then
    echo "boot recovered"
else
    while true 
    do
        echo "*** boot still broken!!!!"
        sleep 1
    done
fi

Offline

#2 2020-10-03 18:10:26

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,645
Website

Re: /etc/mkinitcpio.d/linux.preset getting blown away after yay -Syu

What is the output of

pacman -Qkk mkinitcpio

Mod note: moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2020-10-03 21:43:06

Orbital_sFear
Member
Registered: 2014-10-13
Posts: 50

Re: /etc/mkinitcpio.d/linux.preset getting blown away after yay -Syu

pacman -Qkk mkinitcpio
mkinitcpio: 81 total files, 0 altered files

Offline

#4 2020-10-04 02:02:43

Orbital_sFear
Member
Registered: 2014-10-13
Posts: 50

Re: /etc/mkinitcpio.d/linux.preset getting blown away after yay -Syu

Here is the output from my laptop which has exhibited this behaviour twice.

backup file: mkinitcpio: /etc/mkinitcpio.conf (Modification time mismatch)
backup file: mkinitcpio: /etc/mkinitcpio.conf (Size mismatch)
mkinitcpio: 81 total files, 0 altered files

Offline

Board footer

Powered by FluxBB