Unix Technical Forum

[Newbie]GRUB issue

This is a discussion on [Newbie]GRUB issue within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hi, I had installed Fecora Core 3 and Windows XP on my laptop. GRUB was working fine allowing me ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 07:05 AM
DJP
 
Posts: n/a
Default [Newbie]GRUB issue

Hi,

I had installed Fecora Core 3 and Windows XP on my laptop. GRUB was working
fine allowing me to boot into either.

However recently I re-installed XP and now the boot loader doesn't show up
(I don't get the menu that gives me the option to boot into XP or Ferdora).
I tried booting from the installation disk and re-installing only the boot
loader, but that didn't work. I also tried "linux rescue" which then went to
the shell - strangely there isn't a /boot/grub.conf .

I really can't seem to figure this out. It would be great if someone out
there could let me know what I should be doing. Thanks!



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 07:05 AM
robertharvey@my-deja.com
 
Posts: n/a
Default Re: GRUB issue

Well, are you sure your XP re-installation did not overwrite the whole
linux distro? try running fdisk to check what partitions eist.

Don't forget that when you run the rescue you end up with a mini-file
system in ram - you have to mount the hard disk (some rescue disks do
it for you) elsewhere

e.g.
mount /dev/hda3 /hardisk (assuming /hardisk exists)
then you would look in /hardisk/boot for grub.conf

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 07:05 AM
DJP
 
Posts: n/a
Default Re: GRUB issue


<robertharvey@my-deja.com> wrote in message
news:1110200461.993064.305290@l41g2000cwc.googlegr oups.com...
> Well, are you sure your XP re-installation did not overwrite the whole
> linux distro? try running fdisk to check what partitions eist.


No it hasn't overwritten it. XP has been installed to a different partition
and when I get the command prompt in the rescue mode I am able to see my
Linux files - so I think it is safe.

> Don't forget that when you run the rescue you end up with a mini-file
> system in ram - you have to mount the hard disk (some rescue disks do
> it for you) elsewhere
>
> e.g.
> mount /dev/hda3 /hardisk (assuming /hardisk exists)
> then you would look in /hardisk/boot for grub.conf


I was able to do an "ls" and saw the rest of the usual files and
directories(/usr, /dev, etc.) without doing the mount. Anyways I was just
looking for grub.conf as weak way of verifying that the boot loader was
installed. Even if I do find it I haven't a clue what I can do with it to
fix my problem. I just mentioned it in the post thinking that it may help in
diagnosing the problem.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 07:05 AM
jayachandran kamaraj
 
Posts: n/a
Default Re: GRUB issue

DJP wrote:
> <robertharvey@my-deja.com> wrote in message
> news:1110200461.993064.305290@l41g2000cwc.googlegr oups.com...
>
>>Well, are you sure your XP re-installation did not overwrite the whole
>>linux distro? try running fdisk to check what partitions eist.

>
>
> No it hasn't overwritten it. XP has been installed to a different partition
> and when I get the command prompt in the rescue mode I am able to see my
> Linux files - so I think it is safe.
>
> > Don't forget that when you run the rescue you end up with a mini-file

>
>>system in ram - you have to mount the hard disk (some rescue disks do
>>it for you) elsewhere
>>
>>e.g.
>>mount /dev/hda3 /hardisk (assuming /hardisk exists)
>>then you would look in /hardisk/boot for grub.conf

>
>
> I was able to do an "ls" and saw the rest of the usual files and
> directories(/usr, /dev, etc.) without doing the mount. Anyways I was just
> looking for grub.conf as weak way of verifying that the boot loader was
> installed. Even if I do find it I haven't a clue what I can do with it to
> fix my problem. I just mentioned it in the post thinking that it may help in
> diagnosing the problem.
>
>

This is a well known problem. When you reinstall windows xp, it
overwrites the MBR. all you have to do is reinstall your grub in the mbr
use your fc3 disk, go in the rescue mode.
then you have to chroot as follows
$chroot /mnt/sysimage
then reinstall grub as follows
$grub
once inside grub
grub > root (hd0,7) if your boot partition is hda8 or
grub > setup (hd0) this will install grub in the MBR assuming you once
had a working grub.
all the best
jc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 07:05 AM
Ronald Hands
 
Posts: n/a
Default Re: [Newbie]GRUB issue

DJP wrote:

> However recently I re-installed XP and now the boot loader doesn't show up
> (I don't get the menu that gives me the option to boot into XP or Ferdora).
> I tried booting from the installation disk and re-installing only the boot
> loader, but that didn't work. I also tried "linux rescue" which then went to
> the shell - strangely there isn't a /boot/grub.conf .
>


Others have given excellent advice on how to restore your MBR.
I thought I'd just add that I believe grub.conf is in
/boot/grub/grub.conf (not just /boot/grub.conf) -- handy to know
when you want to change which OS is the default on a dual-boot
system. There's also a symbolic link in /etc/grub.conf.
This is one of those occasions when the "locate" command is your
friend.

-- Ron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 07:05 AM
jce
 
Posts: n/a
Default Re: GRUB issue

> This is a well known problem. When you reinstall windows xp, it overwrites
> the MBR. all you have to do is reinstall your grub in the mbr
> use your fc3 disk, go in the rescue mode.
> then you have to chroot as follows
> $chroot /mnt/sysimage
> then reinstall grub as follows
> $grub
> once inside grub
> grub > root (hd0,7) if your boot partition is hda8 or
> grub > setup (hd0) this will install grub in the MBR assuming you once had
> a working grub.
> all the best
> jc


Alternatively use GAG, put this in your MBR. Using this you never have to
worry too much.

JCE


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 07:05 AM
hyperfusion
 
Posts: n/a
Default Re: GRUB issue

it can also be in /boot/grub/menu.lst

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-18-2008, 07:05 AM
Dave Brown
 
Posts: n/a
Default Re: [Newbie]GRUB issue

In article <d0he0e$8c4$1@gist.usc.edu>, DJP wrote:
> Hi,
>
> I had installed Fecora Core 3 and Windows XP on my laptop. GRUB was working
> fine allowing me to boot into either.
>
> However recently I re-installed XP and now the boot loader doesn't show up
> (I don't get the menu that gives me the option to boot into XP or Ferdora).
> I tried booting from the installation disk and re-installing only the boot
> loader, but that didn't work. I also tried "linux rescue" which then went to
> the shell - strangely there isn't a /boot/grub.conf .
>
> I really can't seem to figure this out. It would be great if someone out
> there could let me know what I should be doing. Thanks!


<cross-posts trimmed>

After you did "linux rescue" with the boot CD, did you let the installer
mount the root filesystem (which then shows up on /mnt/sysimage)?
If not, mount it.
If your /boot isn't a separate partition, you can now:
chroot /mnt/sysimage
Now, you will see /boot/grub/grub.conf. At that point, you should be able
to:
grub-install /dev/hda
(if I recall correctly).

(If your /boot is on a seperate partition, you'd have to mount in on
/mnt/sysimage/boot before you 'chroot'.)

--
Dave Brown Austin, TX
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-18-2008, 07:07 AM
domnicjp@gmail.com
 
Posts: n/a
Default Re: GRUB issue

Folks, I need some help ASAP. I just did the following:

1.) Used the FC3 CD to boot using the linux rescue option
2.) Did "chroot /mnt/sysimage"
3.) Did "grub-install /dev/hda1"
(/dev/hda2 is my Windows partition, /dev/hda5 is my Linux partition and
/dev/hda1 is my boot partition - I think, I am not sure this makes any
sense - Newbie here)

After that I was able to boot into Fedora. But now GRUB doesn't allow
me to boot into XP. XP was set as the default OS to boot into - GRUB
doesn't boot into XP, it just keeps repeatedly showing the GRUB screen
asking me to choose which OS I want to boot into. Once I chose XP,
something like chainloader +1
GRUB loading stage2
is shown on screen and then it comes back to the GRUB screen.

I have some really important documents in my Windows partition and I am
seriously freaking out. It would be great if someone could help me out
with this. I also tried the edit command with XP selected in the GRUB
screen (I got two lines there which read:
rootnoverify(hd0,0)
chainloader +1)
- I don't know if this is of any help)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-18-2008, 07:07 AM
Nico Kadel-Garcia
 
Posts: n/a
Default Re: GRUB issue


<domnicjp@gmail.com> wrote in message
news:1110622963.871805.59030@l41g2000cwc.googlegro ups.com...
> Folks, I need some help ASAP. I just did the following:
>
> 1.) Used the FC3 CD to boot using the linux rescue option
> 2.) Did "chroot /mnt/sysimage"
> 3.) Did "grub-install /dev/hda1"
> (/dev/hda2 is my Windows partition, /dev/hda5 is my Linux partition and
> /dev/hda1 is my boot partition - I think, I am not sure this makes any
> sense - Newbie here)
>
> After that I was able to boot into Fedora. But now GRUB doesn't allow
> me to boot into XP. XP was set as the default OS to boot into - GRUB
> doesn't boot into XP, it just keeps repeatedly showing the GRUB screen
> asking me to choose which OS I want to boot into. Once I chose XP,
> something like chainloader +1
> GRUB loading stage2
> is shown on screen and then it comes back to the GRUB screen.


You should have typed "grub-install /dev/hda". What you did blew away the
Windows boot records on /dev/hda1, your Windows partition. You need to
restore that somehow.

Do you have a Windows installation CD that you can use to get to rescue mode
for Windows?

> I have some really important documents in my Windows partition and I am
> seriously freaking out. It would be great if someone could help me out
> with this. I also tried the edit command with XP selected in the GRUB
> screen (I got two lines there which read:
> rootnoverify(hd0,0)
> chainloader +1)
> - I don't know if this is of any help)


Ahh, this is much easier. You can grab the NTFS kernel modules, or recompile
them for your kernel, with the tools at
http://sourceforge.net/projects/linux-ntfs/. This will allow you to read
those files, although I don't recommend writing them from Linux, that kernel
support is pretty limited.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com