Bootup previous OS after installing RebornOS


My computer still boots up to Ubuntu after I installed RebornOS.

I have Ubuntu 16.04 on my office computer with the following partitions

  • /dev/sda1 500M EFI System
  • /dev/sda2 16G swap
  • /dev/sda3 1.8T Linux

I booted up with RebornOS-2021.06.30-x86_64 on a USB stick and used GPart to shrink /dev/sda3 and create a new partition:

  • /dev/sda3 500G Linux
  • /dev/sda4 1.3T EFI System

After I installed RebornOS on /dev/sda4, I notice its type is “EFI System” and not “Linux”.

At the end of the installation, I restarted the system, hoping to see RebornOS. However, the previous Ubuntu on /dev/sda3 appears. Somehow, the cnchi installer did not copy the correct grub data to /dev/sda1.

I barely understand the booting process, the UEFI technology and the grub command. So, I appreciate if anyone can provide me with detailed instructions on how I can get my computer to boot up to RebornOS on /dev/sda4.

FYI: besides other files, there are

  • /boot/efi/EFI/BOOT
  • /boot/efi/EFI/ubuntu
  • /boot/grub

directories on /dev/sda3 (ubuntu) and only /boot/grub directory on /dev/sda4.

I am OK with reinstalling RebornOS on /dev/sda4. My only concern is to keep /dev/sda3 intact so that I can transfer my files after I have a working RebornOS installation.

Many thanks in advance.


I found How to fix grub with EFI Boot, but I am not sure if I should apply the advice there. I did the following in the Ubuntu 16.04 environment:

# mount /dev/sda4 /mnt
# mount /dev/sda1 /mnt/boot/efi
# diff -rq /mnt/boot/efi /boot/efi

The diff command did not produce any output, which shows that /dev/sda1 has the same content as /boot/efi on the ubuntu partition; the content are /boot/efi/EFI/BOOT and /boot/eft/EFI/ubuntu directories. The cnchi installer did not create a RebornOS entry in /dev/sda1.

/mnt/boot/grub/grub.cfg exists. I don’t think I need to run grub-mkconfig.

I don’t know about the grub-install command line. But /mnt/boot/grub does not contain a x84_64-efi directory. Instead there is an empty i386-pc directory. Ubuntu 16.04 has a lot of stuff in /boot/grub/x86_64-efi.

Please let me know if you need other detail.

@lilaboc Have you tried the

sudo update-grub

command on Ubuntu?

The EFI System Partition contains the bootloader, the OS itself should be on a different partition.
Only one EFI System Partition is needed.
The bootloaders of multiple operating systems can coexist on the same ESP.

Anyway, to repair the bootloader of RebornOS you need to mount the RebornOS system with the ESP, chroot into it and reinstall the GRUB bootloader from there.
Don’t know exactly how to do that without arch-chroot though…

Reinstallation should also fix this. However, that assumes that made a mistake the first time.
I assume you chose manual partitioning?

I think you might have accidentally unselected the “install bootloader” checkbox. It can happen quite easily if I remember correctly, because clicking on anything right of the checkbox can do it. In that case GRUB won’t be installed at all.

Thank you for replying.

I can boot up with the RebornOS thumbdrive to access arch-chroot. But what are the flags to grub-install? Do I run it as

mount /dev/sda4 /mnt
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=RebornOS --recheck

The /boot/grub directory does not have a x86_64-efi directory.

Do I run

grub-install --target=i386-pc /dev/sda

There is a i386-pc directory in /boot/grub, but it is empty.

1 Like

Yes, I chose the manual approach in order to get RebornOS to go into /dev/sda4. I think reinstalling is my best shot; this time, after choosing manual partitioning, I will make sure the bootloader checkbox stay checked.

Thank you.

1 Like

Yes, those commands look correct to me. That’s how I did it in myself in the past, minus the --recheck option, no idea what it does.

Don’t do a Legacy BIOS installation for a multi-boot setup, UEFI is generally preferable in my opinion.