2011. 12. 4. 23:31

grub reinstall 과 복구 - Fedora

아래처럼 C: 드라이브에는 Windows가 설치되어 있고 확장 파티션안에 Linux가 설치되어 있다.
그런데 windows를 재 설치할 일이 있어 설치하고 grub 이 날라갔다.

/dev/sda1 1 196 1572864 12  
/dev/sda2 * 196 2565 19029474+ 7 HPFS/NTFS
/dev/sda3 2566 38913 291965310 f W95 Ext'd (LBA)
/dev/sda5 2566 4703 17171456 83 Linux
/dev/sda6 4704 5225 4192256 82 Linux swap / Solaris

== Grub 재 설치하기 ==
a. Fedora 15의 Live cd를 다운 받는다.
a. USB creator를 이용해서 USB에 해당 이미지를 설치한다.
  * 기존 USB의 내용은 지워지진 않는다.
a. 위에서 만든 Fedora Live USB로 부팅을 한다.
a. /sbin/grub-install /dev/sda 로 했더니 에러가 나서 grub으로 들어가서 설치했다.
  * 에러메시지 : dm-0 no corresponding BIOS drive 
a. /sbin/grub을 실행시키고 아래처럼 했더니 잘 설치되었다.
  * grub> root (hd0,4)
  * grub> setup (hd0)

== grub.conf ==
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,4)
# kernel /boot/vmlinuz-version ro root=/dev/sda5
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=1
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.34.9-69.fc13.x86_64)
root (hd0,4)
kernel /boot/vmlinuz-2.6.34.9-69.fc13.x86_64 ro root=UUID=cd6baf71-22f3-44a2-9030-5ff68861198b rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us quiet
initrd /boot/initramfs-2.6.34.9-69.fc13.x86_64.img