Install Ubuntu to hard disk without overwriting mbr?

mbr
7,468

Solution 1

To do this you will need to set up the partitions for Ubuntu manually. I suggest you do this with Gparted after selecting "try Ubuntu". You should then go ahead and install Ubuntu but when Ubiquity asks how you want to install select "something else" and it will take you to the advanced mode.

You then need to specify the partitions manually, and also tell it where to install grub. Down the bottom of the advanced partitioner, you will it has probably defaulted to installing grub on /dev/sda. Change this to the correct device name for the USB you want to install grub to.

After installation the machine will only boot into Ubuntu when you boot grub off the USB drive; the MBR on the hard drive will not be changed.

Solution 2

Share:
7,468

Related videos on Youtube

Bob
Author by

Bob

Updated on September 18, 2022

Comments

  • Bob
    Bob over 1 year

    What's the best way to install Ubuntu without putting GRUB on the MBR? I would think I can install to another partition (logical?), and then install GRUB on a bootable USB. When I want to boot to Ubuntu, just plug in the USB.

    Would this work? How can I get the installer to do that?

  • Bob
    Bob about 11 years
    This is exactly what I want to do. I will try it. I didn't know that ubiquity lets you choose the place to install grub. Perhaps I've missed it in the past. Thanks!
  • Bob
    Bob about 11 years
    Why don't you want to install GRUB on the MBR? Because I've been burned by this before. Granted it was an older version of Ubuntu, and a much older version of Windows - but I've had to spend hours trying to repair the MBR b/c Win wouldn't boot - it can be really finicky with stuff like this.
  • fabricator4
    fabricator4 about 11 years
    Grub replaces the MBR, as you know, however there should be no problems booting either Windows or Ubuntu from Grub. There are sometimes problems where the OS proper does not find the Windows boot partition however this can normally be fixed by running 'sudo update-grub' afterwards.
  • jiggunjer
    jiggunjer almost 8 years
    two bootloader fighting for control? I doubt that, I think that is why there is a boot priority listing in the BIOS...
  • Shauna
    Shauna almost 8 years
    It's likely more prone to happen on older systems and likely involves an autodetect setting in BIOS, but I've seen it happen. If I had to guess, I'd say it's probably a sort of race condition, where which one loads depends on which device the BIOS picks up first, and it may not always be the same (or expected) order.
  • mook765
    mook765 over 6 years
    This sounds a bit dangerous, copying the first 448 bytes of the disk will include the first partition-table-entry and the first two bytes of the second partition-table-entry. Copying them back after installation might lead to a heavy problems if the first and/or second partition have been changed during installation. ALso this will put Grub in the MBR, so this does not answer the question.
  • mook765
    mook765 over 6 years
    This will not install Grub at all, but it seems that the OP want to install Grub to a different location.
  • bain
    bain over 6 years
    Good point, I've added links to that info
  • user149408
    user149408 over 6 years
    It does temporarily install GRUB in the MBR but restores the old MBR, thus the final result of not having GRUB in the MBR is ultimately reached. As for the size, according to en.wikipedia.org/wiki/Master_boot_record#Sector_layout the first partition table entry begins at 446 (not 448—I’ll correct that). Depeding on the boot sector format used, anything shorter than 446 may cripple the boot loader. That said, as some boot managers support additional partition table entries before byte 446, it’s probably a good idea to partition your drive first, and only then mess with the MBR.