grub の boot floppy を作る。

突然 lilo に
timestamp mismatch
と言われ起動できなくなる。
さっきまで起動できてたのに…。
たぶんブートローダーがおかしくなってる
/sbin/lilo を叩きなおしたいなと思い
grub?ということで。

解凍
# tar zxvf grub-0.97.tar.gz
/usr/local/ へ移動
# mv grub-0.97 /usr/local/

dos でフォーマット
# mkfs -n /dev/fd0
ディレクトリを作る
# mkdir -p /mnt/floppy/boot/grub
ファイルをコピー
# cp stage1/stage1 stage2/stage2 docs/menu.lst /mnt/floppy/boot/grub/

grub 起動
# grub/grub
GRUB version 0.91 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

grub > root (fd0)
grub > setup (fd0)
grub > quit

/boot/grub/menu.lst
#
# Sample boot menu configuration file
#

# Boot automatically after 30 secs.
timeout 30

# By default, boot the first entry.
default 0

# Fallback to the second entry.
fallback 1

## For booting GNU/Linux
title Linux
root (hd0,0) #←/boot を指定
kernel /vmlinuz-2.4.31-0vl1.8 root=/dev/sda5 #←カーネルと / を指定
initrd /initrd-2.4.31-0vl1.8.img #initrd を指定(SATAなのでsd##と認識するので必須)

で無事起動

/sbin/lilo したら直りました。

直ったと思ったら自分のマシンが壊れた(~_~)