Ubuntu, Debian 및 GRUB가 이미 설치된 UEFI 하드 드라이브에 Arch Linux를 추가하려고 합니다.

Ubuntu, Debian 및 GRUB가 이미 설치된 UEFI 하드 드라이브에 Arch Linux를 추가하려고 합니다.

Arch 64비트 ISO를 USB 썸 드라이브에 다운로드하고 부팅했습니다. 대상 시스템은 Athlon CPU와 8GB RAM, UEFI가 포함된 1TB 하드 드라이브를 갖춘 Gigabyte 보드입니다.

내장된 "Installation_Guide" 스크립트를 따라 최대한 가깝게 따랐습니다. 그 중 일부는 약간 모호합니다.

이 기사도 검토했지만 이 기사나 설치 가이드에서는 멀티 부팅을 시도하는 경우 수행할 작업에 대해 실제로 설명하지 않습니다. https://www.tecmint.com/arch-linux-installation-and-configuration-guide/

이미 "부팅 파티션"으로 사용되는 첫 번째 파티션 sda1이 있고(아마도) Ubuntu는 sda2에, Debian은 sda3에, swap은 sda4에 있으므로 fdisk로 sda5를 만들고 ext4로 포맷했습니다. 지침에 따라 Arch와 vi를 설치했습니다. 기존 스왑 파티션을 사용했는데 왜 안되나요? 한 번에 하나의 OS만 실행할 수 있습니다.

모든 언어와 로케일, 시간대 구성을 검토했습니다. localhost와 호스트 이름을 설정합니다.

fstab을 만들었고 여기에는 3개의 항목이 있습니다. 하나는 EFI 파티션용, 하나는 스왑용, 다른 하나는 기본 OS용입니다. chroot 환경에 GRUB를 설치했습니다.

어쨌든 재부팅한 후에는 이전과 동일한 부팅 선택 항목인 Ubuntu(여러 옵션)와 Debian만 표시됩니다. Arch USB에서 다시 부팅했고 sda5로 이동하여 모든 것이 아직 남아 있는지 확인할 수 있었습니다.

중요한 단계 하나를 놓치고 있는 것 같지만 그것이 무엇인지 알 수 없습니다. 어떤 안내에도 감사드립니다.

5년 전의 이 관련 기사에서는 grub-probe의 사용을 제안합니다(아직 시도하지 않았습니다). 또한 grub에는 많은 문서가 있음을 나타냅니다. 왜 그렇습니다. 아주 많이. 어쩌면 너무 많을 수도 있습니다.

https://stackoverflow.com/questions/38139756/how-to-triple-boot-debian-arch-linux-ubuntu

Ubuntu에 로그인하여 /proc/partitions를 확인합니다. /dev/sda의 결과만 표시됩니다.

larry@Old-Gigabyte:~$ cat /proc/partitions 
major minor  #blocks  name

   8        0  976762584 sda
   8        1     524288 sda1
   8        2  167912448 sda2
   8        3  163086336 sda3
   8        4   16384000 sda4
   8        5   52428800 sda5
larry@Old-Gigabyte:~$ 

fdisk /dev/sda는 다음을 보여줍니다:

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 680F4B2C-CEB6-4011-A765-471C99ED79AF

Device         Start       End   Sectors   Size Type
/dev/sda1       2048   1050623   1048576   512M EFI System
/dev/sda2    1050624 336875519 335824896 160.1G Linux filesystem
/dev/sda3  336875520 663048191 326172672 155.5G Linux filesystem
/dev/sda4  663048192 695816191  32768000  15.6G Linux swap
/dev/sda5  695816192 800673791 104857600    50G Linux filesystem

/etc/fstab은 다음과 같습니다.

    larry@Old-Gigabyte:~$ cat /mnt/arch/etc/fstab 
# /dev/sda5
UUID=ea07243f-d202-4061-bd97-aa166676e0de   /           ext4        rw,relatime 0 1

# /dev/sda1
UUID=21A8-3956          /efi        vfat        rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 2

# /dev/sda4
UUID=35a1d790-7070-4056-8536-799099738d6b   none        swap        defaults    0 0

larry@Old-Gigabyte:~$ 

efi 파티션의 일부 정보:

root@Old-Gigabyte:/mnt/efi/EFI/ubuntu# cd ../..
root@Old-Gigabyte:/mnt/efi# ls -lR
.:
total 4
drwx------ 4 root root 4096 Sep  5  2019 EFI

./EFI:
total 8
drwx------ 2 root root 4096 Sep  5  2019 BOOT
drwx------ 2 root root 4096 Mar  5  2020 ubuntu

./EFI/BOOT:
total 3748
-rwx------ 1 root root 1341560 Mar 18 20:24 BOOTX64.EFI
-rwx------ 1 root root 1222800 Mar 18 20:24 fbx64.efi
-rwx------ 1 root root 1269496 Sep  5  2019 mmx64.efi

./EFI/ubuntu:
total 3672
-rwx------ 1 root root     108 Mar 18 20:24 BOOTX64.CSV
-rwx------ 1 root root     126 Mar 18 20:24 grub.cfg
-rwx------ 1 root root 1130368 Mar 18 20:24 grubx64.efi
-rwx------ 1 root root 1277024 Mar 18 20:24 mmx64.efi
-rwx------ 1 root root 1341560 Mar 18 20:24 shimx64.efi
root@Old-Gigabyte:/mnt/efi# 

root@Old-Gigabyte:/mnt/efi# cat EFI/ubuntu/BOOTX64.CSV 
shimx64.efi,ubuntu,,This is the boot entry for ubuntu
root@Old-Gigabyte:/mnt/efi# 

root@Old-Gigabyte:/mnt/efi# cat EFI/ubuntu/grub.cfg 
search.fs_uuid 0fb648e7-69b8-4701-be8f-3a01a1c820da root hd0,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
root@Old-Gigabyte:/mnt/efi# 

실제 GRUB 메뉴 항목이 Ubuntu 파티션에 있는 것처럼 보입니다(제가 먼저 설치한 것입니다). 이 파일의 내용은 생성된 것으로 나타나며 상단에는 다음이 표시됩니다.

root@Old-Gigabyte:/boot/grub# cat 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
#

grub-mkconfig를 살펴보겠습니다....

흥미로운 점은 Ubuntu 파티션의 grub.cfg가 올바른 것으로 보인다는 것입니다. 일종의 데이지 체인이 진행되고 있는 것 같은데요?

/boot/grub/grub.cfg를 업데이트하기 위해 이것을 실행했습니다.

root@Old-Gigabyte:/boot/grub# grub-mkconfig -o ./grub.cfg
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-72-generic
Found initrd image: /boot/initrd.img-5.4.0-72-generic
Found linux image: /boot/vmlinuz-5.4.0-71-generic
Found initrd image: /boot/initrd.img-5.4.0-71-generic
Found Debian GNU/Linux 10 (buster) on /dev/sda3
Found Arch Linux on /dev/sda5
Adding boot menu entry for EFI firmware configuration
done
root@Old-Gigabyte:/boot/grub# 

지금 재부팅하고 최선을 다하겠습니다.

어떤 단서라도 주셔서 감사합니다.

DL

관련 정보