Fedora Linux Support Community & Resources Center
  #31  
Old 15th February 2012, 07:24 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 1,058
macoschrome
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.
Reply With Quote
  #32  
Old 15th February 2012, 07:40 PM
g2nightmare Offline
Registered User
 
Join Date: Feb 2012
Location: virginia
Posts: 42
linuxfirefox
Re: installing grub2 to MBR, looking to do this correctly.

Quote:
Originally Posted by chrismurphy View Post
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.
Reply With Quote
  #33  
Old 15th February 2012, 10:18 PM
satanselbow Offline
Registered User
 
Join Date: Apr 2011
Location: Rainham, Essex, UK
Posts: 303
linuxchrome
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.
Reply With Quote
  #34  
Old 15th February 2012, 10:27 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 1,058
macoschrome
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...
Reply With Quote
  #35  
Old 3rd March 2016, 12:05 PM
kb5050 Offline
Registered User
 
Join Date: Jan 2016
Location: Bangor Maine USA
Posts: 2
linuxchrome
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.
Reply With Quote
  #36  
Old 12th September 2017, 11:46 AM
shadders Offline
Registered User
 
Join Date: Sep 2009
Posts: 36
linuxfedorafirefox
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
Reply With Quote
  #37  
Old 12th September 2017, 05:01 PM
shadders Offline
Registered User
 
Join Date: Sep 2009
Posts: 36
linuxfedorafirefox
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
Reply With Quote
Reply

Tags
correctly, grub2, installing, mbr

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


Current GMT-time: 08:15 (Friday, 22-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat