You are not logged in.

#1 2024-06-03 17:16:22

wonn
Member
Registered: 2024-06-03
Posts: 24

Installing Arch alongside a preexisting distro with grub/EFI set up

I'm trying to install Arch on a drive that already has a preexisting distro with a preexisting grub setup, and I cannot seem to find any instructions for how to do this. I've tried just installing it to a partition without doing anything boot-related, but running `update-grub` from the other distro fails to find my Arch partition. What's the proper way to do this such that Arch becomes bootable and recognised by grub without risking the other distro's bootability?

Offline

#2 2024-06-03 18:23:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Installing Arch alongside a preexisting distro with grub/EFI set up

You'll need to ask on the support channels for the distro managing your grub install.  Notably I don't believe there is even an "update-grub" command in our grub - I think that's a debian thing, and I'm not sure it's even meant to detect other OS's on it's own, is it?  I believe you should be using os-prober first.

Last edited by Trilby (2024-06-03 18:23:50)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-06-03 18:26:47

termi_13
Member
Registered: 2024-06-02
Posts: 4

Re: Installing Arch alongside a preexisting distro with grub/EFI set up

I think you still need a boot partition for the secondary Arch but by any chance did you try to use "os-prober"? Try installing it and uncommenting the following at the /etc/default/grub

...
GRUB_DISABLE_OS_PROBER=false
...

After that "sudo grub-mkconfig -o /boot/grub/grub.cfg" should show the other OS in the logs. If not try reinstalling the secondary Arch with the boot partition, set the main boot partition on BIOS as the first one and retry the command

Offline

#4 2024-06-03 19:41:27

wonn
Member
Registered: 2024-06-03
Posts: 24

Re: Installing Arch alongside a preexisting distro with grub/EFI set up

Yeah, I think the solution here is to create a new EFI partition for Arch and just have more than one EFI partition on this drive; running like rEFInd from that partition as boot manager for both installs. I did try os-prober from the preexisting distro and it did not find my single Arch partition.

Offline

#5 2024-06-03 21:56:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Installing Arch alongside a preexisting distro with grub/EFI set up

No - you cannot have more than one (functional) efi system partition.

One grub can manage multiple OSs - but the exact means of doing so is up to the host distro.  So again, you'll need to seek help on the support channels for that distro.  This is not a question about arch linux so this is the wrong place to ask.

Last edited by Trilby (2024-06-03 21:56:48)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2024-06-03 22:10:21

Funny0facer
Member
From: Germany
Registered: 2022-12-03
Posts: 159

Re: Installing Arch alongside a preexisting distro with grub/EFI set up

Trilby wrote:

No - you cannot have more than one (functional) efi system partition.

Could you elaborate on that? https://wiki.archlinux.org/title/EFI_system_partition does not mention this fact explicitly and I see no problem in choosing the right efi partition within the UEFI settings instead of letting a bootloader potentially mess things up.

Offline

#7 2024-06-04 08:54:01

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: Installing Arch alongside a preexisting distro with grub/EFI set up

wonn wrote:

I think the solution here is to create a new EFI partition for Arch ...

New EFI is not needed, multi-distro can share the same EFI and /boot partition.
If you prefer grub.cfg from Debian

# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
menuentry "Archlinux UEFI/GPT" {
    insmod part_gpt
    insmod search_fs_uuid
    search --fs-uuid --no-floppy --set=root ARCHLINUX_ROOT_FILESYSTEM_UUID
    linux   /vmlinuz-linux root=UUID="SHARED_BOOT_PARTITION_UUID" rw  loglevel=3 audit=1 quiet
    initrd  /amd-ucode.img /initramfs-linux.img
}
# update-grub

Or if you prefer grub.cfg from Archlinux

# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
menuentry "Debian UEFI/GPT" {
    insmod part_gpt
    insmod search_fs_uuid
    search --fs-uuid --no-floppy --set=root DEBIAN_ROOT_FILESYSTEM_UUID
    linux   /vmlinuz-6.1.0-18-amd64 root=UUID="SHARED_BOOT_PARTITION_UUID" rw  loglevel=3 audit=1 quiet
    initrd  /initrd.img-6.1.0-18-amd64
}
# grub-mkconfig -o /boot/grub/grub.cfg

Last edited by solskog (2024-06-04 23:27:50)

Offline

#8 2024-06-04 13:15:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: Installing Arch alongside a preexisting distro with grub/EFI set up

Funny0facer wrote:
Trilby wrote:

No - you cannot have more than one (functional) efi system partition.

Could you elaborate on that? https://wiki.archlinux.org/title/EFI_system_partition does not mention this fact explicitly and I see no problem in choosing the right efi partition within the UEFI settings instead of letting a bootloader potentially mess things up.

The UEFI spec only explicitly specifies a single partition. How multiple EFI partitions on the same drive are handled is unspecified, one UEFI vendor might support it, others don't -- it's better to err on the side of caution and only assume one is possible. e.g. (older) MSI's are notorious for not even supporting NVRAM entries properly and simply booting the first ESPs EFI/BOOTx64.efi binary (... typically Windows)

Last edited by V1del (2024-06-04 13:15:52)

Offline

Board footer

Powered by FluxBB