LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-19-2011, 07:14 PM   #1
jznew2linux
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 http://static.linuxquestions.org/que...s_lq/icon7.gif 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, 07: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.

grub2

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

Original Poster
Rep: Reputation: 0
Wow
That was very fast. Thanks Larry, I'll check it out.
 
Old 12-19-2011, 08:16 PM   #4
okos
Member
 
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:
Quote:
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.
2.

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

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

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.
5.

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, 10:45 AM   #5
jznew2linux
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.
http://blog.sriunplugged.com/2009/04...lling-windows/
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, 12:35 PM   #6
jznew2linux
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, 01:53 PM   #7
Xandrosdemon
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.
 
  


Reply


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 10:29 PM
Lost XP Dual Boot Adriann Mandriva 2 04-12-2006 03:40 PM
Resized Linux Partition on Dual Boot - Lost Boot RationalRabbit Linux - Newbie 14 12-29-2005 01:02 AM
Help! Lost my Dual-Boot! ArthurDent Linux - Newbie 6 02-16-2004 06:10 AM
HELP! Lost the dual boot! MeLassen Linux - Newbie 3 01-04-2002 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration