Master Boot Record?

M

ManyBeers

If your XP SP3 computer has no WindowsXP cds but only factory Recovery CDs
with no Recovery Console how would one go about rewriting the MBR if it was
somehow damaged other than reinstalling Windows or an image of the Windows
drive?Aren't there floppy discs that can do this? My laptop has a floppy
drive.
 
P

Pegasus \(MVP\)

ManyBeers said:
If your XP SP3 computer has no WindowsXP cds but only factory Recovery CDs
with no Recovery Console how would one go about rewriting the MBR if it
was
somehow damaged other than reinstalling Windows or an image of the Windows
drive?Aren't there floppy discs that can do this? My laptop has a floppy
drive.

You can restore the MBR like so:
- Download a Win98 boot diskette from www.bootdisk.com.
- Boot the machine with this diskette.
- Type this command: fdisk /mbr
It works for WinXP machines and for NTFS partitions (because it replaces the
MBR and does not access the partitions).
 
M

ManyBeers

Pegasus (MVP) said:
You can restore the MBR like so:
- Download a Win98 boot diskette from www.bootdisk.com.
- Boot the machine with this diskette.
- Type this command: fdisk /mbr
It works for WinXP machines and for NTFS partitions (because it replaces the
MBR and does not access the partitions).

Thanks Pegasus.
 
S

Stephen Harris

ManyBeers said:
If your XP SP3 computer has no WindowsXP cds but only factory Recovery CDs
with no Recovery Console how would one go about rewriting the MBR if it was
somehow damaged other than reinstalling Windows or an image of the Windows
drive?Aren't there floppy discs that can do this? My laptop has a floppy
drive.

I think you should alternatively create a Recovery Console even if
this problem is fixed. http://aumha.net/viewtopic.php?f=62&t=31844
Subject: Add "Recovery Console" to your Boot Menu -- Now!
 
M

ManyBeers

Stephen Harris said:
I think you should alternatively create a Recovery Console even if
this problem is fixed. http://aumha.net/viewtopic.php?f=62&t=31844
Subject: Add "Recovery Console" to your Boot Menu -- Now!

Thanks Steve but I have in fact already done so uses that very thread as a
guide.
The deal is I am thinking of dual-booting with linux Ubuntu 8.04 and ther
are basically 2 ways of going about it. When Ubuntu is installed it asks
where you want to install GRUB it's bootloader and if you install it in the
MBR it will overwrite Windows bootloader And make Ubuntu the default op
system to boot with Windows as an option. However according to a guy on
Ubuntu's support forum I would lose my Recovery Console entry. I don't like
that part.
A secondary method retains all of my boot options since it
uses Windows own bootloader and adds Ubuntu to boot.ini. This method is a
little riskier I think because at one point in the install there is a point
where neither OpSys can be booted but is relativelt easy to fix-at least
according to this
guide:http://www.linuxdevcenter.com/pub/a/linux/2006/05/08/dual-boot-laptop.html?page=1
So I think letting Grub be my bootloader is probably eaier for me but my
concern is if I ever dump Ubuntu I want to make sure I can get my Windows
bootloader back. I have an image of my Windows C: partiton made with Image
For Windows(Terabyte) and looking at it's imaging parameters it does appear
that the image includes the MBR so I am probably covered there. What method
would you use if you were me?
 
S

Stephen Harris

ManyBeers said:
Thanks Steve but I have in fact already done so uses that very thread as a
guide.
The deal is I am thinking of dual-booting with linux Ubuntu 8.04 and ther
are basically 2 ways of going about it. When Ubuntu is installed it asks
where you want to install GRUB it's bootloader and if you install it in the
MBR it will overwrite Windows bootloader And make Ubuntu the default op
system to boot with Windows as an option. However according to a guy on
Ubuntu's support forum I would lose my Recovery Console entry. I don't like
that part.

I am not sure you would lose it but wouldn't take the chance.
A secondary method retains all of my boot options since it
uses Windows own bootloader and adds Ubuntu to boot.ini. This method is a
little riskier I think because at one point in the install there is a point
where neither OpSys can be booted but is relativelt easy to fix-at least
according to this
guide:http://www.linuxdevcenter.com/pub/a/linux/2006/05/08/dual-boot-laptop.html?page=1

This is the recommended way especially if you ever decide to use a
3rd party bootloader. I have never had a problem with it, where it
didn't boot to an OS, it proceeds automatically. The first method is
the default because a dual boot is not the default. Read how to get
to a 'use the first sector' boot screen option before you install
Ubuntu. I read your web link which is about Ubuntu 5.10, I'm not
sure his problem still exists. Check on the Ubuntu forum. Don't
forget to get a backup/restore MBR utility and backup the MBR, so
that you never lose Windows. One can edit the boot.ini to change
the default OS. I think in Linux its counterpart might be grub.conf
which can also change the default boot OS plus the timeout period.
So I think letting Grub be my bootloader is probably eaier for me but my
concern is if I ever dump Ubuntu I want to make sure I can get my Windows
bootloader back. I have an image of my Windows C: partiton made with Image
For Windows(Terabyte) and looking at it's imaging parameters it does appear
that the image includes the MBR so I am probably covered there. What method
would you use if you were me?

Not installing Ubuntu in the MBR. Use the XP boot.ini.
I think that is easier if you don't have to go through
those extra setting partition active steps. I know that
you don't have to do that using Redhat. Ask again in the
Ubuntu forum. I think you will be surprised about how
much you have to learn just to install a third party
utility like Flash player, using Ubuntu. Until you become
accomplished with Linux, don't risk what you know, XP.
 
S

Stephen Harris

ManyBeers said:
Thanks Steve but I have in fact already done so uses that very thread as a
guide.
The deal is I am thinking of dual-booting with linux Ubuntu 8.04 and ther
are basically 2 ways of going about it. When Ubuntu is installed it asks
where you want to install GRUB it's bootloader and if you install it in the
MBR it will overwrite Windows bootloader And make Ubuntu the default op
system to boot with Windows as an option. However according to a guy on
Ubuntu's support forum I would lose my Recovery Console entry. I don't like
that part.
A secondary method retains all of my boot options since it
uses Windows own bootloader and adds Ubuntu to boot.ini. This method is a
little riskier I think because at one point in the install there is a point
where neither OpSys can be booted but is relativelt easy to fix-at least
according to this
guide:http://www.linuxdevcenter.com/pub/a/linux/2006/05/08/dual-boot-laptop.html?page=1
So I think letting Grub be my bootloader is probably eaier for me but my
concern is if I ever dump Ubuntu I want to make sure I can get my Windows
bootloader back. I have an image of my Windows C: partiton made with Image
For Windows(Terabyte) and looking at it's imaging parameters it does appear
that the image includes the MBR so I am probably covered there. What method
would you use if you were me?

In my previous post I said the url you provided was out of date.

https://help.ubuntu.com/community/WindowsDualBoot

"If you have a problem with changing the MBR code, you might prefer to
just install the code for pointing to GRUB to the first sector of your
Ubuntu partition instead. If you do that during the Ubuntu installation
process, then Ubuntu won't boot until you configure some other boot
manager to point to Ubuntu's boot sector. Windows Vista no longer
utilizes boot.ini,..."

SH: Dual booting with XP is easier than with Vista. Since the boot code
is written to the first sector of the Ubuntu Partition, it shouldn't
mess with the MBR, which means it should just boot to Windows. One
should still have their backed up original MBR handy on a floppy disk
or USB stick ready to restore the original MBR just in case.

So in XP, which does still use boot.ini, just safely add the line
C:\ubuntu.bin="Ubuntu" to the boot.ini.

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows XP
Professional" /fastdetect
C:\ubuntu.bin="Ubuntu"

SH: You can add this before installing Ubuntu. And maybe the
Ubuntu boot file information is menu.lst rather than grub.conf.

You can add ubuntu to the windows boot loader:

Boot from the LiveD.

Step 1) Install Ubuntu. On the last screen click on the "advanced"
button and replace (hd0) by /dev/sda3. (Here you need to replace sda3 by
whatever partition Ubuntu is on)

Don't reboot immediately. Instead stay on the LiveCD.

Step 2) Mount your Windows partition:

sudo mount -t ntfs-3g /dev/sda2 /windows
(Here replace sda2 by whatever partition Windows is on)

Step 3) Copy the first sector of the Ubuntu partition to a file on the
Windows partition:

sudo dd if=/dev/sda3 of=/windows/ubuntu.bin bs=512 count=1
(Be very careful when using "dd". Info on dd
(http://linuxreviews.org/man/dd/))

[alternative method]
Step 4) Add ubuntu to the windows boot loader:

Open "boot.ini" from the Windows partition via
sudo gedit /windows/boot.ini

Add this line to the end of the file:
c:\ubuntu.bin="Ubuntu"

Save the file.

Reboot and you get should get a menu with a Windows and Ubuntu choice."

SH: You should have a file named ubuntu.bin in your root directory,
C:\ , where the hidden file boot.ini resides. Just the reference to
the file ubuntu.bin is contained within boot.ini, C:\ubuntu.bin="Ubuntu"

One can often tell what is the right name for the partition
by looking at the size of the partition related to that name.
 
M

ManyBeers

Stephen Harris said:
ManyBeers said:
Thanks Steve but I have in fact already done so uses that very thread as a
guide.
The deal is I am thinking of dual-booting with linux Ubuntu 8.04 and ther
are basically 2 ways of going about it. When Ubuntu is installed it asks
where you want to install GRUB it's bootloader and if you install it in the
MBR it will overwrite Windows bootloader And make Ubuntu the default op
system to boot with Windows as an option. However according to a guy on
Ubuntu's support forum I would lose my Recovery Console entry. I don't like
that part.
A secondary method retains all of my boot options since it
uses Windows own bootloader and adds Ubuntu to boot.ini. This method is a
little riskier I think because at one point in the install there is a point
where neither OpSys can be booted but is relativelt easy to fix-at least
according to this
guide:http://www.linuxdevcenter.com/pub/a/linux/2006/05/08/dual-boot-laptop.html?page=1
So I think letting Grub be my bootloader is probably eaier for me but my
concern is if I ever dump Ubuntu I want to make sure I can get my Windows
bootloader back. I have an image of my Windows C: partiton made with Image
For Windows(Terabyte) and looking at it's imaging parameters it does appear
that the image includes the MBR so I am probably covered there. What method
would you use if you were me?

In my previous post I said the url you provided was out of date.

https://help.ubuntu.com/community/WindowsDualBoot

"If you have a problem with changing the MBR code, you might prefer to
just install the code for pointing to GRUB to the first sector of your
Ubuntu partition instead. If you do that during the Ubuntu installation
process, then Ubuntu won't boot until you configure some other boot
manager to point to Ubuntu's boot sector. Windows Vista no longer
utilizes boot.ini,..."

SH: Dual booting with XP is easier than with Vista. Since the boot code
is written to the first sector of the Ubuntu Partition, it shouldn't
mess with the MBR, which means it should just boot to Windows. One
should still have their backed up original MBR handy on a floppy disk
or USB stick ready to restore the original MBR just in case.

So in XP, which does still use boot.ini, just safely add the line
C:\ubuntu.bin="Ubuntu" to the boot.ini.

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows XP
Professional" /fastdetect
C:\ubuntu.bin="Ubuntu"

SH: You can add this before installing Ubuntu. And maybe the
Ubuntu boot file information is menu.lst rather than grub.conf.

You can add ubuntu to the windows boot loader:

Boot from the LiveD.

Step 1) Install Ubuntu. On the last screen click on the "advanced"
button and replace (hd0) by /dev/sda3. (Here you need to replace sda3 by
whatever partition Ubuntu is on)

Don't reboot immediately. Instead stay on the LiveCD.

Step 2) Mount your Windows partition:

sudo mount -t ntfs-3g /dev/sda2 /windows
(Here replace sda2 by whatever partition Windows is on)

Step 3) Copy the first sector of the Ubuntu partition to a file on the
Windows partition:

sudo dd if=/dev/sda3 of=/windows/ubuntu.bin bs=512 count=1
(Be very careful when using "dd". Info on dd
(http://linuxreviews.org/man/dd/))

[alternative method]
Step 4) Add ubuntu to the windows boot loader:

Open "boot.ini" from the Windows partition via
sudo gedit /windows/boot.ini

Add this line to the end of the file:
c:\ubuntu.bin="Ubuntu"

Save the file.

Reboot and you get should get a menu with a Windows and Ubuntu choice."

SH: You should have a file named ubuntu.bin in your root directory,
C:\ , where the hidden file boot.ini resides. Just the reference to
the file ubuntu.bin is contained within boot.ini, C:\ubuntu.bin="Ubuntu"

One can often tell what is the right name for the partition
by looking at the size of the partition related to that name.
I agree with you that I will Not install Grub in my MBR and will install it
in Ubuntu's / and then make Ubuntu boot through XP's boot.ini. Somehow!
All that mounting stuff , command line stuff, is new and scary to me as I am
pretty much a "mouse only" type guy. But I will get it done.
 
S

Stephen Harris

ManyBeers said:
I agree with you that I will Not install Grub in my MBR and will install it
in Ubuntu's / and then make Ubuntu boot through XP's boot.ini. Somehow!
All that mounting stuff , command line stuff, is new and scary to me as I am
pretty much a "mouse only" type guy. But I will get it done.

You can use Thunderbird and Firefox on Windows as easily as on Ubuntu.
There is a learning curve for Linux that starts when you leave the
mouse clicks, and ability to ignore permissions, behind. You are going
to have to be innately geeky to suffer through the frustrations. You
will see what I mean when it comes to installing a free flash player
under Windows and then under Ubuntu. I mean why dual boot if you are
just going to stay at the same point and click level using both Os's?
Gimp and OpenOffice have been ported to Windows.
IMO, there is more enthusiasm in the (younger) Linux community.

Good Luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top