You are not logged in.
Pages: 1
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
passwdAfter 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
mkdir /boot/efi/EFI/BOOT
cp /boot/efi/EFI/GRUB/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi
Offline
@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 -uvLast edited by V1del (2021-01-25 14:18:10)
Offline
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
^ 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/efiWe 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
^ 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).
Offline
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
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...
Offline
Pages: 1