最終更新:2016-07-15 (金) 03:19:45 (2843d)  

GRUB
Top / GRUB

GNU GRand Unified Bootloader

http://www.gnu.org/software/grub/

バージョン

ブートメニュー

  • PCの電源を入れたら「Shift」キーを押しっぱなしにする

カーネルパラメータの追加 (Ubuntu)

ドキュメント

コマンド

  • mbchk?
  • mkbimage?

構成

boot.img (ステージ1)

  • MBRにインストールされる
  • カーネルをロードするcore.imgをロード。
  • core.imgへのポインタを格納
  • On PC BIOS systems, this image is the first part of GRUB to start. It is written to a master boot record (MBR) or to the boot sector of a partition. Because a PC boot sector is 512 bytes, the size of this image is exactly 512 bytes.
  • The sole function of boot.img is to read the first sector of the core image from a local disk and jump to it. Because of the size restriction, boot.img cannot understand any file system structure, so grub-setup hardcodes the location of the first sector of the core image into boot.img when installing GRUB.

core.img (ステージ1.5)

  • 実行に必要なモジュールのロードとカーネルのロードを行う
  • MBRの直後の部分か、/bootファイルシステムがあるパーティションのどこか

OS別

Ubuntu 14.04

  • GRUB 2.02beta2
    setparams 'Ubuntu'
    
                recordfail
                load_video
                gfxmode $linux_gfx_mode
                insmod gzio
                insmod part_msdos
                insmod ext2
                set=root'hd0,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1--hint-efi=hd0,msdos1 --hint -baremetal =ahci0,msdos1 xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
                else
                  search --no-floppy --fs-uuid --set=root xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
                fi
                linux   /boot/vmlinuz-3.13.0-32-generic root=UUID=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx ro quiet splash $vt_handoff
                initrd  /boot/initrd.img-3.13.0-32-generic

関連

参考