public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Why grub can't load win kernel
Date: Wed, 5 Oct 2011 20:53:31 +0100	[thread overview]
Message-ID: <201110052053.42066.michaelkintzios@gmail.com> (raw)
In-Reply-To: <tencent_1BBB11A1745861EA1DC52BAE@qq.com>

[-- Attachment #1: Type: Text/Plain, Size: 2109 bytes --]

On Wednesday 05 Oct 2011 16:32:10 Lavender wrote:
> The configuration of win kernel in grub.conf is like below:
> 
>  rootnoverify (hd0,0)
>  makeactive
>  chainloader +1

Assuming that your MSWindows OS is on the first partition of the first (master) 
disk then the above is correct and grub should boot it fine;  i.e. MSWindows is 
on /dev/sda1


>  It worked yesterday , but after I rebuilding grub software, it can't work.
> I don't know why, it still can boot gentoo kernel, I am confused,because
> grub only can do operations to MBR, it can not influence contents on
> windows partition.

This is not entirely correct.  GRUB will write its boot code where-ever *you* 
tell it to write it ...

For example if you installed it on MSWindows' partition - instead of the disk 
MBR - you will most likely not be able to boot MSWindows!  This is because you 
have overwritten the partition table with GRUB's code and GRUB cannot natively 
boot MSWindows.

If for example you ran:

  grub-install /dev/sda1

instead of the correct stanza of:

 grub-install /dev/sda

you would have written GRUB on the wrong place, the first partition boot 
record, instead of the disk's Master Boot Record.  Of course your old GRUB 
code in the MBR is still there and it happily boots Linux.


>  I also tried boot manually in grub command interface, but after showing
> "load stage2" it goes back to grub > .... I'm gonna pissed..... I have
> many important things in windows system, will someone  figure it out?

Calm down.

Your data is still there.  Just the partition table has been overwritten - if 
indeed you typed the wrong device as I suspect above.  So the command you need 
is fixboot and you need to run this from a MSWindows installation CD/USB stick 
on the first partition.  

Have a look on the Internet for more details on the fixboot command and its 
modern equivalent (if you're running Windows7).  Also have a look on the 
Internet for MSWindows CDs or USB sticks to be able to run the command if you 
don't have one handy.

HTH.
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2011-10-05 19:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 15:32 [gentoo-user] Why grub can't load win kernel Lavender
2011-10-05 15:39 ` Alan McKinnon
2011-10-05 16:26   ` Jonas de Buhr
2011-10-05 19:20     ` Alan McKinnon
2011-10-05 19:49       ` Jonas de Buhr
2011-10-05 19:53 ` Mick [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-05 15:48 Lavender
2011-10-05 16:33 ` Jonas de Buhr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201110052053.42066.michaelkintzios@gmail.com \
    --to=michaelkintzios@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox