Issues with Dual Booting Ubuntu and Windows 10

Publicado por markwayne, Oct 13, 2024, 11:32 AM

Tema anterior - Siguiente tema

markwayne

Hi everyone,

I am trying to set up a dual boot system with Ubuntu and Windows 10 on my PC. I installed Ubuntu alongside Windows; but I'm having trouble with the boot menu.

After installation; the system boots directly into Windows without showing the GRUB menu. I have tried using the Boot Repair tool; but it didn't resolve the issue. :( I have checked https://foro.alcancelibre.org/index.php?board=1.0 but still need help.

Has anyone faced this before? Any suggestions on how to get the GRUB menu to appear at startup?
I'd appreciate any help ; guidance on troubleshooting this issue.

Thanks in advance! :)


Joel Barrios

#1
1. Boot with any LiveCD form any Linux distro.

2. Login as regular user from LiveCD and then `sudo su -l`

3. mkdir /mnt/linux

4. Mount Linux partitions (at least rootfs and boot):
vgchange -a y vg_XXXXX
mount /dev/mapper/lv_xxxxxxxx /mnt/linux
mount /dev/sdaX /mnt/linux/boot

5. Mount ramdisk filesystems:
mount -o bind /dev /mnt/linux/dev
mount -o bind /proc /mnt/linux/proc
mount -o bind /sys /mnt/linux/sys

6. chroot /mnt/linux

7. Make sure there is a file into /etc/grub.d/ with this content (suggested 40_custom)

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Windows 10 (loader)"{
    insmod part_gpt
    search --no-floppy --set=root --fs-uuid XXXX-XXXX
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}


8. Asuming you want grub installed in the MBR for /dev/sda:
grub2-install /dev/sda
grub2-mkconfig -o /boon/grub2/grun.cfg

9. If success, exit chroot, unmount everything and reboot.
exit
umount /mnt/linux/sys
umount /mnt/linux/proc
umount /mnt/linux/dev
umount /mnt/linux/boot
umount /mnt/linux
reboot
Joel Barrios.
Director General Alcance Libre.
http://www.alcancelibre.org/
http://lms.alcance-empresarial.com/
La libertad del conocimiento al alcance de quien la busca.