grub-install memo

#grub-install は Linuxコマンドラインからたたく、いわばgrub "もどき”

stage1,stage1.5,stage2 を しかるべきところにインストールしてくれる。

なにはなくとも
#dd if=/dev/xxx of=mbr-bkup bs=512 count=1
MBR領域はバックアップしておくべきで

#grub-install --root-directory=/ /dev/xxx

(/と/bootが同一パーティションだったら #grub-install /dev/xxx でOK?)

フロッピーがあるならば、

[root@cent5-19 export]# dd if=/boot/grub/stage1 of=/dev/fd0 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.290806 seconds, 1.8 kB/s
[root@cent5-19 export]# dd if=/boot/grub/stage2 of=/dev/fd0 seek=1
204+1 records in
204+1 records out
104924 bytes (105 kB) copied, 7.35111 seconds, 14.3 kB/s
[root@cent5-19 export]# 

にてgrub boot diskをつくれる


grubについて http://saminnet.dip.jp/servercomputer/Lmemo/pub/grub.html

HDD換装とUbuntu環境の移行

http://www.watanet.org/~chihiro/index.cgi/linux/ubuntu/20081202_ubuntu-hdd-replace-uuid-hibernate-issue.html