overlayroot 및 grub2 - grub 메뉴가 항상 표시됩니다.

overlayroot 및 grub2 - grub 메뉴가 항상 표시됩니다.

overlayroot=tmpfs:swap=1,recurse=0나는 /etc/overlayroot.conf에 구성된 overlayroot를 사용하고 있습니다 .

overlayroot가 예상대로 작동합니다. 간단히 overlayroot를 비활성화한 다음 원하는 대로 다시 활성화하여 grub을 업데이트할 수 있었습니다. (이미지를 설정하는 중이므로 그 과정에서 꽤 많은 변경이 이루어졌습니다.)

문제는 재부팅 시 grub 구성 설정 방법에 관계없이 30초 동안 grub 메뉴가 표시된다는 것입니다. 아, 그리고 update-grub을 실행할 때마다 읽기 전용 모드가 아니었다는 점을 언급해야 합니다.

내 그럽 구성은 다음과 같습니다. 나도 노력했지만 소용없었어GRUB_DISABLE_OS_PROBER=true

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

# Disable OS Prober for selecting dual boot scenarios.
GRUB_DISABLE_OS_PROBER=true

무슨 일이 일어나고 있는지 생각하면 overlayroot가 마운트 지점을 변경합니다. 따라서 overlayroot가 비활성화되면 grub 메뉴를 표시하지 않고 부팅되는 반면, 활성화하면 더 많은 마운트 지점을 보고 메뉴를 로드하기로 결정합니다.

또한 이 게시물에서 허용되는 답변을 시도했습니다.https://serverfault.com/questions/549166/how-to-update-grub-on-a-system-running-overlayroot하지만 여전히 '/usr/sbin/grub-probe: 오류: `/dev/mmcblk0p2'의 정식 경로를 가져오지 못했습니다.'라는 오류가 발생합니다.

답변1

좋아, 해결되었습니다. 오버레이루트를 비활성화하고 다음을 추가하세요.

/etc/default/grub

GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT

그런 다음 그럽을 업데이트하십시오.

update-grub

오버레이루트 다시 활성화 및 재부팅

관련 정보