Long story short: On a dual boot system Windows messed up my EndeavourOS drive’s partition table, so I have no GRUB and no way to boot Arch. I’m still able to mount from a bootable USB so I’m doing a /home backup to reformat the drive and reinstall EndeavourOS. I guess I can still chroot but I’m waiting for the backup to finish.
Is there a way I can get a list of my installed packages without access to pacman for when I do a fresh install?
Also kind of offtopic: Any suggestions backup-wise? Should I copy anything else from the partition other than /home?
Edit 1: Forgot to mention, the same thing for AUR packages installed through yay, if possible?
Edit 2: Since some of you suggested fixing GRUB before reinstalling, I think I will try to pick the correct partition table first after I backup everything, then try to reinstall GRUB and hope for the best. I’ll leave my gdisk outputs below in case somebody knows what’s wrong. Thank you all for the help either way
gdisk output:
[liveuser@eos-2023.03.26 ~]$ sudo gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.9.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: present
Found valid MBR and GPT. Which do you want to use?
1 - MBR
2 - GPT
3 - Create blank GPT
When I select MBR:
Disk /dev/nvme0n1: 1953525168 sectors, 931.5 GiB
Model: Samsung SSD 970 EVO Plus 1TB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 1A0E603E-51F0-4487-B502-11E625DF814E
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 211840366 sectors (101.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 1426096128 1427144703 512.0 MiB 0700 Microsoft basic data
2 1427144704 1741717503 150.0 GiB 0700 Microsoft basic data
5 32768 1426096126 680.0 GiB 0700 Microsoft basic data
When I select GPT:
Disk /dev/nvme0n1: 1953525168 sectors, 931.5 GiB
Model: Samsung SSD 970 EVO Plus 1TB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): A9089CC8-91CB-4A00-AB2F-F39D643718A8
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 211807631 sectors (101.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 34 2081 1024.0 KiB 4201 LDM metadata partition
2 2082 32767 15.0 MiB 0C01 Microsoft reserved ...
3 32768 1426096127 680.0 GiB 4200 LDM data partition
4 1426096128 1427144703 512.0 MiB EF02
5 1427144704 1741717503 150.0 GiB 8300
In GPT, the “LDM (meta)data partition” is the same as when Windows changed the drive to dynamic, so I’ll probably keep the MBR partition and reinstall GRUB through arch-chroot.