System/grub
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#topicpath
/////////////////////////////////////////////////////////...
* 目次 [#w32711e9]
#contents();
/////////////////////////////////////////////////////////...
* grub プロンプトから起動する [#xa2d1aef]
- grub プロンプトを操作してシステムを起動する
+ どういう名前のディスクがあるかを確認する
grub> ls
(hd0), (hd0,gtp1), (hd0,gtp2), (hd0,gtp3), ...
-- どれが root ファイルシステムかわからない場合は、リスト...
grub> ls (hd0,gtp2)/
boot home usr var <- / にあるはずのものが見えているの...
+ root ファイルシステムを指定する
grub> set root=(hd0,gtp2)
+ カーネルイメージと root ファイルシステムを指定する
grub> linux /boot/vmlinuz-4.19.0-10-amd64 root=/dev/sda2
-- ファイル名は bash 同様、Tab で補完できる。
+ initrd を指定する
grub> initrd /boot/initrd.img-4.19.0-10-amd64
+ boot する
grub> boot <run-level>
-- <run-level> は、必要なときだけ指定すれば良い
/////////////////////////////////////////////////////////...
* 起動時に [[runlevel>System/runlevel]] を変更する [#d1cc...
+ grub の画面で "e" をタイプする
+ コマンドラインの編集画面が表示されると、以下のような行...
linux /boot/vmlinuz-** root=** ro quiet
+ Ctrl-x または F12 キーで編集画面を終了し、起動処理が開...
* grub2 の install に失敗する [#g6e4d039]
root@benda:/home/kazu# /usr/sbin/grub-install /dev/sda
Installing for i386-pc platform.
/usr/sbin/grub-install: 警告: this GPT partition label c...
/usr/sbin/grub-install: 警告: Embedding is not possible....
/usr/sbin/grub-install: エラー: will not proceed with bl...
root@benda:/home/kazu# /sbin/fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 19535251...
Disk model: ST1000LM048-2E71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A7E01EA8-10EF-42FF-B030-18FD76481CDB
Device Start End Sectors Size Type
/dev/sda1 2048 585727 583680 285M EFI S...
/dev/sda2 585728 390819839 390234112 186.1G Linux...
/dev/sda3 390819840 1758007295 1367187456 651.9G Linux...
/dev/sda4 1758007296 1953523711 195516416 93.2G Linux...
root@benda:/home/kazu# /sbin/fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 19535251...
Disk model: ST1000LM048-2E71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A7E01EA8-10EF-42FF-B030-18FD76481CDB
Device Start End Sectors Size Type
/dev/sda1 2048 585727 583680 285M EFI S...
/dev/sda2 585728 390819839 390234112 186.1G Linux...
/dev/sda3 390819840 1758007295 1367187456 651.9G Linux...
/dev/sda4 1758007296 1953523711 195516416 93.2G Linux...
- この後、下記を実行することにより、grub が正常に立ち上が...
# update-grub
/////////////////////////////////////////////////////////...
* grub に他の OS の起動エントリを認識させる [#grub_disabl...
- debian12 以降の grub (grub 2.06-13)では、2つ以上の OS...
- update-grub を実行しても存在するはずの他 OS を検出しな...
++ 他の OS のエントリを認識するよう、設定変更する
# vi /etc/default/grub
#GRUB_DISABLE_OS_PROBER=false # ←この行の行頭の # を削...
++ 他の OS のエントリを認識させる
# update-grub
終了行:
#topicpath
/////////////////////////////////////////////////////////...
* 目次 [#w32711e9]
#contents();
/////////////////////////////////////////////////////////...
* grub プロンプトから起動する [#xa2d1aef]
- grub プロンプトを操作してシステムを起動する
+ どういう名前のディスクがあるかを確認する
grub> ls
(hd0), (hd0,gtp1), (hd0,gtp2), (hd0,gtp3), ...
-- どれが root ファイルシステムかわからない場合は、リスト...
grub> ls (hd0,gtp2)/
boot home usr var <- / にあるはずのものが見えているの...
+ root ファイルシステムを指定する
grub> set root=(hd0,gtp2)
+ カーネルイメージと root ファイルシステムを指定する
grub> linux /boot/vmlinuz-4.19.0-10-amd64 root=/dev/sda2
-- ファイル名は bash 同様、Tab で補完できる。
+ initrd を指定する
grub> initrd /boot/initrd.img-4.19.0-10-amd64
+ boot する
grub> boot <run-level>
-- <run-level> は、必要なときだけ指定すれば良い
/////////////////////////////////////////////////////////...
* 起動時に [[runlevel>System/runlevel]] を変更する [#d1cc...
+ grub の画面で "e" をタイプする
+ コマンドラインの編集画面が表示されると、以下のような行...
linux /boot/vmlinuz-** root=** ro quiet
+ Ctrl-x または F12 キーで編集画面を終了し、起動処理が開...
* grub2 の install に失敗する [#g6e4d039]
root@benda:/home/kazu# /usr/sbin/grub-install /dev/sda
Installing for i386-pc platform.
/usr/sbin/grub-install: 警告: this GPT partition label c...
/usr/sbin/grub-install: 警告: Embedding is not possible....
/usr/sbin/grub-install: エラー: will not proceed with bl...
root@benda:/home/kazu# /sbin/fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 19535251...
Disk model: ST1000LM048-2E71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A7E01EA8-10EF-42FF-B030-18FD76481CDB
Device Start End Sectors Size Type
/dev/sda1 2048 585727 583680 285M EFI S...
/dev/sda2 585728 390819839 390234112 186.1G Linux...
/dev/sda3 390819840 1758007295 1367187456 651.9G Linux...
/dev/sda4 1758007296 1953523711 195516416 93.2G Linux...
root@benda:/home/kazu# /sbin/fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 19535251...
Disk model: ST1000LM048-2E71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A7E01EA8-10EF-42FF-B030-18FD76481CDB
Device Start End Sectors Size Type
/dev/sda1 2048 585727 583680 285M EFI S...
/dev/sda2 585728 390819839 390234112 186.1G Linux...
/dev/sda3 390819840 1758007295 1367187456 651.9G Linux...
/dev/sda4 1758007296 1953523711 195516416 93.2G Linux...
- この後、下記を実行することにより、grub が正常に立ち上が...
# update-grub
/////////////////////////////////////////////////////////...
* grub に他の OS の起動エントリを認識させる [#grub_disabl...
- debian12 以降の grub (grub 2.06-13)では、2つ以上の OS...
- update-grub を実行しても存在するはずの他 OS を検出しな...
++ 他の OS のエントリを認識するよう、設定変更する
# vi /etc/default/grub
#GRUB_DISABLE_OS_PROBER=false # ←この行の行頭の # を削...
++ 他の OS のエントリを認識させる
# update-grub
ページ名: