Using an existing bootloader?

Hello,

First off, bravo to @Wimpy and everyone else who’s contributed to 16.04 beta-2, things are shaping up brilliantly. I’ve finally decided to take the jump and run UM on my primary workstation.

I’m interested in using an existing grub setup, but during the install process, there doesn’t appear to be a way to opt out of the bootloader. The “install alongside” option makes me nervous since I have an Arch and a Windows 10 install on the same box, and I don’t actually know what this will do.

I’d much prefer to point the installer at the partitions I’ve configured for ahead of time, have UM install itself, and then manually add a new boot entry. So a few questions (doc links would be great, if available):

  • Is there a recommended way to accomplish something like this?
  • Anything special about the grub boot that I need to know?
  • More generally, how customized is the ubiquity installer for UM, and could someone point me towards related development resources? I’d like to learn a bit more about what it’s doing.

Again, thank you for everyone’s hard work!

Hi,
Using the Something else option will allow you to select the partition you wish to use for installation.

Was about to write a detailed step-by-step complete with screen captures, then found wolfman’s great guide (linked above) :slight_smile:

If you have more than one drive, make sure the correct drive is selected for the boot loader (found at the bottom of the Something else window).

Once you’ve completed the first part of the guide (formatting your preconfigured partition as ext4, Mount point: /), if you do not wish to have a separate /home partition, you can continue with the installation as normal.

During install, GRUB will automatically be updated to include all operating systems found on your system.

As with all partition operations, make sure to backup important data before commencing.

2 Likes

I had a look around and found this.

Looks like ‘ubiquity -b’ will work. I have not tried this, just thought it may help.

@anon42388993,

reading through the link you posted, if you don’t install Grub, there is no chance you will be able to boot into Ubuntu?, this would require the use of a 3rd party application which is something I wouldn’t do myself!. :smiley:

Yep, this is uncharted water for me. I don’t expect to be much more help :frowning:

Thanks for the links! I will experiment today and report back…

I have yet to try this …
During something else I remember that one can choose the location for the boot loader. Assuming you have a working grub installation that uses the os prober when you perform update-grub you might be able to choose a USB flash drive for grub bootloader install.

Hopefully one of the more experienced posters here will weigh in on this ‘work around’ of not being able to completely opt out of bootloader install.

Regards,
Pete

Hey Pete, I had the same thought. Since I didn’t mind didn’t mind reformatting the machine, I figured I’d experiment with it.

TL;DR: Things did…not work out as expected, but I do have a working installation now :slight_smile:

The backstory is, I had a Windows 10/Arch dual boot setup across a number of drives. Arch piggybacks off the EFI system partition created during Windows 10 installation since Windows is pretty stubborn about its disk topology. This was mounted at /boot/efi, with grub and windows efi entries living in their respective directories under $esp/EFI. I setup custom boot entries in /etc/grub.d/40_custom for Windows, and ran grub-mkconfig -o /boot/efi/grub/grub.cfg. There was no os-prober involved.

Now, I wanted to basically replace my Arch installation with Ubuntu Mate, arriving at a Windows 10/Ubu dual boot instead. I was nervous Ubuntu would somehow corrupt my boot with it’s own opinionated layout, so I wanted to own that part of the installation and reuse my well understood boot setup.

I entered the UM installer, pointed it to my root and home partitions. It found the ESP and marked it the Windows System Partition, no indication that grub also lived there. I changed to to “do nothing with this partition”. Then, for the bootloader location, I chose a random partition I created on a flash drive [1]. Install goes through without a hitch and I start to inspect what the installer actually did…

The syslog reported successfully installing grub to the dummy flash partition despite there being nothing in the partition at all. A new directory was installed to $esp/EFI/ubuntu despite me explicitly telling the installer to ignore the partition. It contains a number of .efi entries plus a grub.cfg pointing grub to /boot/grub which is actually on my root partition and contains the real grub.cfg. os-prober indeed picked up on the Windows install, adding a Windows entry to the ubuntu grub menu. /boot contains everything you’d expect, with an efi mountpoint that ubiquity decided to use as the $esp mountpoint, evidenced by the fstab entry. My existing grub install inside $esp was not touched!

In summary, I clumsily arrived at what I set out to do with some confusing behavior along the way. My system now has 2 different grub efi entries, the original, and the Ubuntu one. I can boot Windows and Ubuntu from either! (Sidenote: I manually added an Ubuntu entry to the original grub.cfg to make this happen). To clean it up, I’ll delete the original grub efi entry + install files since it’s entirely redundant at this point. Still some lingering questions:

[1] What the hell is the installer actually doing when you give it a bootloader location? Why do I have the option to choose a partition /dev/sdx1 or the device itself /dev/sdx, and what does it do differently in either case? (I suspect this is related to legacy BIOS boot?). That seems like a great way to render an existing system totally unbootable!

[2] I bumbled my way through this and would never suggest it for a system I wasn’t ready to nuke & pave. Is there a supported way to take lower level control of an install, perhaps via command line tools and chroot? If not, is there any interest? I would be happy to do some more research on this and document the process.

1 Like

Hi @nelsk,

take a look here, it is quite detailed and should be of use to you!:

https://help.ubuntu.com/community/UEFI

Bookmarked! Thank you, I will read through this today.

1 Like