Results 1 to 6 of 6

Thread: How to install grub to mbr in 13.1 ?

  1. #1

    Default How to install grub to mbr in 13.1 ?

    Now my opensuse 13.1 is in /dev/sdb3, I want to install grub to mbr of /dev/sda .

    I try sudo /usr/sbin/grub2-install /dev/sda , but it does not work .

    How to do it ?
    Thanks

  2. #2
    Join Date
    Mar 2010
    Location
    UTC +1
    Posts
    193

    Default Re: How to install grub to mbr in 13.1 ?

    You will probably be helped by using caf4926's article on reinstalling Grub2 here: https://forums.opensuse.org/content....rom-DVD-Rescue.


    dayfinger

  3. #3
    Join Date
    Sep 2012
    Posts
    7,106

    Default Re: How to install grub to mbr in 13.1 ?

    Quote Originally Posted by waterloo2005 View Post
    I try sudo /usr/sbin/grub2-install /dev/sda , but it does not work .
    Why do you think it does not work? This does install grub into MBR of /dev/sda. Whether your system will actually boot from MBR of /dev/sda is another question. It depends on BIOS settings.

    Please explain what you expect and why you think "it does not work".

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,681
    Blog Entries
    3

    Default Re: How to install grub to mbr in 13.1 ?

    Quote Originally Posted by waterloo2005 View Post
    Now my opensuse 13.1 is in /dev/sdb3, I want to install grub to mbr of /dev/sda .

    I try sudo /usr/sbin/grub2-install /dev/sda , but it does not work .

    How to do it ?
    Thanks
    You do it the same way as ever.

    The only reason I can think of, that you might be having problems, is that perhaps you have a GPT partitioned disk. In that case, you need to create a special partition for grub to use.

    On the box where I did that (for an external drive), I created a partition starting at sector 34, and ending at sector 2047. And I gave it a partition type code of "ef02". I did this with "gdisk".

    With MBR partitioning, "grub2" install in an MBR cheats and puts some of its code in unused space just after the MBR. That doesn't work with GPT partition, so instead grub2 looks for that special "BIOS boot partition". I think it can go anywhere, and the type code is what grub2 recognizes. But the location immediately after the GPT partition table (sectors 34-2047) is the recommended place.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  5. #5
    Join Date
    Sep 2012
    Posts
    7,106

    Default Re: How to install grub to mbr in 13.1 ?

    Quote Originally Posted by nrickert View Post
    perhaps you have a GPT partitioned disk. In that case, you need to create a special partition for grub to use.
    Then grub-install had failed if this partition were missing.

  6. #6

    Default Re: How to install grub to mbr in 13.1 ?

    Quote Originally Posted by arvidjaar View Post
    Why do you think it does not work? This does install grub into MBR of /dev/sda. Whether your system will actually boot from MBR of /dev/sda is another question. It depends on BIOS settings.

    Please explain what you expect and why you think "it does not work".
    I mean after I do that I can not boot from sda.
    If this is a matter of my disk? Is my disk dying ?

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
  •