[Help] Screwed my MBR - Win 7 gobbled up the Win XP, Ubuntu dual boot.

Status
Not open for further replies.

MaRKiV

Contributor
And this is what has happened to me.

Last night, I boozed heavily came home not knowing wat to do, I installed Windows 7 b7057 :ashamed:

now i am unable to login to Win Xp or Ubuntu. Today morning after getting some consiciousness. I tried using EasyBCD to rectify the MBR but nothing happened.

this is wat my OS config looks like

HD1 Seagate 160Gb. Primary C: - Win XP, MBR boots into Win XP alone.
HD2 Samasung 40GB - Ubuntu 9.04 Alpha 6, MBR - Grub boots into Win XP/Ubuntu.

Past: when I set my HD1 as the primary hd in Bios i can boot in Win XP directly. and when in HD2 it would give an option to boot into XP or Ubuntu through GRUB 1.5.

Present: :'(

I installed Win 7 in I:/ which is a 24gb partition,
1. After install that Partition with Win 7 became C:
2. Win XP partition which was primarily C: now is recognised as D:
3. the 160GB hdd isn't showing one of the partition. i dont know why, but its hidden. dont know why :huh:
4. Even when i change the boot sequence to HD2, it boots into Win 7. Usually Grub would give a boot menu to boot into XP or Ubuntu. that is also gone now. :no:

And so is this cry for help.

is this any way is can recover the MBR to Triple boot into XP, Win 7 and Ubuntu? or is formating and reinstalling the only solution available?

So much for getting drunk :(

I did went thru the thread " triple boot windows 7 winXP and Linux" Since it was a guide how not to mess it up and i hv already messed it up I hv created a new thread...:ashamed:

Please help :(
 
Log in to Ubuntu [LiveCD and navigate to Ubuntu partition and open /boot/grub/menu.lst] copy/paste the text of OS entries here .. it is present at the end.. or log in to Ubuntu by setting HD2 and post the output of command

Code:
fdisk -l

Also leave MBR , we will restore grub with Win7 entry :)

Edit : In which HDD you installed Win7 .. ? Also have you removed Ubuntu or not ?
 
I tried to login to ubuntu, but my bad, even when i set HD2 (in which ubuntu is installed) as the primary HD, it wouldnt login to ubuntu it logs into Win 7. :(

Win 7 and XP are in HD1 and Ubuntu is in HD2.

Ubuntu is still present i will remove linux from my machine.. :D
 
^^If you want to remove linux better restore MBR , no point in keeping it of you don't want it.. But if you want to keep it then I can help you restoring grub :P
 
yup me too.. I just upgraded to new version of win 7 and have to fix grub... it's not too hard, but I'm sure Darky will give you better directions than I :)
 
^^Why not you try :P You have installed Win7 and you can give proper/practical explanation :P

Anyways waiting for him to post the output of /boot/grub/menu.lst :)
 
I put in some research and have the findings.

before that heres wat my disk architecture looks like

disk.png


Bad news: :S
1. The boot loader for Win 7 was pointing into Disk 1 (as in image above) MBR. i.e. where the Ubuntu was present with its GRUB.

2. EasyBCD has successfully and royally screwed my MBR in Disk 1 and now if i load using through Disk 1, i get the "NTLDR Is Missing" Error Message.:huh:

3. Since Disk 1 also contains Ubuntu I am not able to directly login to Ubuntu 9.04. :@

Good news: :hap2:
1. I am able to login to Win XP. but for this, i need to change boot priority to disk 2 and boot into Safe mode. I hid the Win 7 partition using Partition Magic 8.0.

2. Without the Win 7 parition being hidden Win XP wouldnt boot. so its better be kept hidden and fortunately or unfortunately I am not able to Unhide it. :hap5:

3. I used the Ubuntu 7.10 live cd and got the GRUB menu and flist details.

Grub menu:
Code:
color white/black white/blue
default		4
timeout 10

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=366260f0-dbfb-4c59-a002-5bc49ac132a5 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,6)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash vga=758

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=1

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Ubuntu jaunty (development branch), kernel 2.6.28-9-generic
root		(hd0,6)
kernel		/boot/vmlinuz-2.6.28-9-generic root=UUID=366260f0-dbfb-4c59-a002-5bc49ac132a5 ro quiet splash vga=758 
initrd		/boot/initrd.img-2.6.28-9-generic
quiet

title		Ubuntu jaunty (development branch), kernel 2.6.28-9-generic (recovery mode)
root		(hd0,6)
kernel		/boot/vmlinuz-2.6.28-9-generic root=UUID=366260f0-dbfb-4c59-a002-5bc49ac132a5 ro  single
initrd		/boot/initrd.img-2.6.28-9-generic

title		Ubuntu jaunty (development branch), memtest86+
root		(hd0,6)
kernel		/boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

title Other operating systems:
root

title Microsoft Windows XP Professional
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
savedefault
makeactive
Fdisk
Code:
[FONT="Courier New"]ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7218f129

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20482843+   7  HPFS/NTFS
/dev/sda2            2551       19457   135805477+   f  W95 Ext'd (LBA)
/dev/sda5            2551        5100    20482843+   7  HPFS/NTFS
/dev/sda6            5101        7650    20482843+   7  HPFS/NTFS
/dev/sda7            7651       10200    20482843+   7  HPFS/NTFS
/dev/sda8           10201       13387    25599546    7  HPFS/NTFS
/dev/sda9           13388       16414    24314346    7  HPFS/NTFS
/dev/sda10          16415       19457    24442866    7  HPFS/NTFS

Disk /dev/hda: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0c250c24

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1217     9775521    7  HPFS/NTFS
/dev/hda2            1218        4870    29342722+   f  W95 Ext'd (LBA)
/dev/hda5            1218        2435     9783553+   7  HPFS/NTFS
/dev/hda6            2436        3653     9783553+   7  HPFS/NTFS
/dev/hda7            3654        4730     8650971   83  Linux[/FONT]

Boot.ini from C:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /usepmtimer

hope this information is useful... :) thanks Dark Star and PiXeLpUsHeR
 
According to fdisk the system has only 2 boot options.. i.e. on one disk one and 2nd on disk 2. Donno why it isn't showing boot parameter in /dev/hda7

Now since you mentioned NTLDR is missing it bad sign .. You have to re-install Ubuntu.. but you can try this , it will restore grub..

1. Boot through the Live CD of any linux.. Open terminal and do this..

Code:
 sudo grub

find /boot/grub/stage1

You will get multiple output as you have 2 boot systems.. For ubuntu you wil get this one''

Code:
(hda 1,6)

Now do this

Code:
root (hda 1,6) [1 is the hard drive numer . 6 is partition number -1]

setup(hda1)

That will restore Grub, If you get Ubuntu and Xp at reboot.. Open terminal and type this

Code:
sudo gedit /boot/grub/menu.lst

and add the following lines below Windows XP entry to get Windows 7 entry

Code:
# on /dev/sda1

title Windows 7

root (hd0,0) [B] 

savedefault

makeactive

map (hd0) (hd1)

map (hd1) (hd0)

chainloader +1

I am unsure about Win7 entry.. Please confirm in which partition you have install Win7.. Acc to fidks you have installed Windows in 2 diff. disk :S[/B]
 
Thanks a lot for ur reply. let me try it and post the result. :hap2:

As far as windows 7, its installed in Disk 2 last partition.

the other windows is Win XP which is in the 1st partition of Disk 2.

Ubuntu is in the last partition of Disk 1 along with Swap.
 
Status
Not open for further replies.