
내가 뭔가를 놓치고 있는 걸까요, 아니면 왜 수동 파티셔닝 + 미리 설정을 사용하여 지정된 위치에 grub을 항상 설치할 수 없는 걸까요?
저는 파티셔닝 지시문이 없는 xubuntu 20.04.2 데스크탑용 미리 설정 파일을 사용합니다. "automatic-ubiquity"가 부팅되면 sda를 수동으로 파티셔닝한 후 /dev/sda1을 선택하면 무시되고 grub이 /dev/sda에 설치됩니다.
추가 d-i grub-installer/only_debian boolean false
및/또는 d-i grub-installer/with_other_os boolean false
미리 설정되었습니다. sda를 수동으로 파티셔닝한 후 /dev/sda1을 선택하면 무시되고 grub이 /dev/sda에 설치됩니다.
동적으로 설정하는 방법을 해킹했지만 d-i grub-installer/bootdev string default
이를 위해서는 실제 환경으로 부팅하고, 디스크를 분할하고 활성 파티션을 먼저 설정한 다음 "유비쿼터스 --자동"을 시작하거나 "자동-유비쿼터스"를 사용하여 재부팅해야 합니다.
d-i grub-installer/only_debian boolean false
d-i grub-installer/with_other_os boolean false
d-i grub-installer/bootdev string default
d-i partman/early_command string \
BOOTFLAG=$(lsblk -rpo PARTFLAGS,PKNAME,PATH | grep "0x80" | cut -f 3 -d ' '); \
if [ $BOOTFLAG ]; then debconf-set grub-installer/bootdev $BOOTFLAG; fi;
테스트는 단일 디스크가 있는 VM에서 작동하지만 여러 디스크가 있는 하드웨어 또는 USB에서 설치하는 경우 원하는 대로 작동하지 않을 수 있습니다.
d-i grub-installer/skip boolean true
항상 무시되는 것 같습니다. 다시 한 번 그 일을 할 수 있는 방법을 알아냈고, d-i grub-installer/bootdev string
그것을 비워 두었습니다. ubiquity/success_command에 grub을 수동으로 설치하면 작동하지 않습니다. /dev/sda1의 처음 몇 섹터를 검사하면 모두 00입니다. 다른 명령은 성공적으로 완료됩니다.
d-i grub-installer/only_debian boolean false
d-i grub-installer/with_other_os boolean false
d-i grub-installer/bootdev string
ubiquity ubiquity/success_command string \
in-target grub-install -‑force /dev/sda1; \
echo "tmpfs /tmp tmpfs nosuid,nodev 0 0" >> /target/etc/fstab;
답변1
결국 나는 그 partman/early_command
방법을 포기했다. 현재 저는 grub-installer/bootdev
비워두고 파티션 ubiquity/success_command
에 grub을 강제로 설치 /target
하고 활성 상태로 표시하는 데 사용하도록 설정했습니다.
좀 추악하지만 작동합니다. sata/nvme/mbr 파티션 테이블에 대해서만 테스트되었으며 ext2/3/4를 사용하여 별도의 부팅/홈/루트 파티션에 대해 테스트되었습니다.
d-i grub-installer/only_debian boolean false
d-i grub-installer/with_other_os boolean false
d-i grub-installer/bootdev string
ubiquity ubiquity/success_command string \
echo 'tmpfs /tmp tmpfs nosuid,nodev 0 0' >> /target/etc/fstab ;\
worker() { grub-install --force --root-directory=/target $2 &&\
parted -s $3 -- set ${4##*-} boot on; } ;\
worker $(lsblk -lpo MOUNTPOINT,KNAME,PKNAME,PARTUUID | grep '/target ');
궁극적으로 나는 GUI의 선택 사항을 반영하기 위해 편재성을 업데이트해야 한다고 생각합니다.