Grubのことをいろいろ勉強してみた
ま、結局のところトラブったわけで…。
いろいろ勉強になりました。
お世話になったgrubのコマンド
help
- ヘルプ。
- "help コマンド"で各コマンドの詳細が表示される。
grub> help background RRGGBB blocklist FILE boot border RRGGBB cat FILE chainloader [--force] FILE clear color NORMAL [HIGHLIGHT] configfile FILE displayapm displaymem find FILENAME foreground RRGGBB geometry DRIVE [CYLINDER HEAD SECTOR [ halt [--no-apm] help [--all] [PATTERN ...] hide PARTITION initrd FILE [ARG ...] kernel [--no-mem-option] [--type=TYPE] makeactive map TO_DRIVE FROM_DRIVE md5crypt module FILE [ARG ...] modulenounzip FILE [ARG ...] pager [FLAG] partnew PART TYPE START LEN parttype PART TYPE quietboot reboot root [DEVICE [HDBIAS]] rootnoverify [DEVICE [HDBIAS]] serial [--unit=UNIT] [--port=PORT] [- setkey [TO_KEY FROM_KEY] setup [--prefix=DIR] [--stage2=STAGE2_ shade INTEGER splashimage FILE terminal [--dumb] [--no-echo] [--no-ed terminfo [--name=NAME --cursor-address testvbe MODE unhide PARTITION uppermem KBYTES vbeprobe [MODE] viewport x0 y0 x1 y1
geometry (hd0)
- Print the information for a drive DRIVE.
hide (hd0,1)
- Hide PARTITION by setting the "hidden" bit in its partition type code.
unhide (hd0,0)
- Unhide PARTITION by clearing the "hidden" bit in its partition type code.
boot
- Boot the OS/chain-loader which has been loaded.
Windowsパーティションを起動する場合のコマンド例
grub> unhide (hd0,0) grub> hide (hd0,1) grub> rootnoverify (hd0,0) grub> makeactive grub> chainloader +1 grub> boot
Linuxパーティションを起動する場合のコマンド例
grub> root (hd0,2) grub> kernel /boot/vmlinuz-X.X.X-XX ro root=/dev/hda3 grub> initrd /boot/initrd-X.X.XX-XX.img grub> boot