You are not logged in.
Pages: 1
Hi,
I'm new to Arch Linux. I am trying to configure my laptop as a dual-boot machine. I followed the instructions for GRUB on the wiki as best I could. However, strangely the GRUB startup screen, I can only see one option (Microsoft 10 UEFI/GPT) and not the option to boot to Arch Linux! The Windows boot option was added via /etc/grub.d/40_custom.
Here is a copy of /boot/grub/grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt6' --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 a9bfba29-dc0d-424b-8830-245b531be2cd
else
search --no-floppy --fs-uuid --set=root a9bfba29-dc0d-424b-8830-245b531be2cd
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
play 480 440 1
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# 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.
if [ "${grub_platform}" == "efi" ]; then
menuentry "Microsoft 10 UEFI/GPT" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 8842-0286
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
fi
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###Offline
I followed the instructions for GRUB on the wiki as best I could.
^ We are going to need (much) more detail than that — the actual commands used (and the order in which they were issued) will let us see where you went wrong.
Jin, Jîyan, Azadî
Offline
rguinness wrote:I followed the instructions for GRUB on the wiki as best I could.
^ We are going to need (much) more detail than that — the actual commands used (and the order in which they were issued) will let us see where you went wrong.
Ok. I will try my best. I was following the instructions on this page: https://wiki.archlinux.org/index.php/GRUB#UEFI_systems
I first confirmed the partition scheme using:
parted /dev/sda printI mounted the partitions where the EFI System Partition and Arch Linux are located:
mount /dev/sda1 /bootmount /dev/sda6 /mntI then ran:
arch-chroot /mntI installed the grub and efibootmgr packages.
Then I ran:
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grubI determined the $hints_string and $fs_uuid for the Windows partition using:
grub-probe --target=hints_string /boot/EFI/Microsoft/Boot/bootmgfw.efigrub-probe --target=fs_uuid /boot/EFI/Microsoft/Boot/bootmgfw.efiThen, I edited /etc/grub.d/40_custom, where I added the following lines:
if [ "${grub_platform}" == "efi" ]; then
menuentry "Microsoft 10 UEFI/GPT" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 8842-0286
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
fiThen, I ran:
grub-mkconfig -o /boot/grub/grub.cfgFinally, I exited chroot and rebooted.
Offline
I discovered what went wrong. Posting now the error and solution, in case it helps someone else.
After some head-scratching, I realized that there are actually two grub.cfg, which I was confusing, one on /dev/sda1 (mounted to /boot) and the other on /dev/sda6 (mounted to /mnt). To add the Arch Linux menuentry, you have to run grub-mkconfig outside of chroot. This will make the necessary changes to /boot/grub/grub.cfg and NOT /mnt/boot/grub/grub.cfg, which has no actual effect on grub!
Offline
I mounted the partitions where the EFI System Partition and Arch Linux are located:
mount /dev/sda1 /bootmount /dev/sda6 /mnt
^ That was your error.
Jin, Jîyan, Azadî
Offline
Pages: 1