Hi, for a couple of months I ran a dualboot with windows, but a couple of days ago i decided to increase the size of the linux partition (I struggled a bit but in the end I managed to do it). This caused every time i booted up my system to show error unknown filesystem. entering rescue mode grub rescue> so every time I had to type set root, set prefix… To fix that I found online to run this two commands: sudo grub-mkconfig -o /boot/grub/grub.cfg sudo grub-install --recheck --disk-module=native /dev/sda which the second outputted something like no problems found. But this fucked something up because every time i boot up the system I have: error: no such device: error: disk ``' not found. Entering rescue mode... grub rescue>
Idk what to do luckily I’ve been able to run a live usb and also to access the files on my laptop.
Thanks in advance for any help.
Judging by the output, you have a GPT disk and an installation in UEFI mode.
The grub-install command that you have run before is aimed for Legacy/Bios installations and also seems to be targeting the wrong disk: your live usb rather than the system disk.
You could try reinstalling the Grub’s bootlader in the chroot.
To chroot:
sudo mount /dev/nvme0n1p4 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo arch-chroot /mnt
In chroot:
grub-install
grub-mkconfig -o /boot/grub/grub.cfg
Also check if the UUID for your partitions corresponds to the ones in /etc/fstab.
You could run lsblk -f to get the UUID:s.
If they don’t match, edit /etc/fstab accordingly.
If everything is fine, type exit to quit chroot and reboot.