Support in other languages: 
Showing results for 
Search instead for 
Do you mean 
Reply
What's DOS?
amazing_mr_toad
Posts: 2
Registered: ‎02-12-2012
Location: Montana
0

Ubuntu ate my MBR

I really should have checked out these forumns before messing around.  Could have saved myself some grief.

 

I wanted to dual book Win 7 with Ubuntu 11.10.  Somewhere along the way I messed up my MBR.  I though since I was careful to preserve the rescue partition (Q) I could experiemnt.  But it looks like that was not the case -- I needed that tiny first boot partition too....  

 

I have the contents of Q (in the original NFTS partition) and a flash drive that lets me boot but from which I cannot restore my system (at 8 GB it was too small for the whole image).  

 

Do any of you know how I can recover Win 7 so I can redo things?  Right now I have Ubutunu working solo but... Since I paid for it, I'd like to have Win 7 on tap for use if necessary.  

 

Thanks for any advice.

802.11n
abvasili
Posts: 182
Registered: ‎11-10-2011
Location: Albania

Re: Ubuntu ate my MBR

Hi, and welcome to the forums :smileyhappy:

 

You can download a copy of windows here:

 

http://www.mydigitallife.info/official-windows-7-sp1-iso-from-digital-river/

 

Pay attention to choose the same version that came installed on your system from factory. Burn it to a dvd or USB thumb drive (you can burn the iso to a USB thumb drive with Windows 7 USB/DVD Download Tool) and install windows, in trial. To register you can use the serial attached to your machine (on laptops you can find it on the bottom or under the battery slot).

 

Than download and use System update from lenovo support site, to update your system. :smileyhappy:

 

Have a nice day.

 

abvasili

 

p.s. probably this thread will be moved to windows 7 board :smileyhappy:

I'm just a volunteer. I like to help others where I can. Do my ideas work? I hope so. o_O
Who helped you today? Do not forget to thank him.
My hardware: TP x120e 0596-2ru. Windows 7, sp1, 64Bit, English, installed in UEFI mode.
What's DOS?
amazing_mr_toad
Posts: 2
Registered: ‎02-12-2012
Location: Montana
0

Re: Ubuntu ate my MBR

Thanks so much for the link.  It sounds like so long as the version matches up, I can use the serial on my machine.  Very nice, I did not know that!

 

Sorry I posted in the wrong place.  I am mostly a Linux user so I came straight here.

Posts: 1,502
Topics: 38
Kudos: 117
Solutions: 49
Registered: ‎04-20-2010
Location: Jeffersonville, Indiana
0

Re: Ubuntu ate my MBR

If your talking about GRUB, yes its default after installing Linux. You should still have Windows on the grubloader options. Mine is the bottom. Shows Windows 7. When I select it Windows loads. If windows is not there, then you may have wiped your Windows partition.
IT Specialist and Consultant
Lenovo Tablet Evangelist
Current Machines: IdeaCentre A300, ThinkPad Tablet, ThinkPad L410, and IdeaPad U410 Touch

Deutsche Deutsche Community   Español Comunidad en Español

Lenovo - the latest in DOtabs, DOpads, DOcentre's, DOstations and DOservers!
Ctrl-Alt-Del
JonathanChan
Posts: 10
Registered: ‎01-09-2012
Location: Beijing
0

Re: Ubuntu ate my MBR

previous posts mention reinstalling win 7 from cd and then download lenovo tools. i prefer having the original copy of lenovo windows. i had a previous thread on this and ubuntu killing my mbr.

 

the solution is to use ubuntu, get on ur q drive, backup all its contents to say, an external harddrive.the next thing to do is reinstall win 7 from cd. after that, if the q drive is deleted, make a partition and put the q drive backup into it. now run the backup tool to make recovery cds if you havent. install rescue and recovery. update the lenovo tools and stuff. shutdown,  startup and press the thinkvantage button to access rescue and recovery. restore system to factory state

Fanfold Paper
PeterNash
Posts: 11
Registered: ‎10-30-2012
Location: Uruguay
0

Re: Ubuntu ate my MBR

What do you want? do you want to use Windows boot manager or GRUB2 boot manager? do you want to use Ubunto and/or Windows?

 

You can use GRUB2 to boot to Windows or Ubunto. In fact, GRUB doesn't boot Windows directly, but GRUB loads windows boot mgr in real mode, that is grub boot to Windows boot mgr, and windows boot mgr boots Windows 7.

However if you want to boot Ubunto from windows boot loader, you should load grub in real mode from windows boot mgr (upside down your situation now). To do this, firstly you need to backup the MBR to a file, in a USB drive.

 

1. backup the MBR (that now loads GRUB2). please run this in a terminal as root:

 

dd if=/dev/sda of=/YOUR_USB/grub.mbr count=1 bs=512

 

... where /dev/sda is your first SATA hard drive. if you have a IDE hard drive, your first HDD would be /dev/hda, or if you have a flash drive, would be /dev/mmcblk0; and the param "of" is the output file.

 

now you have a backup of the mbr with grub in case of disaster.

 

2. reboot your computer

 

3. boot to Windows Recovery environment and open  a terminal (CMD) if you have the OneKey Recovery, you don't have an option to go to the CMD. Then you must to get a Windows 7 ISO and burn it to a DVD. then boot from it and go to the CMD.

 

4. After you opened the CMD, please run

 

bootrec /fixmbr

 

5.  when it ends, reboot. you should see the windows boot manager or directly boots Windows

when it finish to load the desktop, run as an Administrator
 an instance of CMD

 

before to run any command in the terminal, copy the backup file of the old MBR to the place you want. I recommend you to copy it to C:\

for example: C:\grub.mbr

 

6. Now if you want to add Ubuntu to the Windows boot loader, you have to add it to the system BCD store. Windows can't boot Linux directly, so Windows bootmgr will load grub in real mode. in the cmd run bcdedit, specifying the type of entry as BOOTSECTOR:

 

bcdedit /create /d "Ubuntu" /application BOOTSECTOR


the output of the command would say something like "{2323F32-33.....} succesfully created"

please copy this GUID and don't forget it (the GUID is like {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} in hex. digits)

 

7. now you must to set some parameter to the entry, currently hidden:

 

  • you should specify where's located the copy of the old MBR (the device where it is):

 

bcdedit /set <the entry's GUID> device partition=C:

 

an example: bcdedit /set {00000000-1111-2F33-12AB-BDF368233265} device partition=C:

 

  • you should specify where is the MBR copy file, in this case is located at root of C: partition and the name of the file is grub.mbr

bcdedit /set <the entry's GUID> path \grub.mbr

 

8. Now you have to add the entry to the OS List:

 

bcdedit /displayorder <the entry's GUID> /addlast

 

9. now reboot and you should see the two OS entries

 

NOTES: please follow these steps carefully. If you make a mistake on some command, you would get your system unbootable

BE CAREFUL WITH THE DD COMMAND. is a *nix very simple utility but is a powerful command. An error with the numbers can overwrite or damage a partition in your hard drive. DD command keeps you (for example) make an image of a CD/DVD/BD, you can "clone" you hard drive (make an image of your hard drive) or a partition as a backup

BE CAREFUL WITH THE BCDEDIT command. an error can damage the windows BCD store. Fortunately there's a solution if you have an accident: boot to Windows Recovery environment, open a CMD and run bootrec /rebuildbcd

 

I hope this will be usefull to you

Fanfold Paper
PeterNash
Posts: 11
Registered: ‎10-30-2012
Location: Uruguay
0

Re: Ubuntu ate my MBR

So if you don't want Ubuntu in your PC, first go to Windows RE, open a CMD and run bootrec /fixmbr after that boot to windows, and delete the Ubuntu partition, and extend the Windows partition