Bug#550702: grub-pc: Grub hangs after having ran Windows XP

Felix Zielcke fzielcke at z-51.de
Mon Oct 12 12:58:22 UTC 2009


Am Montag, den 12.10.2009, 14:37 +0200 schrieb Emmanuel Gamby:

> Yes, I agree with you. Is it a way to easily validate this. For 
> instance, by dumping the corresponding sectors before and after the 
> problem ?

With `fdisk -lu' you can see at what sector your first partition starts.
Usually this is 63

dd if=/dev/sda of=sda.1 count=63 would save everything until the first
sector of it to file sda.1 in current directory.

To see the difference you could then e.g. use
diff -u <(hd sda.1) <(hd sda.2)

> > Hm maybe try if booting into the Windows safe mode also causes this.
> >
> > The only way we could fix this inside GRUB 2 would be to add an option
> > to grub-install to force the use of blocklists.
> > But we won't do that.
> > In fact we did it the other way, you need to use the --force option if
> > you really want them in case embeding isn't possible.
> >
> > A workaround for you would be use the MBR code of the `mbr' package and
> > then install GRUB 2 to a bootsector instead of MBR and set the
> > boot/active flag on that partition.
> >   
> Well, I am not a GRUB expert, but I will read the manual.
> 
> Thanks for your help.
The GRUB manual would be the wrong place to look for this.

the mbr package provides install-mbr script.
To install it's code into MBR: install-mbr /dev/sda
To install GRUB 2 into bootsector: grub-install --force /dev/sda1

To active bootflag there: cfdisk /dev/sda select the partition with the
arrow keys, choose Bootable, then Write and then Quit.
But don't set the boot flag on more then one partition.
I.e. if your Windows one has it still, you need to remove it there with
the Bootable button or b key.



-- 
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer






More information about the Pkg-grub-devel mailing list