Hello all, I am unable to boot in my laptop and I will appreciate some help. I am quite new so some of the steps below might not be very sensible.
First of all, I will explain what I did just before shutting off computer:
I installed a few packages like steam, lutriswaydroid and bottles flatpak.
I ran sudo pacman -Syu from the terminal.
I saw a package called virtualbox-host-modules-arch during the upgrade which I did not need, so trying to copy that name I did Ctrl+ C.
The terminal showed failed to execute so I thought the upgrade went fine. But I ran sudo pacman -Syu once again just to be sure.
After a few hours, when I try to boot, the screen would show something like @/boot/efi/initramfs.img not found and then a blue screen saying kernel panic.
What I did next:
From a live environment, I mounted the partitions and chrooted into the system using arch-chroot.
I ran pacman -S mkinitcpio and then mkinitcpio -p linux and I got some errors,
Ctrl + C on a terminal doesn’t copy, it stops the running command. So you basically stopped the upgrade mid-way. To copy in a terminal it is Ctrl + Shift + C.
You made another error, you installed mkinitcpio in the attempt to fix the system. It’s only used by Arch Linux. EndeavourOS uses dracut instead. So to fix it you will need to remove and clean it up.
If in the future you don’t like a package installing on an upgrade, just wait the upgrade out and uninstall it later.
As @cactux mentioned, to modify your installed system from the live-iso you need to ch-root. You can do this with the following guide: Arch-chroot Use the ext4 part of you use ext4 as your root FS or use the BTRFS part of the guide if you use BTRFS.
I haven’t got much experience doing advanced system fixing, so I will learn through this too.
EDIT: sorry @cactux didn’t see you explained how to do the chroot, if I saw that I wouldn’t have posted this.
Assuming you set up chroot correctly according the instructions for your filesystem (Btrfs), once you are inside chroot, post the output of these commands:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=0C20-8B7D /boot/efi vfat fmask=0137,dmask=0027 0 2
/dev/mapper/luks-22bfd97f-b65c-4263-bf90-2e7230cf4ff6 / btrfs subvol=/@,noatime,compress=zstd 0 0
/dev/mapper/luks-22bfd97f-b65c-4263-bf90-2e7230cf4ff6 /home btrfs subvol=/@home,noatime,compress=zstd 0 0
/dev/mapper/luks-22bfd97f-b65c-4263-bf90-2e7230cf4ff6 /var/cache btrfs subvol=/@cache,noatime,compress=zstd 0 0
/dev/mapper/luks-22bfd97f-b65c-4263-bf90-2e7230cf4ff6 /var/log btrfs subvol=/@log,noatime,compress=zstd 0 0
/dev/mapper/luks-9a2a1069-9423-4746-ab34-c85197ae629e swap swap defaults 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0