5

I want to have Dual Boot, the problem is that if I install Arch Linux after Ubuntu I don't know how to make that Arch Linux detect Ubuntu.

I partitioned Ubuntu in this way

enter image description here

In Arch I only create root partition, so the result is this

enter image description here

Then I did this:

 mkfs.ext4 /dev/sda4
 mount /dev/sda4 /mnt
 mkdir /mnt/boot
 mkdir /mnt/boot/EFI
 mount /dev/sda1 /mnt/boot/EFI

The result is

enter image description here

Close to finish the installation I did

pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

But don't Found Ubuntu

Obs: I try making one EFI partition for Ubuntu and other EFI partition for Arch, I did the same process and nothing.

So what I need to do to add Ubuntu to Arch Linux grub. Thx

Mitsworth SCZD
  • 241
  • 1
  • 4
  • 10

4 Answers4

1

You've done everything correctly, as far as I can see.

A couple of steps will solve the issue, as root (sudo):

# pacman -S os-prober
# os-prober

And, that's it. It's almost easier than Ubuntu; more elegant, certainly.

red_voitt
  • 11
  • 1
1

That problem is likely from the final line of /etc/default/grub example Uncomment the final line, install os-prober if you haven't already, and run grub-mkconfig -o <grub dir>/grub.cfg (example command for the default grub directory:grub-mkconfig -o /boot/grub/grub.cfg) as root

relimS
  • 11
  • 2
1

I just today installed Ubuntu 22.04 LTS on a system with an existing archlinux installation (archlinux was the only OS on the disk). The Ubuntu installer explicitly gave the option to install dual-boot with archlinux. I chose that option, and Ubuntu rewrote the grub boot menu to include Ubuntu (as the first of the list :) ) along with entries for the archlinux installation (normal and advanced options). I tested the archlinux boot from the new menu and it worked perfectly.

Bogatyr
  • 121
  • 2
0

I just had the exact same problem (in a VM). The ubuntu partition just had to be mounted before calling os-prober:

mkdir ubuntu
mount /dev/vda2 /ubuntu
os-prober

(I know the question dates from years ago, but this was the only hint I found to my problem, so I am uploading my solution in case someone else finds this useful in the future)