windows overwrote boot record

Willy K. Hamra w.hamra1987 at
Thu Aug 21 19:35:35 UTC 2008

Juan Kawada wrote:
> I just had to reinstall windows, and it overwrote the boot record, I
> now boot to a screen that says
> windows xp home edition
> windows xp professional
> I got into a live cd and tried this:
> sudo grub
> find /boot/grub/stage1
> root (hd0,5)
> setup (hd0)
> and got:
> grub> find /boot/grub/stage1
>  (hd0,5)
> grub> root (hd0,5)
> grub> setup (hd0)
>  Checking if "/boot/grub/stage1" exists... yes
>  Checking if "/boot/grub/stage2" exists... yes
>  Checking if "/boot/grub/e2fs_stage1_5" exists... yes
>  Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
> succeeded
>  Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,5)/boot/grub/stage2
> /boot/grub/menu.lst"... failed
> Error 22: No such partition
> What's wrong?  I've also tried setup (hd0,5) with similar results.
> Is this because I'm using i'm using the 7.10 live cd on an 8.04
> install? I'm not sure where my 8.04 disc went.

i don't think it matters, grub is the same for all versions and distros
i'm sorry i can't be of much help, since i never used that command, when
i do any reinstall/repair of windows, and the MBR gets overwritten, i
boot the LiveCD-any *buntu LiveCD-and do the following
mount my partition, if you have more than 1 partition, you need to mount
the root partition and the boot partition, keeping their original
directory tree, for example, if you mounted the root partition under
/media , you should mount the boot partition under /media/boot .
and then i issue the following command:

sudo grub-install --root-directory={mount directory} /dev/{the device}

mount directory=the directory you mounted your root partition at
the device=the hard disk device you want to install grub on

hope this works

Willy K. Hamra
Manager of Hamra Information Systems
Co. Manager of Zeina Computer & Billy Net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: w_hamra1987.vcf
Type: text/x-vcard
Size: 130 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the kubuntu-users mailing list