Ads 468x60px

วันพุธที่ 19 ตุลาคม พ.ศ. 2554

การ Re-installing GRUB จาก Rescue System

http://www.susethailand.com/suseforum/index.php?topic=1645.0
จากสถานการณ์ที่ GRUB boot loader เกิดความเสียหายด้วยเหตุผลบางอย่าง เช่น ระหว่าง fsck ผู้ใช้อาจจะกดปุ่ม reset ที่เครื่องคอมพิวเตอร์ หรือ เกิดจากไฟฟ้าติดๆ ดับๆ โดยคอมพิวเตอร์ไม่ได้เชื่อมต่อกับเครื่องสำรองไฟ (UPS) ซึ่งจำเป็นต้องติดตั้ง Boot loader ใหม่

การ Re-installing GRUB จาก Rescue System

1. บูตจากแผ่น DVD (SLED หรือ SLES 11)

2. เลือก "Rescue System"

3. ล็อคอินด้วย root

4. พิมพ์คำสั่ง grub

Code:
opensuse:~ # grub

    GNU GRUB  version 0.97  (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> find /boot/grub/stage1
 (hd0,0)

grub> root (hd0,0)
 Filesystem type is reiserfs, partition type 0xfd

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
 Running "embed /boot/grub/reiserfs_stage1_5 (hd0)"...  18 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+18 p (hd0,0)/boot/grub/stage2 /boot/
grub/menu.lst"... succeeded
Done.

grub> quit

จากตัวอย่างด้านบน รูทพาร์ติชันคือ (hd0,0) ได้จากการใช้คำสั่งค้นหา (find /boot/grub/stage1)

5. รีบูตเครื่อง (เป็นอันเสร็จ)

0 ความคิดเห็น: