cat /etc/default/grub で GRUB 設定を確認する
このステップでは、GRUB 設定ファイルを調べます。GRUB (GRand Unified Bootloader) は、Ubuntu を含む多くの Linux ディストリビューションのブートローダーです。コンピュータを起動すると最初に実行されるソフトウェアで、オペレーティングシステムのカーネルをロードする役割を担っています。
GRUB の主要な設定ファイルは /etc/default/grub
にあります。このファイルには、GRUB の動作を決定する設定が含まれています。たとえば、ブートするデフォルトのオペレーティングシステム、ブート前のタイムアウト時間、カーネルパラメータなどです。
cat
コマンドを使ってこのファイルの内容を表示しましょう。cat
コマンドは、ファイルの内容を表示するために使用されます。
ターミナルが開いていない場合は開きます。デスクトップの左側にある Xfce Terminal アイコンをクリックすると開きます。
次のコマンドを入力し、Enter キーを押します。
cat /etc/default/grub
ターミナルに /etc/default/grub
ファイルの内容が表示されます。以下のような内容が表示されるでしょう。
## If you change this file, run 'update-grub' afterwards to update
## /boot/grub/grub.cfg.
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
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 graphical terminal (grub-gfxpayload is needed)
#GRUB_TERMINAL=gfxterm
## The resolution used on graphical terminal
## settings below may not work on your chipset but may be useful for EFI panel
## sizes
#GRUB_GFXMODE=640x480
## Uncomment to disable graphical terminal on boot problems
#GRUB_TERMINAL_INPUT=console
## Uncomment to disable menu scrolling
#GRUB_MENU_SCROLL_STYLE=menu
## Uncomment to enable hidden menu by default
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
## Uncomment to enable BadRAM filtering, modify to suit your needs
## This works only with Linux 2.6.25 or later using pci_filter_enable=1
## and needs BadRAM filtering support in the kernel
#GRUB_BADRAM="0x0123456789abcdef,0xghijkllmnopqrstuvwxyz"
## Uncomment to disable graphical boot (use text mode)
#GRUB_DISABLE_GRAPHICS_OVERRIDE=true
## If you want to enable the GRUB boot menu at boot time, uncomment the following line:
#GRUB_ENABLE_CRYPTODISK=y
## The following lines are for the default grub menu entry
#GRUB_INIT_TUNE="480 440 1"
## Uncomment to set a custom theme
#GRUB_THEME=/path/to/grub/theme
## Uncomment to enable os-prober, which detects other operating systems
#GRUB_DISABLE_OS_PROBER=false
このファイルには様々な設定が含まれています。たとえば:
GRUB_DEFAULT
:ブートするデフォルトのメニューエントリを指定します。0
は最初のエントリを意味します。
GRUB_TIMEOUT
:デフォルトのエントリが自動的にブートされるまでの時間(秒)を設定します。
GRUB_CMDLINE_LINUX_DEFAULT
:デフォルトのエントリをブートする際にカーネルに渡されるカーネルパラメータが含まれています。
このファイルを理解することは、高度な Linux 設定やブート問題のトラブルシューティングに不可欠です。
Continue をクリックして次のステップに進みます。