HOW TO
RESTORE THE BOOT-LOADER GRUB IN THE MBR
by Francesco Palmisano
Unfortunatly could happen that something delate your hard drive's MBR
(Master Boot Record).
Tipically when you install Windows AFETR a Linux installation.
Don't worry, there is a way to restor it.
We will use this disk structure as example:
hda1 -> windows ntfs (tipically the windows C:\)
hda2 -> windows fat32 (windows 98 partition D:\)
hda3 -> linux ext3 (/ the linux root)
hda4 -> linx swap
as i said this is an example, so you could have a different situation,
for example your PC could use SATA disk or SCSI disk and the devices
names change:
sda instead
of hda
What
we need:
A Linux distro Live! like Debian,
Ubuntu/Kubuntu, Knoppix, etc...
IMPORTANT:
If you use a 64 bit distro, you need a 64 bit Live!
distro
1) boot your computer with CD-live and use a root terminal
2) create a new folder to mount the partiton:
mkdir /media/disck
3)mount the linux partition on the hard drive:
mount /dev/hda3
/media/disck (i use the above example
device, use yours!!)
4)mount /dev for chroot use:
mount -o bind /dev
/media/disco/dev
5)login in chroot:
chroot /media/disco
6)restore GRUB (the boot-loader):
update-grub grub-install /dev/sda
It could be thecasewhere Windows partitionis not detectedand that it isimpossible tostart it; so oncestartedlinuxinstallpackage:
os-prober
and then again:
update-grub
To check your partition's table give this command:
fdisk -l /dev/hda
(fdisk -l
/dev/sda , se avete dischi Serial ATA o SCSI)