Solved

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

Posted on 2008-11-02
11
1,596 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
  • 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
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!

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

785 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