Grub2から設定ファイルを自動ロードするにはどうすればよいですか?

Grub2から設定ファイルを自動ロードするにはどうすればよいですか?

私のパーティションは以前のバージョンのgrubではサポートされなくなったため、grub2をインストールしましたが、以前のバージョンのgrubと同じようにテキストメニューを表示することはできません。コンピュータを起動すると、設定ファイルを手動でロードする必要があるCLIが提供されますか?私の設定ファイルは大丈夫です。しかし、grub2を使って自動起動するにはどうすればよいですか?私のオペレーティングシステムはopenSUSEであり、grub2-mkconfig --output = / boot / grub2 / grub.confを使用して設定ファイルを生成します。その後、grub2-install /dev/sda2 を使って grub2 をインストールしました。また、/etc/default/grubを編集してメニューを表示し、hideoutmenu行をコメントアウトしました。これは非常に迷惑なエラーなので、助けてください。とても感謝しています!

更新:私の質問を読んでください。 openSUSEとLinuxは少し奇妙です。 grub2-mkconfig -o /boot/grub2/grub.conf を試しました。 grub.cfgも試してみました。 grub-mkconfigはなく、grub2-mkconfigのみがあります。 update-grub(またはupdate2-grub)もありません。これはopenSUSEに存在しないスクリプトです! ! ! ? !

アップデート2:グラフィックカードの問題ですか?私のgrub2-mkconfigはWindowsオペレーティングシステムを認識します。http://ubuntuforums.org/showthread.php?t=1485072&page=3

更新3:--forceを使用してもこのエラーメッセージが表示されます。

/usr/sbin/grub2-bios-setup: Warnung: Dateisystem »ext2« unterstützt keine   
Einbettungen.
/usr/sbin/grub2-bios-setup: Warnung: Einbettung ist nicht möglich. GRUB  
kann in dieser Konfiguration nur mittels Blocklisten installiert werden. 
Blocklisten sind allerdings UNZUVERLÄSSIG und deren Verwendung wird daher 
nicht empfohlen..
installation beendet. Keine Fehler aufgetreten.

アップデート4:

  grub2-mkconfig --output=/boot/grub2/grub.cfg
  grub.cfg wird erstellt …
  Linux-Abbild gefunden: /boot/vmlinuz-3.4.4-1.1-desktop
  initrd-Abbild gefunden: /boot/initrd-3.4.4-1.1-desktop
     No volume groups found
  Windows 7 (loader) auf /dev/sdc1 gefunden
  erledigt

アップデート5:要求どおりに/dev/sda2の代わりに/dev/sdaを使用しましたが、うまく機能し、--forceコマンドは必要ありませんでした。

   grub2-install --boot-directory=/boot/grub2 /dev/sda
   installation beendet. Keine Fehler aufgetreten.

ただし、この追加情報にはupdate-grub2スクリプトがあります。https://build.opensuse.org/package/view_file?file=README.openSUSE&package=grub2&project=openSUSE%3AFactory&rev=c3401e0f5ec23451c03caa9b77fa0d99

しかし、私はそうではありませんか?

アップデート6:

# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg'     
afterwards to update 
# /boot/grub2/grub.cfg.
GRUB_DISTRIBUTOR="openSUSE"

GRUB_DEFAULT=2
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash=silent"
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=800x600

# 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_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/background.png
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt

アップデート7:私のファイルgrub-mkconfig_libも/usr/lib/grubではなく/usr/share/grub2にあります。http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/476722-grub2-broken-12-2-rc1.html

アップデートと修正:

  1. エラー:私のgrub設定ファイルのGRUB_HIDDEN_TIMEOUT_QUIET = true行をGRUB_HIDDEN_TIMEOUT_QUIET = falseに変更し、#GRUB_HIDDEN_TIMEOUT = 0行にコメントしました。
  2. バグ:/boot/grub2がどこにでもデフォルトのパスであるにもかかわらず、/boot/grub2ではなく/bootでのみ実行されます。奇妙な。 AHCIを使っているからでしょうか? ? ?

ベストアンサー1

デフォルトの/boot/grubディレクトリを使用しないため、grubに/boot/grub2を使用するように指示する必要があります。

grub-install --boot-directory=/boot/grub2 /dev/sda2

おすすめ記事