?
Solved

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

Posted on 2008-11-02
11
Medium Priority
?
1,634 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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 2000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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 …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month13 days, 4 hours left to enroll

777 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