It happened on the first boot with my new kernel. I powered off and it booted normally, and it happened again when I rebooted again to test it.
I have decided to get my kernel the fuck off that EFI partition. I want it on ext4 filesystems. I'm putting it in the root directory of each OS now. (I can easily do that because I manually edit grub.cfg and don't have a distro kernel installed)
All I have to do is put the kernel image in the root directory, and change the UUID in grub.cfg to make the kernel path relative to / instead of /boot in the line that actually loads the kernel and sets the rootfs to boot from (still /vmlinuz-6.13.5). That's the only place I use a UUID, for grub to find the kernel (not to set the rootfs or in fstab), and if I format the partitions, with ext4 I can use tune2fs to change them back to these after formatting so I don't have to edit anything if I restore a tarball snapshot.
Like this:
Code: Select all
menuentry 'Arch Linux' {
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 73ce9b88-c44b-4454-a673-9e111ccc0dfe
linux /vmlinuz-6.13.5 root=/dev/nvme1n1p2 ro mitigations=off split_lock_detect=off loglevel=3
}
menuentry 'Gentoo' {
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root fde6835f-ba29-407c-a345-a5ba24c9435d
linux /vmlinuz-6.13.5 root=/dev/nvme1n1p4 ro mitigations=off split_lock_detect=off ipv6.disable=1
}
I don't need to load a grub filesystem driver for ext4.
So now it's only the boot loader on the EFI partition.
I can still build the kernel once for both OSes, I just need an extra line in my install script to also install the kernel image to the gentoo partition. This is how I install my kernels:
Code: Select all
#! /bin/sh
if [ -f "arch/x86/boot/bzImage" ]; then
read -p "Enter OLDVER or leave blank to skip uninstall: " OLDVER
read -p "Enter NEWVER: " NEWVER
else
echo "You're in the wrong dir or your kernel isn't built"
exit 1
fi
echo "Mounting filesystems CTRL+C to abort 5s"
sleep 5
mount -t vfat -o umask=077 /dev/nvme1n1p1 /boot
mount -t ext4 -o noatime /dev/nvme1n1p4 /mnt/gentoo
if [ -z "$OLDVER" ]; then
echo "Not removing old kernel"
else
echo "Removing old kernel"
rm /vmlinuz-"$OLDVER"
rm /mnt/gentoo/vmlinuz-"$OLDVER"
rm -r /lib/modules/"$OLDVER"
rm -r /mnt/gentoo/lib/modules/"$OLDVER"
fi
if [ -z "$NEWVER" ]; then
echo "That was silly of you"
umount /mnt/gentoo
umount /boot
exit 1
else
echo "Installing Linux $NEWVER"
install -m 600 -o root arch/x86/boot/bzImage /vmlinuz-"$NEWVER" || exit 1
install -m 600 -o root arch/x86/boot/bzImage /mnt/gentoo/vmlinuz-"$NEWVER" || exit 1
make modules_install
make INSTALL_MOD_PATH=/mnt/gentoo modules_install
echo "Opening editor for grub.cfg"
vi /boot/grub/grub.cfg
sleep 1
sync
umount /boot || exit 1
umount /mnt/gentoo || exit 1
echo "/boot and /mnt/gentoo unmounted"
echo "Linux $NEWVER is installed"
fi
I've rebooted both OSes several times and it hasn't malfunctioned, but that doesn't mean I've solved it. I STILL don't want my kernel image on FAT32 even if it's not the problem. It just seems like it's something like that, the way it started happening more frequently than ever, after things were written back to it differently.