The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Backing up MBR on disks with recovery partiitions?

    Discussion in 'Linux Compatibility and Software' started by hircus, Nov 11, 2011.

  1. hircus

    hircus Notebook Geek

    Reputations:
    19
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    15
    Hi all,

    Most of the Linux distributions I use allow me to override where GRUB is installed, but I now need to install Ubuntu on some Dell Latitude laptops, and on the test install I did on my old Vaio netbook, it installs GRUB2 on the MBR of the drive without offering any alternative.

    While I could still get to both the recovery partition and to Windows from GRUB2's boot menu, further attempts to recover my original boot setup failed (e.g. after force-installing GRUB2 to the /boot partition and writing syslinux's mbr.bin to MBR, pressing F10 which normally boots the recovery partition now just yields a blank screen).

    So the question is:
    - do manufacturers like Sony, Dell etc. use a special MBR, or will Windows' bootrec /fixmbr do the right thing?
    - would backing up the first 446 bytes suffice, or do I have to do something more?

    Thanks in advance!
     
  2. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Yes you can do this, but you want the first 512 bytes, some manufacturers can use a customized MBR that has special code for entering recovery mode.

    Here's a quick guide: Backup MBR in Linux | Backup HowTo
     
  3. hircus

    hircus Notebook Geek

    Reputations:
    19
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    15
    With the additional caveat that, unless restoring to the same machine, you want the first *446* bytes, not 512, else you overwrite the partition table as well!

    What I'm wondering is if F10 is handled in the MBR, or in the recovery partition. I think what I did wrong was forgetting to make sure that the recovery partition (/dev/sda1) is still marked bootable after GRUB did its thing.

    In any case, I'm sheepish to report that Ubuntu indeed has a way to specify where to install the bootloader; I just missed it because it's not where I expected it.
     
  4. TuxDude

    TuxDude Notebook Deity

    Reputations:
    255
    Messages:
    921
    Likes Received:
    2
    Trophy Points:
    31
    Ubuntu has always ignored clearly exposing the bootloader install options.

    Distributions like openSUSE even allow installing the bootloader to multiple partitions... (which I personally like)
     
  5. hircus

    hircus Notebook Geek

    Reputations:
    19
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    15
    They do allow it, but put the bootloader option in the same step as partitioning; whereas Fedora (which I know) and openSUSE (I'm guessing) both let you configure it as an additional step.

    In this case, I used custom partitioning anyway, but my brain was not expecting to see the bootloader option there and thus missed it entirely. And after the partitioning step, Ubuntu's installer does things in the background while asking you the remaining questions, and by the time I noticed everything is already written :p