How to rescue my Fedora installation?
OK, I'm out of ideas here. I have a Thinkpad T470 that came pre-installed with Windows 10 x64 and I installed Fedora 27 in a dual-boot configuration. I didn't really configure much. the Fedora 27 live-installer did it and I was glad that it worked. All was great, really enjoyed Fedora on the desktop, upgraded to F28 a few weeks ago, no issues.
Today I felt like dual-booting into Windows and...maybe an OS update did something to my bootloader - I don't know. But now my laptop boots straight into Windows every time I turn it on. No GRUB, no nothing. I can boot from USB (writing this with the F28 live-installer booted), but I'm unable to get it to boot from the disk again :-\
The hard disk is an integrated Samsung PM981 (NVMe), the partition table looks somewhat messy - remember, Windows 10 pre-installed, and then F27 install-magic did the rest:
# fdisk -l /dev/nvme0n1 Disk /dev/nvme0n1: 953.9 GiB, 1024209543168 bytes, 2000409264 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: F1EDA8B2-AB20-45E1-952B-071FDB96900E Device Start End Sectors Size Type /dev/nvme0n1p1 2048 534527 532480 260M EFI System /dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved /dev/nvme0n1p3 567296 264194047 263626752 125.7G Microsoft basic data /dev/nvme0n1p4 1998360576 2000408575 2048000 1000M Windows recovery environment /dev/nvme0n1p5 264194048 264726527 532480 260M EFI System /dev/nvme0n1p6 264726528 1993637887 1728911360 824.4G Linux filesystem /dev/nvme0n1p7 1993637888 1998356479 4718592 2.3G Linux swap
I don't really understand why I have two EFI partitions (p1
and p5
), but that's the way it is. The partitions can be mounted and read from (no hardware errors, really!), even p6
(where F28 is installed) can be mounted just fine, so the data is still there. But I really want to have it boot again.
Still in the F28 live-installer, I tried to re-install grub2
:
# mount -t xfs /dev/nvme0n1p6 /mnt/ # mount -t vfat /dev/nvme0n1p1 /mnt/boot/efi/ # mount -t proc proc /mnt/proc/ # mount -t sysfs sysfs /mnt/sys/ # mount -t devtmpfs dev /mnt/dev/ # mount -t devpts devpts /mnt/dev/pts/ # chroot /mnt chroot% grub2-install /dev/nvme0n1 Installing for i386-pc platform. grub2-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible. grub2-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. grub2-install: error: will not proceed with blocklists.
Out of desparation I used --force
and the command came back w/o errors, but it still would not boot.
I found some tutorials online and both looked very promising. But F28 has CONFIG_EFI_VARS=n
and efibootmgr
always comes back with:
> EFI variables are not supported on this system.
The 2nd tutorial mentioned to boot the live-image in UEFI
mode, but I haven't figured out ...