grub プロンプトから起動する†
- どういう名前のディスクがあるかを確認する
grub> ls
(hd0), (hd0,gtp1), (hd0,gtp2), (hd0,gtp3), ...
- 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> は、必要なときだけ指定すれば良い
- grub の画面で "e" をタイプする
- コマンドラインの編集画面が表示されると、以下のような行があるので、その後ろに runlevel を数字で指定する。
linux /boot/vmlinuz-** root=** ro quiet
- Ctrl-x または F12 キーで編集画面を終了し、起動処理が開始する。
grub2 の install に失敗する†
root@benda:/home/kazu# /usr/sbin/grub-install /dev/sda
Installing for i386-pc platform.
/usr/sbin/grub-install: 警告: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
/usr/sbin/grub-install: 警告: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-install: エラー: will not proceed with blocklists.
root@benda:/home/kazu# /sbin/fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
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 System
/dev/sda2 585728 390819839 390234112 186.1G Linux filesystem
/dev/sda3 390819840 1758007295 1367187456 651.9G Linux filesystem
/dev/sda4 1758007296 1953523711 195516416 93.2G Linux swap
root@benda:/home/kazu# /sbin/fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
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 System
/dev/sda2 585728 390819839 390234112 186.1G Linux filesystem
/dev/sda3 390819840 1758007295 1367187456 651.9G Linux filesystem
/dev/sda4 1758007296 1953523711 195516416 93.2G Linux swap