PDA

View Full Version : Restoring GRUB2 after windows installation with root on LVM



iteDarkn
21st November 2017, 07:29 PM
I have been stuck for a day now trying to get GRUB2 to work, followed many tutorials sadly almost all of them were based on Ubuntu and keep getting stuck at the very end when I have to fill in the "sudo update-grub # now update grub" command, I know fedora doesn't support it but the equivelant of it does nothing..

I have BIOS, I am using the live cd with Fedora 26. I have seen several suggestions that its easier to do when you use the 4gig DVD ISO instead but I want to learn how to do it this way.
Here is I think relevant info about my ssd drive :

fdisk -l :

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 303683583 303681536 144.8G 7 HPFS/NTFS/exFAT
/dev/sda2 303683584 305780735 2097152 1G 83 Linux
/dev/sda3 305780736 488396799 182616064 87.1G 8e Linux LVM




Disk /dev/mapper/fedora-root: 35.1 GiB, 37660655616 bytes, 73555968 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


Disk /dev/mapper/fedora-swap: 12 GiB, 12884901888 bytes, 25165824 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


Disk /dev/mapper/fedora-home: 40 GiB, 42949672960 bytes, 83886080 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


Disk /dev/sdb: 3.8 GiB, 4012900352 bytes, 7837696 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: dos
Disk identifier: 0x004f9c01

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 7837695 7835648 3.8G c W95 FAT32 (LBA)


Disk /dev/loop0: 1.3 GiB, 1419264000 bytes, 2772000 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


Disk /dev/loop1: 6 GiB, 6444548096 bytes, 12587008 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


Disk /dev/loop2: 512 MiB, 536870912 bytes, 1048576 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


Disk /dev/mapper/live-rw: 6 GiB, 6444548096 bytes, 12587008 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


Disk /dev/mapper/live-base: 6 GiB, 6444548096 bytes, 12587008 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

iteDarkn
21st November 2017, 07:29 PM
pvdisplay :

File descriptor 29 (/dev/rfkill) leaked on pvdisplay invocation. Parent PID 2488: bash
--- Physical volume ---
PV Name /dev/sda3
VG Name fedora
PV Size 87.08 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 22291
Free PE 0
Allocated PE 22291
PV UUID AGQoO4-Ce7T-RfwY-3BLm-2RcB-JXj0-3b3ZyW


vgdisplay :

File descriptor 29 (/dev/rfkill) leaked on vgdisplay invocation. Parent PID 2488: bash
--- Volume group ---
VG Name fedora
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 87.07 GiB
PE Size 4.00 MiB
Total PE 22291
Alloc PE / Size 22291 / 87.07 GiB
Free PE / Size 0 / 0
VG UUID BLQ2bP-WDuZ-zhMA-fopt-aekH-U2eB-ioLgNZ

Another thing I dont unsterstand is some guides said to install grub2 on dev/sda or the partition the computer first boots in. I thought it was /boot located in /dev/sda2 in my case.
I did install windows first then fedora then formated windows partition and installed windows again.