Bug#550702: grub-pc: Grub hangs after having ran Windows XP
Emmanuel Gamby
emmanuel.gamby at aeronomie.be
Mon Oct 12 14:47:20 UTC 2009
Felix Zielcke wrote:
> 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)
>
>
I compared the dumps. They are indeed different. I don't know whether it
makes sense I send you them since it's a problem with Windows. Let me
know whether you want them.
>>> 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
>
I did grub-install --force /dev/sda2 since /dev/sda1 is my Windows
partition. The warning message is a bit scary...
> 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.
>
>
I removed the bootflag from Windows partition and set it on /dev/sda2.
I rebooted the system and it works now. I am able to switch between the
two operating systems.
Thanks again for your help,
Manu
More information about the Pkg-grub-devel
mailing list