Restoring the MBR on a CD-ROM less Notebook

Tom H tomh0665 at gmail.com
Wed May 19 13:21:02 UTC 2010


On Wed, May 19, 2010 at 3:07 AM, Amichai Rotman <amichai at iglu.org.il> wrote:
> On Wed, May 19, 2010 at 07:22, Tom H <tomh0665 at gmail.com> wrote:
>> On Tue, May 18, 2010 at 3:37 PM, Amichai Rotman <amichai at iglu.org.il>
>> wrote:
>> > My sister bought a new Asus UL20A. I managed to convince her to give
>> > Ubuntu
>> > a try (it came with Windows 7 pre-installed), So i installed 10.04 on
>> > it.
>> > It has a single 320 Gb HDD, I was very careful not to wipe the recovery
>> > partition, but I had to cut the original system partition (disk C:) into
>> > 2
>> > partitions for Swap. so:
>> > It had a Disk C: (I think about 80 Gb in size) and the rest as disk D:
>> > for
>> > data.
>> > I chose to manually partition the drive during the installation and
>> > deleted
>> > the 80 Gb partition and created a 1024 MB for swap and the rest for /
>> > (root), the rest - i didn't touch.
>> > After installation, the last option in the GRUB menu was Windows Vista
>> > (although it was actually Windows 7). I didn't give it much thought...
>> > The deal was she tries Ubuntu for a week, then she decides if she wants
>> > to
>> > keep it or go back to Windows 7. Regrettably - she chose the latter.She
>> > has
>> > to go abroad for 3 months and she's affraid she will be stuck and no one
>> > will know how to help her. She said she had nothing against Linux but...
>> > I tried to launch the recovery process by pressing F9 during boot - but
>> > nothing happened. I then tried to boot from that mysterious option on
>> > the
>> > menu - an what da ya know ! it's the recovery process! So it went about
>> > recovering - just as if I pressed F9 - and then told me the recovery was
>> > done and I should click OK to shut down.
>> > And here is the part I need help with: The next time I pressed the power
>> > button - it says there is an error and gives me the "grub rescue>"
>> > prompt...
>> > Please help me! There is no CD ROM drive, no recovery DVD media supplied
>> > (a
>> > note that came with the computer says one is not supplied with this
>> > model).
>> > How do I boot from USB stick and recover the Windows 7 MBR / Boot
>> > loader?!
>> > All I have is my on Ubuntu Lucid on both my Desktop and my Netbook...
>>
>> At the grub rescue prompt:
>>
>> Run "ls" to display your disks and partitions
>>
>> Run "set" and check the values of "root" and "prefix"
>>
>> If "root" and "prefix" are incorrect (if you do not know what they
>> should be, run "ls (hdX,Y)/boot" for the different values of X and Y
>> since search isn't available in rescue mode), run
>> set root=(hdX,Y)
>> set prefix=(hdX,Y)/boot/grub
>> to set them to the correct values
>>
>> Run
>> insmod normal.mod
>> or, if necessary,
>> insmod /boot/grub/normal.mod
>>
>> Run
>> linux /boot/vmlinuz-2.6.x.x root=/dev/sdXY ro
>> initrd /boot/initrd.img-2.6.x.x
>> boot
>> (use tab completion)
>
> Thank for the great info, except there isn't any Linux on it now. I need to
> re-create Windows 7 boot loader or whatever.
> I started a live Ubuntu 10.04 stick and I found out the partitin I need to
> boot is /dev/sda2...

You're welcome.

What I forgot to say in my earlier email is that once booted up in
Ubuntu, you would have had to run "grub-install" and "update-grub" to
set up grub properly and then check whether you could boot into
Windows by paging through /boot/grub/grub.cfg to see whether there is
a Windows entry and then trying to boot from it.

If you just want to fix Win7, you have to boot from a recovery CD and
run "bootrec /rebuildbcd", "bootrec /fixmbr", "bootrec /fixboot" (in
ascending order of change to the Win setup).




More information about the ubuntu-users mailing list