2010年4月3日 星期六

How to recover GRUB Debian Sarge after reinstalling Windows

Many Debian newbies often have to reinstall Windows on the same machine on where Debian is installed. Usually the Windows installation does not take care of our Debian system booting process, overwriting the master boot record with Windows.

To get back our grub first stage boot, here a procedure you can use.

* Boot from debian CD choosing linux2.4 kernel (default)
* Change to console 2 with alt + F2 keystrokes
* Make a new dir to mount the boot partition, for example /disk
* mount the root partition on /disk.
* Do a chroot to the root partition: issuing chroot /disk
* Run grub command to enter grub shell
* Type in the root disk for grub, for example root (hd0,1). This is /dev/hda2 on my system
* Type the following command to install grub on /dev/hda: setup (hd0).
* Last step, type quit, exit from chroot, unmount all disks and reboot

Some notes:

The boot partition is where you put the boot files, normally newbies use only one partition that is mounted on /. Some advanced users store boot files in a separate partition and mount it under /boot. In that case, is the partition that is mounted under /boot the known-to-grub root partition.


from:http://www.debian-administration.org/articles/325

沒有留言:

張貼留言

DNSSEC安全技術簡介 作者:游子興 / 臺灣大學計算機及資訊網路中心網路組約聘幹事 DNS 是一套已經廣泛使用的Internet 服務,但因先天的技術限制導致容易成為駭客攻擊的目標。本文主要在介紹DNSSEC 之緣起與技術背景,及其使用的加解密技術如何確保資料的完整...