Ubuntu: How can ubiquity be forced not to install grub?



Question:

My HDD partitions:

  • esp --> sda1
  • archlinux --> sda2
  • swap --> sda3
  • sda4 --> would be a place for ubuntu

I'm going to install ubuntu on sda4; currently my boot process is controlled by systemd-boot which is installed in archlinux via bootctl software. It's fine and I'd like to keep it.

By installing Ubuntu it will try to install grub on sda or sdaX. Look at the dropdown menu at this screenshot:

enter image description here

I want to install Ubuntu on sda4 without dealing with grub. Then I will point to Ubuntu vmlinuz file and initrd file by creating a new entry file in archlinux under systemd-boot configuration system.


Solution:1

sudo ubiquity -b  

Just installed 16.10 by directly booting ISO on sda with grub's loopmount. Once in installer went into terminal and used above command. Something Else install seemed normal. Did not notice until I had clicked thru, but pretty sure combo box for where to install grub was missing. And during install process it normally says installing grub, but that never showed.

Normally an install to sdb or any second install overwrite my /EFI/ubuntu folder with my main install's boot. This time I was able to just boot back into my main install

And running sudo update-grub still found the new install even though grub "not installed". Noted no grub.cfg in /boot/grub either.


Solution:2

I don't know of a method to prevent the installing of Grub. But you can avoid having /dev/sda and other partitions of your /dev/sda drive touched with Grub.

Insert a second USB into the computer. Select it as the Boot Device during the Installation. Now install Ubuntu on your /dev/sda4. The install process will not touch your boot sectors of /dev/sda or any other partition, except for the /dev/sda4.


Solution:3

You can't force not to install the boot loader, by default.

While @oldfred had mentioned there is -b option for ubiquity, albeit undocumented, this isn't obvious and may be scary for most end users to use it. Although, similar option had existed before.

There used to be

In the past, Ubuntu had an advanced option that allows user to customize boot loader installation. Between Ubuntu LTS releases, the advanced option was last seen in Lucid Lynx (10.04) release. The option had been removed since then, for any reason that I didn't follow up.

Old screenshot as proof:

Step 8/8 of Ubiquity installer in Ubuntu Lucid

Install on same partition

In particular step, one can just select device other than the primary device /dev/sda for boot loader installation. For example, Ubuntu will be installed on /dev/sda4 partition, so boot loader shall be installed on /dev/sda4 also.

By doing so, user will have:

  • new boot loader at /dev/sda4 that will be hidden, unless the machine is boot with option to chainload to the partition to reveal it

  • existing boot loader at /dev/sda will handle detection of newly installed operating system at /dev/sda4, without having to rely on the new boot loader

  • user will need to update boot loader at /dev/sda from the first installed operating system, in order to detect subsequently installed systems at other partitions

Unless there is any critical reason for not dealing with boot loader at all, I don't see any side effect of installing subsequent boot loaders to respective partitions.

Works with least hassle

Personally, I have multiple distro (mostly Ubuntu flavours and similar derivatives) installed on the same machine, with first boot loader at /dev/sda and other boot loaders on respective partitions. The only caveat is, boot loader must be updated from the first installed operating system.

Besides the caveat, with least hassle, one can always forget about new boot loaders and let the existing boot loader manage the detection.

TL;DR Install new boot loader at same partition where the system will be installed; The new boot loader is hidden from user anyway, unless chainloading to that partition.


Related posts on Ask Ubuntu

I had written this older answer that explains a dual boot setup, mentioning os-prober and workaround by chainloading to the partition.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »