2018 Sep. 15.
2018 Sep. 09.
2017 May 04.
2017 Jan. 15.
デフォルト起動エントリーの変更
エントリーの確認
# grep 'menuentry' /boot/grub/grub.cfg  menuentry 'Ubuntu, with Linux 4.4.0-31-generic'  menuentry   menuentry 'Windows Vista (loader) (on /dev/sda3)' デフォルト起動エントリーの設定
/etc/default/grub のGRUB_DEFAULT= に起動エントリーを記述する
  GRUB_DEFAULT='Ubuntu 14.04.5 LTS (14.04) (on /dev/sda10)' # update-grub 前回起動したエントリーで起動する設定
/etc/default/grub の GRUB_DEFAULT= と GRUB_SAVEDEFAULT= を次に設定する。
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
// GRUB_DEFAULT=0 :エントリーの一番先頭がデフォルトで選択される
# update-grub 次回起動エントリーの一時的変更
(askubuntu.com/questions/838704/grub-reboot-to-specific-kernel/838835) エントリーを指定して grub-reboot を実行する。GRUB_DEFAULT=saved
# update-grub# grep 'menuentry' /boot/grub/grub.cfg    menuentry 'Ubuntu, with Linux 4.4.0-31-generic'    menuentry 'Ubuntu 14.04.5 LTS (14.04) (on /dev/sda10)'    menuentry 'Windows Vista (loader) (on /dev/sda3)' # grub-reboot'Ubuntu, with Linux 4.4.0-31-generic'
あるいは    N: menuentry number   # grub-reboot "Advanced options for Ubuntu>Ubuntu, with Linux 4.2.0-16-generic"  あるいは  # grub-reboot "1>2" 起動エラー対処
起動時にエラーとなりgrubシェルプロンプト画面となった時
grub.cfgファイルの場所を特定する。
grub> ls (hd0,msdos8)/boot/grub
環境変数をセットする
grub> set prefix=(hd0,msdos8)/boot/grub
grub> set root=(hd0,msdos8)
grubメニュー画面を起動する。
grub> insmod normal
grub> normal
Linux起動後
# grub-install /dev/sda
# update-grub
FreeBSDの起動パーティション番号
# fdisk -l /dev/sda
デバイス   起動     Start 最後から セクタ   Size Id タイプ
/dev/sda1            2048  61382655  61380608  29.3G  7 HPFS/NTFS/exFAT
/dev/sda2        61384702 414670847 353286146 168.5G  5 拡張領域
/dev/sda3  *    414670848 488071167  73400320    35G a5 FreeBSD
/dev/sda5        61384704  83748863  22364160  10.7G  7 HPFS/NTFS/exFAT
/dev/sda6        83750912  92147711   8396800     4G 82 Linux スワップ / Solaris
/dev/sda7        92149760  93220863   1071104   523M 83 Linux
/dev/sda8        93222912 136230911  43008000  20.5G 83 Linux
/dev/sda9       136232960 414668799 278435840 132.8G 83 Linux
grubシェルでのFreeBSDパーティション
(hd0,msdos6)/etc/grub.d/40_custom での設定
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "FreeBSD" {
  set root=(hd0,3)
  chainloader +1
}
 
0 件のコメント:
コメントを投稿