Solved

GRUB loader missing... Ubuntu, linux, xp, dual boot

Posted on 2008-11-02
11
1,615 Views
Last Modified: 2013-12-15
I have a dual boot with XP Pro and Ubuntu 9.10.  When I first installed Ubuntu I messed up my partitions and had two empty partitions.  I went into XP and deleted them using Paragon Partition Manager.  I then updated the MBR.  I restarted my computer and it booted straight into Windows.  I use this computer primarily as my Linux system.  The GRUB loader has disappeared.  I'm not a very experience Linux user so I don't really know how to go about fixing this.  Can someone provide some help?  Thanks.
0
Comment
Question by:ubuntuguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 4

Expert Comment

by:Kaddict
ID: 22863862
The answer is stated in your question :)

The answer is " I then updated the MBR. " ... When you update your MBR with a Windows Boot, then it boots straight into Windows because this is where the GRUB loader is located (in the MBR).

If you need help replacing a GRUB loader, then read the installation document of gentoo and you will (quickly) see how to boot from CD in order to get into your installed linux (the command is chroot, search it in the installation help)

Once you "chroot" 'ed your installed linux, just run grub-install /dev/your-hard-disk   (IDE normally installs on /dev/hda and SATA normally installs on /dev/sda, according to what I remember)

Best of lucks and feel free to ask further questions,

-kaddict
0
 
LVL 10

Expert Comment

by:Andrew Doades
ID: 22863864
http://www.supergrubdisk.org/

This looks very good, seems like a nice simple app and just for waht you want.
0
 
LVL 1

Author Comment

by:ubuntuguy
ID: 22863865
I have done the following to try to fix it.

1)  Booted into live CD
2) Went to terminal
sudo grub
find /boot/grub/stage1
( this returned (hd0,5)
root (hd0,5)
setup (hd0)

when I do setup(hd0) I get a message that says cannot install - invalid device
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 1

Author Comment

by:ubuntuguy
ID: 22863878
I'm thinking I should mount the system into a temp directory and then chroot from there and repeat the steps above.  I'll try it. I'll let you know what happens
0
 
LVL 4

Accepted Solution

by:
Kaddict earned 500 total points
ID: 22863882
Here's a quick CHROOT guide:

1. Boot on your live CD
2. Mount your linux partition
            sudo mkdir /media/system
            sudo mount /dev/partition /media/system      (where partition is like hda1 or sda1)
3.  Prepare the special folders
            sudo mount --bind /dev /media/system/dev
             sudo mount -t proc /proc /media/system/proc  
 4. Change your environment
            sudo chroot /media/system  
 

And what you want to do is reinstall grub so....

5. Reinstall grub
            sudo grub-install /dev/harddisk
(Where harddisk is like hda or sda) (not a partition like hda1 or sda1)


Good luck!

-kaddict
0
 
LVL 4

Expert Comment

by:Kaddict
ID: 22863884
Ubuntuguy: Right on, just posted the how to :)
0
 
LVL 1

Author Comment

by:ubuntuguy
ID: 22863898
how does supergrubdisk work?  I have no idea how I'm supposed to use it
0
 
LVL 10

Expert Comment

by:Andrew Doades
ID: 22863919
I personally don't know, someone a while back told me about this, and I thought I would share with you here as it seems perfect for the job in hand

http://www.supergrubdisk.org/wiki/
0
 
LVL 1

Author Comment

by:ubuntuguy
ID: 22863980
Kaddict I tried your steps and I get the following:

Searching for GRUB installation directory ... found: /boot/grub
The file /boot/grub/stage1 not read correctly
0
 
LVL 4

Expert Comment

by:Kaddict
ID: 22863990
A quick google gives some results with people having that issue

Here's a paste from http://www.linuxquestions.org/questions/linux-software-2/gentoo-grub-the-file-bootbootgrubstage1-not-read-correctly-275708/

"Your fstab indicates the root of the filesystem is /dev/sda3 (grub hd0,2), but your grub.conf says 'root (hd0,0). Grub is looking in the wrong place for the root of the filesystem.
 And, since /boot is in it's own partition, shouldn't the grub.conf kernel line begin:
 kernel (hd0,0)/kernel-2.6......"

I guess you have exactly the same issue but with different parameters. Look at your fstab's root and grub.conf's root and boot partitions. I don't know exactly how your system is configured, but if you look carefully you may just point up the error.

good luck

-kaddict
0
 
LVL 1

Author Comment

by:ubuntuguy
ID: 22863993
I always get problems with my linux system when I have it with windows as a dual boot... I think I'm saying bye to windows forever on this machine. Kaddict I'm sure your solution is right... I was trying to fix it another way and I know I did something to the stage1 file.  
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question