You are not logged in.

#1 2021-01-25 02:28:55

luofeiyu
Member
Registered: 2015-11-03
Posts: 30

How to install multiple os with archlinux?

There are two disk on my pc,windows and debian already installed in  /dev/sdb.
I install archlinux this way.

mount  /dev/sda1  /mnt
swapon /dev/sda2
pacstrap /mnt base linux linux-firmware vim nano
getfstab -U /mnt >>  /mnt/etc/fstab
arch-chroot /mnt
mkdir /boot/efi
mount  /dev/sda3  /boot/efi   
pacman -S grub efibootmgr os-prober
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-di=grub
grub-mkconfig -o /boot/grub/grub.cfg
passwd

After installation,i reboot my pc ,the grub gui contains no startup menu for my windows and debian ,i can enter into archlinux only from the grub gui,how to write the proper  grub command for my purpose?

Last edited by luofeiyu (2021-01-25 02:30:03)

Offline

#2 2021-01-25 02:48:40

twobooks
Member
From: rainforest
Registered: 2020-06-23
Posts: 47

Re: How to install multiple os with archlinux?

mkdir /boot/efi/EFI/BOOT
cp /boot/efi/EFI/GRUB/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi

Offline

#3 2021-01-25 09:39:53

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

Re: How to install multiple os with archlinux?

@twobooks that won't help they seem to be able to access grub.

@luofeiyu Post the contents of that grub.cfg as well as

tree /boot/efi
efibootmgr -uv

Last edited by V1del (2021-01-25 14:18:10)

Offline

#4 2021-01-25 14:52:28

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: How to install multiple os with archlinux?

Easiest setup is probably to let debin handle grub and just add an arch entry to it.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2021-01-25 16:59:58

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: How to install multiple os with archlinux?

^ Debian's grub-mkconfig version won't crate a working menuentry for Arch if the CPU µcode packages are installed so if that is the case then the OP would need to create a custom menuentry as per https://wiki.archlinux.org/index.php/Us … om_scratch and add it to /etc/grub.d/40_custom (in Debian).

@V1del: the OP generated /etc/fstab before mounting the EFI system partition so it probably won't be mounted in the running system; if so then the OP should mount it manually before running the tree command:

# mount /dev/sda3 /boot/efi
tree /boot/efi

We should probably also check if /dev/sda3 is actually an EFI system partition:

# parted --list

@OP: if you want a menuentry for Debian then ensure that the partition containing the Debian kernel & initramfs images is mounted when grub.cfg is generated.

Reference: https://wiki.archlinux.org/index.php/GR … ng_systems

If Windows is installed in UEFI mode but not detected by grub-mkconfig then you may have deleted bootmgfw.efi, the tree command will show if this is the case (provided the ESP is actually mounted under /boot/efi).


Jin, Jîyan, Azadî

Offline

#6 2021-01-25 18:00:28

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: How to install multiple os with archlinux?

Head_on_a_Stick wrote:

^ Debian's grub-mkconfig version won't crate a working menuentry for Arch if the CPU µcode packages are installed so if that is the case then the OP would need to create a custom menuentry as per https://wiki.archlinux.org/index.php/Us … om_scratch and add it to /etc/grub.d/40_custom (in Debian).

Personally I'd still suggest letting Debian handle the bootloader config. The Arch config is static, whereas Debian needs to update the grub configuration every time there's a kernel update as the kernel/initramfs images change name (they append a version number to the filename).


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2021-01-25 18:50:34

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: How to install multiple os with archlinux?

Slithery wrote:

Debian needs to update the grub configuration every time there's a kernel update as the kernel/initramfs images change name

That is true but Debian symlink the current kernel & initramfs images to /vmlinuz & /initrd.img so those locations could be used in /etc/grub.d/40_custom to remove the need to continually update grub.cfg in Arch.


Jin, Jîyan, Azadî

Offline

#8 2021-01-26 00:35:15

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: How to install multiple os with archlinux?

Head_on_a_Stick wrote:
Slithery wrote:

Debian needs to update the grub configuration every time there's a kernel update as the kernel/initramfs images change name

That is true but Debian symlink the current kernel & initramfs images to /vmlinuz & /initrd.img so those locations could be used in /etc/grub.d/40_custom to remove the need to continually update grub.cfg in Arch.

I didn't know that. It's been a while...


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB