windows overwrote boot record

Juan Kawada juankawada at gmail.com
Fri Aug 22 00:21:29 BST 2008


ubuntu at ubuntu:~$ sudo fdisk -l
omitting empty partition (5)

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x724bd9dc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        6869    55175211    7  HPFS/NTFS
/dev/sda2            6870       11778    39431542+   7  HPFS/NTFS
/dev/sda3           11779       38913   217961887+   5  Extended
/dev/sda4           38162       38913     6040408+  82  Linux swap / Solaris
/dev/sda5           11779       38161   211921384+  83  Linux


ok. I also tried this:
ubuntu at ubuntu:~$ sudo mount /dev/sda6 /media
mount: special device /dev/sda6 does not exist
ubuntu at ubuntu:~$ sudo mount /dev/sda5 /media
ubuntu at ubuntu:~$ sudo grub-install --root-directory=/media /dev/sda5
The file /media/boot/grub/stage1 not read correctly.



On 8/21/08, Karl Klinger <karlok at fastmail.fm> wrote:
> Juan Kawada wrote:
>> would hd0 be my boot partition?  sorry I have no idea what i'm doing
>> really. How do I know what my boot/root partitions are?
>>
>>
>> On 8/21/08, Willy K. Hamra <w.hamra1987 at gmail.com> wrote:
>>> 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
>>> AFAIK.
>>> 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
>>>
>>
>>
>  From your grub output it looks like your root partition is sda6 and you
> don't have a separate boot partition.  Thus you could:
>
> sudo mount /dev/sda6 /media
>
> At this point you could do an 'ls /media' to make sure that it contains
> the linux directory tree.  If all is well, do:
>
> sudo grub-install --root-directory=/media /dev/sda6
>
> Karl
>
> p.s. I noticed on another thread that you had recently installed a
> second dvd drive.  I wonder if this could have confused grub and caused
> it to fail.
>
> --
> kubuntu-users mailing list
> kubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
>


-- 
---------------
Registered Linux user  #475220
register at http://counter.li.org/



More information about the kubuntu-users mailing list