# Bootup previous OS after installing RebornOS

**URL:** <https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459>\
**Category:** Installation and Live media\
**Created:** [July 20, 2021, 4:56am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459 "2021-07-20T04:56:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilaboc](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@lilaboc](https://rebornos.discourse.group/u/lilaboc)\
**Post date:** [July 20, 2021, 4:56am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/1 "2021-07-20T04:56:52Z")

</div>

Hi,

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.

---

<div class="post-metadata">

**Author:** ![lilaboc](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@lilaboc](https://rebornos.discourse.group/u/lilaboc)\
**Post date:** [July 20, 2021, 6:53am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/2 "2021-07-20T06:53:59Z")

</div>

Hi,

I found [How to fix grub with EFI Boot](https://osdn.net/projects/rebornos/wiki/How%20to%20fix%20Grub%20with%20EFI%20Boot), but I am not sure if I should apply the advice there. I did the following in the Ubuntu 16.04 environment:

```auto
# 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.

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [July 20, 2021, 9:23am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/3 "2021-07-20T09:23:12Z")

</div>

@lilaboc Have you tried the

```bash
sudo update-grub

```

command on **Ubuntu**?

---

<div class="post-metadata">

**Author:** ![damian101](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/damian101/32/241_2.png) [@damian101](https://rebornos.discourse.group/u/damian101)\
**Post date:** [July 20, 2021, 9:26am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/4 "2021-07-20T09:26:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![damian101](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/damian101/32/241_2.png) [@damian101](https://rebornos.discourse.group/u/damian101)\
**Post date:** [July 20, 2021, 9:34am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/5 "2021-07-20T09:34:22Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![damian101](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/damian101/32/241_2.png) [@damian101](https://rebornos.discourse.group/u/damian101)\
**Post date:** [July 20, 2021, 9:36am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/6 "2021-07-20T09:36:17Z")

</div>

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

Edit:  
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.

---

<div class="post-metadata">

**Author:** ![lilaboc](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@lilaboc](https://rebornos.discourse.group/u/lilaboc)\
**Post date:** [July 21, 2021, 3:37am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/7 "2021-07-21T03:37:30Z")

</div>

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

```auto
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

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

```

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

---

<div class="post-metadata">

**Author:** ![lilaboc](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@lilaboc](https://rebornos.discourse.group/u/lilaboc)\
**Post date:** [July 21, 2021, 3:49am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/8 "2021-07-21T03:49:39Z")

</div>

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.

 ![rebornos manual partitioning](https://global.discourse-cdn.com/free1/uploads/rebornos/original/1X/c540f4b0d98a25c7442f791e03742e9c560684d1.png)

Thank you.

---

<div class="post-metadata">

**Author:** ![damian101](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/damian101/32/241_2.png) [@damian101](https://rebornos.discourse.group/u/damian101)\
**Post date:** [July 25, 2021, 1:18am UTC](https://rebornos.discourse.group/t/bootup-previous-os-after-installing-rebornos/459/9 "2021-07-25T01:18:52Z")

</div>

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.
