FedoraForum.org - Fedora Support Forums and Community
Page 3 of 3 FirstFirst 1 2 3
Results 31 to 37 of 37
  1. #31
    Join Date
    May 2010
    Posts
    1,058

    Re: installing grub2 to MBR, looking to do this correctly.

    Well if you want to wipe sda1 and sda2, I don't understand why you didn't just wipe the drive and install Fedora clean rather than resizing and moving things around.

    In any event, you also could have left the partitions alone, and use LVM to add those partions to a volume group, and then created however many logical volumes from that group.

  2. #32
    Join Date
    Feb 2012
    Location
    virginia
    Posts
    42

    Re: installing grub2 to MBR, looking to do this correctly.

    Quote Originally Posted by chrismurphy
    Well if you want to wipe sda1 and sda2, I don't understand why you didn't just wipe the drive and install Fedora clean rather than resizing and moving things around.

    In any event, you also could have left the partitions alone, and use LVM to add those partions to a volume group, and then created however many logical volumes from that group.
    Because I spent too much time configuring my system and configuring vmware/wine to do what I need to do for windows programs. I don't have a free weekend in which I can devote.

  3. #33
    Join Date
    Apr 2011
    Location
    Rainham, Essex, UK
    Posts
    319

    Wink Re: installing grub2 to MBR, looking to do this correctly.

    If you are happy to lose your windows installation then yes you can remove sda1 + 2 with the tool of your choice - such as gparted.

    If you want to shift everything to the left you can also do that with gparted - if you have large amounts of data to move then leave it running overnight as it will take a while and only do 1 partition at a time to reduce the potential for large scale breakage

    You've already backed everything up right?

    Only thing to do then is again rerun your grub config to remove the obselete Windows entries.

  4. #34
    Join Date
    May 2010
    Posts
    1,058

    Re: installing grub2 to MBR, looking to do this correctly.

    If I were considering that much effort and time, to either resize/move sda3 so it starts at the beginning of disk, and reclaim all of this space - I would take the opportunity to really fix it.

    Combine sda1 and 2 into a single partition, type 8E, and add it to a volume group, and create appropriate logical volumes from it. I'd then dd sda3 to /dev/mapper/vg_hello/lv_root. And then after I get fstab and grub all sorted out for the new location, and test it, I'd change the type on sda3 and sda4 to 8E, and add them to the volume group. Then I'd leave everything alone until I need more space somewhere, and grow that logical volume and its underlying file system when needed.

    Had sda3 originally been setup with LVM + ext4, this would be very simple to deal with today. It would take you all of a minute to add sda 1, 3 and 4 to a volume group, and resize your existing /home or / or whatever...

  5. #35
    Join Date
    Jan 2016
    Location
    Bangor Maine USA
    Posts
    2

    Re: installing grub2 to MBR, looking to do this correctly.

    I know this is OLD but here is the deal.

    Windows itself is ALWAYS going to take over the master boot drive of the primary sda drive, because microsoft in their infinte stupidty just was written to do that. Its because windows does not recognize ext3 or 4 partiions as valid. It knows they are there but it does not offer to boot them for you.
    So if you ever reinstall windows from scratch then your faced with using EasyBCD and creating a Grub2 entry for windows boot loader, in order to get back to your Linux.

    Using Easy BCD you were able to get windows boot manager to load your Linux (Any Linux) from the proper hard drive.
    That part is very easy and EasyBCD handles it fine.

    Now as described you get GRUB to become the bootloader by doing
    grub2-install /sda which puts it onto the windows hard drive (the bootloader is directed to the Linux other partiton or hard drive and into the grub menu.

    and grub-update has grub go out and scan for any additional bootables such as another Linux and add that to the grub menu. Triple booting if you need that to occur.

    All good.

    Now when you reboot your going to be faced with the Windows 7 loader or whatever it found.

    So you choose Windows loader t, and then you will get Windows boot menu, which is wasted cause you dont need it anymore.

    However, do this. Boot into windows, run the EasyBCD program, and just remove the Linux boot entry.
    Then tick on the skip boot menu down at the bottom, and that is all. DO NOT remove Easy BCD and do not reinstall it either.
    Now when you reboot, you get GRUB menu, and choices, but when you pick Windows you will NO LONGER get any Windows boot menu it will just load windows just the way you want.

    Problem solved. If you image the drive, you will not need to reinstall grub again, if the imaging software is good like Acronis or Macrium Reflect it will just put back the MBR and direct it to your Linux GRUB and everything is cool.

  6. #36
    Join Date
    Sep 2009
    Posts
    36

    Re: installing grub2 to MBR, looking to do this correctly.

    Hi,

    I am replying too this thread - as i have in error, overwritten the MBR on my Linux had disk.

    If i run a Live CD witn Fedora 25 or Fedora 26, i can see my Linux installation, which is encrypted LUKS.

    I can decrypt from the Live CD.

    I have followed the commands on the first page :

    Code:
    grub2-install --recheck --root-diredctory=/ /dev/sda
    Where the response is :

    Code:
    /usr/lib/grub/86_64-efi/modinfo.sh please specify --target or --directory
    I have tried --directory and--target switches and the relevant path - but it has not worked.

    What i am not sure on how to repair the MBR or recover the installation.

    The hard disk only has the Linux installation, and i do not use UEFI.

    Any guidance gratefully received.

    Thanks and regards,

    Shadders.
    Last edited by shadders; 12th September 2017 at 12:15 PM. Reason: spelling

  7. #37
    Join Date
    Sep 2009
    Posts
    36

    Re: installing grub2 to MBR, looking to do this correctly.

    Hi All,

    I solved the issue with the help of the following links :

    https://ubuntuforums.org/showthread.php?t=2266650

    https://fedoraproject.org/wiki/GRUB_2

    I received failures for the first in regards to the scanning for nodes etc., - my interpretation is that the Encrypted LUKS partition is self contained - but not sure.

    If anyone has suggestions if there could be any future issues - would be helpful.

    Thanks and regards,

    Shadders.
    Last edited by shadders; 12th September 2017 at 09:32 PM. Reason: links

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. Installing grub2 on /dev/sdb after /dev/sda died
    By jdc18 in forum Using Fedora
    Replies: 3
    Last Post: 11th December 2011, 06:31 PM
  2. upgarade 15 to 16 was good before installing grub2
    By gnulinux in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 5th December 2011, 11:31 PM
  3. [x86_64] Installing Grub2 on EFI
    By Elv13 in forum Mac Chat
    Replies: 1
    Last Post: 24th March 2010, 02:44 AM
  4. Yum not installing/removing dependencies correctly
    By srdempster in forum Using Fedora
    Replies: 22
    Last Post: 12th April 2008, 03:32 PM
  5. not installing correctly?
    By mcmischief in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 3rd September 2007, 08:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •