서버 16.04 - 기본 Grub 부팅 옵션 실패

서버 16.04 - 기본 Grub 부팅 옵션 실패

고급 옵션으로 이동하여 첫 번째 옵션을 선택하여 서버를 부팅할 수 있습니다.

제 질문은 이것을 어떻게 자동화할 수 있느냐는 것입니다. 올바른 옵션을 선택하기 위해 부팅 프로세스 중에 누군가가 콘솔에 있도록 요구하는 것은 장기적으로 효과가 없습니다.

나는 grub 매뉴얼을 읽고 부팅 파일을 살펴보았지만 젠장 이건 악몽입니다! 이 설정 하나만 조정하면 됩니다. 기존 방식은 간단했습니다. 원하는 기본값을 선택하고 완료하면 됩니다.

다음은 사본입니다 /etc/default/grub.

# 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=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
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"

답변1

수동으로 파일을 편집하는 데 익숙하지 않은 사람을 위한 가장 쉬운 방법은 /etc/default/grub다음과 같은 프로그램을 사용할 수 있습니다.그럽 커스터마이저

일반 설정 탭 아래에 기본 항목이 표시됩니다. 기본값으로 설정하려는 항목을 선택하기만 하면 됩니다. 메뉴 표시/숨기기, 지연 시간 변경 등도 설정할 수 있습니다. 나는 여전히 메뉴를 유지하고 부팅하는 동안 쉽게 메뉴에 접근해야 할 경우를 대비해 3초 정도의 짧은 대기 시간을 갖는 것을 좋아합니다.

직접 설정하고 파일을 편집하려면 원하는 커널에 대한 올바른 행으로 변경해야 합니다. 고급 옵션 행을 확인하십시오. 이는 커널이 하위 메뉴에 있기 때문 입니다 /etc/default/grub.GRUB_DEFAULT=0GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.4.0-21-generic"

변경 사항을 적용하고 저장한 후에는 sudo update-grub터미널에서 실행하여 변경 사항을 업데이트해야 합니다. 그렇지 않으면 다음 부팅 시 덮어쓰게 됩니다.

관련 정보