처음으로 Windows에 Arch Linux를 설치하고 듀얼부팅을 하려고 하는데 작은 문제에 봉착하게 되었습니다. GRUB를 설정하려고 하는데 PC를 부팅하면 Windows가 로드되지만 GRUB 메뉴가 표시되지 않습니다. 인터넷에서 몇 가지 해결책을 시도했지만 그 중 어느 것도 도움이 되지 않았습니다.
내가 시도한 것은 다음과 같습니다.
- 루트 파티션을 설치했습니다
mount /dev/nvme0n1p6 /mnt
- EFI 파티션을 마운트했습니다
mount /dev/nvme0n1p2 /mnt/efi
- 시스템에 로그인했어요
arch-root /mnt
- 그럽을 설치했어요
grub-install --target=x86_64-efi --efi-directory=/efi/ --bootloader-id=GRUB
- grub 구성 생성
grub-mkconfig -o /boot/grub/grub.cfg
이는 설치 프로그램이 생성하는 것이며 Windows와는 아무 관련이 없습니다.
#
# 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 btrfs
search --no-floppy --fs-uuid --set=root e5bb549c-2301-4d33-a4ca-f7be8fa28d1a
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
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
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e5bb549c-2301-4d33-a4ca-f7be8fa28d1a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root e5bb549c-2301-4d33-a4ca-f7be8fa28d1a
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=e5bb549c-2301-4d33-a4ca-f7be8fa28d1a rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-e5bb549c-2301-4d33-a4ca-f7be8fa28d1a' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-e5bb549c-2301-4d33-a4ca-f7be8fa28d1a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root e5bb549c-2301-4d33-a4ca-f7be8fa28d1a
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=e5bb549c-2301-4d33-a4ca-f7be8fa28d1a rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-e5bb549c-2301-4d33-a4ca-f7be8fa28d1a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root e5bb549c-2301-4d33-a4ca-f7be8fa28d1a
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=e5bb549c-2301-4d33-a4ca-f7be8fa28d1a rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
insmod bli
fi
### END /etc/grub.d/25_bli ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
fi
fi
### END /etc/grub.d/30_uefi-firmware ###
### 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.
### 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 ###
그런 다음 나는 또한 그 줄의 주석 처리를 해제하려고 시도했습니다./etc/default/grub
GRUB_DISABLE_OS_PROBER=false
똑같은 일을 했지만 어쨌든 Windows를 감지하지 못했습니다. GRUB 구성을 생성한 후 받은 메시지는 다음과 같습니다.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
done
그러나 결과는 같습니다.
또한 내 모든 파티션은 다음과 같습니다.
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1023999 1021952 499M Windows recovery environment
/dev/nvme0n1p2 1024000 1228799 204800 100M EFI System
/dev/nvme0n1p3 1228800 1261567 32768 16M Microsoft reserved
/dev/nvme0n1p4 1261568 1409193983 1407932416 671.4G Microsoft basic data
/dev/nvme0n1p5 1952376832 1953521663 1144832 559M Windows recovery environment
/dev/nvme0n1p6 1409193984 1948162047 538968064 257G Linux filesystem
/dev/nvme0n1p7 1948162048 1952376831 4214784 2G Linux swap
/efi/EFI/Microsoft/Boot
Windows는 이 디렉터리 에서 시작됩니다 .
efibootmgr
이것이 명령의 결과이다
BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0004,0001
Boot0001* Windows Boot Manager HD(2,GPT,da178692-f29b-4f3d-acbf-e3259f35817a,0xfa000,0x32000)/File(\EFI\GRUB\GRUBX64.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot0004* Windows Boot Manager HD(2,GPT,da178692-f29b-4f3d-acbf-e3259f35817a,0xfa000,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
Boot0005* UEFI: USB DISK 2.0 PMAP, Partition 1 PciRoot(0x0)/Pci(0x1,0x2)/Pci(0x0,0x0)/USB(6,0)/HD(1,MBR,0x36f5a9fc,0x800,0x39d1800)0000424f
따라서 무엇이 잘못되었는지 알고 계시다면 알려주시기 바랍니다.