Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-19-2011, 08:14 PM   #1
LQ Newbie
Registered: Mar 2011
Location: Dallas, TX
Posts: 4

Rep: Reputation: 0
Smile Lost dual boot

Greetings to all,
I finally was able to dedicate my old Dell XPS400 to a Linux/Win xp machine. The XP had issues- as usual- and I decided to turn Linux as I learned. I was able to re-partition the HDD just fine w Ubuntu 11. Everything was working Then Xp got so messed up from a previous virus that I re-XN Win XP. When I finished everything in XP, I noticed that I lost my dual boot capability. I checked with G-Parted to verify that all partitions were there and they are, exactly as I set them up. I don't know what I need to do to fix the issue. I was tempted to put in the Ubuntu disc to see if it would see the problem but not sure what I would learn.
My question is what should I do to get ubuntu to show at boot so I can choose which OS to select.

ps- I love the ability in Ubuntu to see & use docs on my xp partition- that is GREAT. I may just dump XP all together soon!
Old 12-19-2011, 08:33 PM   #2
Larry Webb
LQ Veteran
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Here is a great tutuorial from ubuntu for restoring your grub by using your ubuntu live cd, They explain two different ways. Either way works fine. Pay attention to Section 12.


Last edited by Larry Webb; 12-19-2011 at 08:34 PM.
1 members found this post helpful.
Old 12-19-2011, 08:35 PM   #3
LQ Newbie
Registered: Mar 2011
Location: Dallas, TX
Posts: 4

Original Poster
Rep: Reputation: 0
That was very fast. Thanks Larry, I'll check it out.
Old 12-19-2011, 09:16 PM   #4
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 38
As Larry Stated, read the link.
Here are the specifics which worked for me:
Copy LiveCD Files

This is a quick and simple method of restoring a broken system's GRUB 2 files. The terminal is used for entering commands and the user must know the device name/partition of the installed system (sda1, sdb5, etc). The problem partition is located and mounted from the LiveCD. The files are then copied from the LiveCD libraries to the proper locations and MBR. It requires the least steps and fewer command line entries than the following methods. If for example Windows is on sda1 and Ubuntu is on sda5, and Windows has overwritten the MBR, then the target for grub installation will be /dev/sda5, and the MBR in the boot sector of sda will be re written for grub.

This operation will write to the MBR and restore the modules and core.img to /boot/grub. It will not replace or restore grub.cfg or fix corrupted files.

1. Boot the LiveCD Desktop.

Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.

Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L".

sudo fdisk -l

If the user isn't sure of the partition, look for one of the appropriate size or formatting.

Running sudo blkid may provide more information to help locate the proper partition, especially if the partitions are labeled. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently.
4. Mount the partition containing the Ubuntu installation.

sudo mount /dev/sdXY /mnt

Example: sudo mount /dev/sda1 Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot Note: If the user has a separate /home partition, this must be mounted to /mnt/home. Encrypted home partitions should work.

Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.

sudo grub-install --root-directory=/mnt /dev/sdX

Example: sudo grub-install --root-directory=/mnt /dev/sda

In Grub 1.99, introduced with Ubuntu 11.04, Natty Narwhal, a new switch is available which more clearly defines where the grub folder is placed. The command above will still work with Grub 1.99, but the following command is preferred by the developers. The target directory in the command is the command into which the grub folder will be installed. By default, and without the switch, the location is /boot/grub. In these instructions, since the Ubuntu partition is mounted on /mnt, the target would be /mnt/boot/grub.


sudo grub-install --boot-directory=/mnt/boot /dev/sdX

Example: sudo grub-install --boot-directory=/mnt/boot/ /dev/sda
* Reboot

Refresh the GRUB 2 menu with sudo update-grub

If the user wishes to explore why the system failed, refer to Post-Restoration Commands section below.
1 members found this post helpful.
Old 12-20-2011, 11:45 AM   #5
LQ Newbie
Registered: Mar 2011
Location: Dallas, TX
Posts: 4

Original Poster
Rep: Reputation: 0
I'm about to attempt the repair this morning. Thanks to Larry & Okos. I did find this last night which looks simple.
I'll let you know how it does. I'm not terminal savvy yet and if I can't copy & paste, then I'm reluctant.
Old 01-01-2012, 01:35 PM   #6
LQ Newbie
Registered: Mar 2011
Location: Dallas, TX
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for everyone's help.
I had to re-xn Ubuntu. Now the Utility has lost all the apps. When looking at add software & xn-ed software, apps are there but not in utility launcher. When I click on it, nothing shows up. I saw something on another site that I'm not the only one it's happened to. Any ideas?
Old 01-01-2012, 02:53 PM   #7
LQ Newbie
Registered: Jan 2012
Location: Jacksonville, Florida
Distribution: Desktop-Mint, Dell inspiron 1100 laptop-Debian, plus liveusb of about 8 distros
Posts: 4

Rep: Reputation: 0
I understand being terminal shy, but you wont get better if you try. The main thing is that since the boot option is already an issue this could have/ is a great opportunity to practice with the terminal, as it really couldn't get that much worse.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
loading dual boot ubuntu: lost access to everything (no boot at all) JohnLocke Linux - Newbie 10 10-07-2008 11:29 PM
Lost XP Dual Boot Adriann Mandriva 2 04-12-2006 04:40 PM
Resized Linux Partition on Dual Boot - Lost Boot RationalRabbit Linux - Newbie 14 12-29-2005 02:02 AM
Help! Lost my Dual-Boot! ArthurDent Linux - Newbie 6 02-16-2004 07:10 AM
HELP! Lost the dual boot! MeLassen Linux - Newbie 3 01-04-2002 12:32 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 AM.

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