When Ubuntu updates keep wiping bootman


#1

Hello fellow dual-booters,

I have Ubuntu installed alongside several Haiku and data partitions, see:

Ubuntu lives in “Partition 1”, its swap in “Partition 5”, then follow various Haiku installations and data partitions. I use Haiku’s Bootman as boot manager, after grub2 stopped working for unknown reasons…
Now every other time I boot into Ubuntu every couple of weeks, there’s some system update that keeps nuking the bootmanager, resulting in auto-booting into Ubuntu. Annoying.

My workaround is to boot into Ubuntu, and force the grub2 bootloader into the Ubuntu partition (“Partition 1”) with

sudo grub-install /dev/sda1 --force

Now I boot Haiku from a USB stick I have laying around here somewhere… and re-install Bootman into the MBR from the tools menu of the Installer app.

Maybe this rescue procedure helps others with similar issues.

It’s a bit of a bother though… Does anyone know if there’s a way to make Ubuntu understand not to nuke the MBR, but install grub2 into the Ubuntu partition instead?

Regards,
Humdinger


#2

What you do with grub-install only tells grub to reinstall itself in the partition. It doesn’t tell Ubuntu package manager to install it there by default.

To do that, you need to reconfigure the package. Something like: sudo dpkg-reconfigure grub-pc. It should ask you where to install the bootloader and remember the setting. Example screenshots here: http://askubuntu.com/questions/135741/how-should-one-set-the-grub-pc-packages-install-devices-debconf-setting


#3

Wow.
A lot of partitions there! :wink:
Always had something somewhat similar happen, however, would boot into Haiku using grub cli.
PulkoMandy’s solution is good enough.


#4

Thanks PulkoMandy! I did as described there; we’ll see when the next Ubuntu update comes around… Or rather, we won’t see, if it all worked as intended… :slight_smile:

Thanks!
Humdinger


#5

[quote=humdinger]Thanks PulkoMandy! I did as described there; we’ll see when the next Ubuntu update comes around… Or rather, we won’t see, if it all worked as intended… :slight_smile:
[/quote]

You should be able to test it now, just run “sudo update-grub2” - assuming it is grub2, if not “sudo update-grub”.


#6

Did “sudo update-grub2” and it all still works. So, looks good…

Thanks
Humdinger


#7

Really need to get this merged in:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732696
With this it would automatically pick up Haiku installs as long as the partition is mounted (even readonly with “befs”, ie. declared in fstab).
If anyone wants to test and report…


#8

I there,
I know its an old post but saw you are a quite active member. I’m actually running debian linux with grub2 and had a haiku-nightly-hrev52044-x86_64-anyboot installed in a partition after the swap partition of my SDD. I tried several options posted here and in the installation guide but unable to make it boot, what do you suggets me to try?


#9

Did you try the steps listed here?: https://www.haiku-os.org/guides/booting/

I triple boot Windows 7, Ubuntu 18.04, and Haiku x86_64 (regularly updated nightly of an hrev number I don’t have handy at the moment) on a laptop that originally had Windows 7, so Grub2 picked up that install just fine when I set up Ubuntu, but update-grub did not immediately pick up on Haiku’s presence. It took a little extra work to load into Grub2, but the directions in that link worked perfectly for me.

The address of your Haiku partition will vary depending on where and how you have the drive partitioned and whether you’re booting it from its own drive or a shared drive, so you’ll need to find out that information and number the disk and partition accordingly.


#10

I did try indeed but I found an error while selecting Haiku in the Grub2 boot menu stating: “unknown file system” by triying both hd0,3 and hd0,4. Pls see attached my partition scheme,dunno what I’m doing wrong.
cheers


#11

@amgpuma, did you try to boot using the cdrom? try holding the space bar before the boot icons get lit up, and in the menu you 'll see 2 haiku boot volumes one of them is the one you installed, select it and then select continue booting, if it boots that means the path is wrong in Grub2, you sould check for the exact path in linux not in haiku, if it doesn’t that means haiku for some reason can not boot from a fourth primary partition.


#12

Yes I did, it boots indeed. You are right its a problem either on the path or the syntax. Just to clarify:

  1. I intalled Haiku in the partition shown above
  2. I downloaded and moved the BOOTX64.EFI to the FAT32 File System (EFI)
  3. I modify and updated GRub2 according to given installation instructions

Then my question is accoridng to my partition (GPT) how should I update grub2 to boot Haiku out of it??
Pls kidnly provie right path wording

cheers!


#13

If you are using EFI, you can’t use the chainload system which only works in legacy BIOS mode. In that case, you need the experimental EFI image, and copy the haiku loader from its EFI partition to your system one.


#14

Here’s what I’m using to chainload Haiku’s EFI loader with GRUB2:

menuentry "Haiku Alpha" {
	load_video
	insmod part_msdos
	insmod chain
	set root='hd0,msdos3'
	search --fs-uuid --set=root CBF3-C96A
	chainloader ($root)/EFI/boot/haiku_loader.efi
	savedefault
}