LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-17-2009, 09:43 PM   #1
leemflee
LQ Newbie
 
Registered: Mar 2005
Distribution: Red Hat
Posts: 3

Rep: Reputation: 0
grub overwriting mbr


Hi. I decided that I wanted to "play" with Ubuntu and install it on an external hard drive. Unfortunately, the installation process overwrote the MBR on my internal hard drive and now I cannot boot into Windows XP, which was loaded on my internal hard drive. I had Ubuntu partition the external hard drive thinking it would only install there. Does grub store the MBR anywhere before overwriting the MBR or is there a way to get my original MBR back? Thanks!!
 
Old 03-17-2009, 10:27 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Use your xp Installation CD, enter "R" (for recovery?) in setup, enter FIXMBR, if that doesn't work enter "FIXBOOT"



The above should restore the xp mbr on the internal. Make sure you are pointing to the correct drive.

Default for Ubuntu is to install to mbr of first drive in boot priority. Haven't installed Ubuntu recently but most distributions have an 'Advanced' tab during the bootloader installation and if you click on that, it gives an option to install to partition rather than mbr. You will then have to install Grub to the mbr of your external drive. Suggest you get partition information and post here so someone can give you command to use to do that. To get partition info, open a terminal and enter: sudo fdisk - (that's a lower case Letter L).

Last edited by yancek; 03-17-2009 at 10:30 PM. Reason: had wrong web site
 
Old 03-18-2009, 02:16 PM   #3
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,968
Blog Entries: 32

Rep: Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464
yancek,

There is a typo in your post.
You meant to type:

sudo fdisk -l

(that's a lower case Letter L, not the number one).
 
Old 03-18-2009, 07:54 PM   #4
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
After you fix Windows MBR you can reinstall grub to the root partition of Ubuntu on external drive from the Ubuntu live CD like this:
http://users.bigpond.net.au/hermanzo...b_with_Live_CD
First, run the command "sudo fdisk -l" from the live CD to identify the Ubuntu root partition on the external drive. If you only have 1 internal drive then Ubuntu's root partition will most likely be /dev/sdb1. So set the root command in that tutorial to (hd1,0) instead of (hd0,1) as it is in that tutorial. Then the setup command will be (hd1). Then type quit.
Now set the external hard drive to be the first boot device in the computer's BIOS. You will have the option to boot Ubuntu or Windows without altering the Windows MBR.

Last edited by tommcd; 03-18-2009 at 07:57 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot without overwriting the MBR wingsrule Linux - Newbie 18 10-24-2007 11:07 PM
overwriting boot loader (GRUB) Balakrishna Linux - Newbie 6 12-25-2006 11:00 PM
Ubuntu not overwriting MBR on my SATA drive, still getting LILO Timestampmismatch portwolf Ubuntu 2 07-27-2006 12:50 PM
How to reinstall Windows without overwriting the MBR? zero79 Linux - General 3 08-05-2004 06:33 PM
Windows Overwriting MBR Need help.. Nukem Linux - General 2 04-07-2004 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration