help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to boot Windows partition using ntldr


From: Andrei Borzenkov
Subject: Re: Unable to boot Windows partition using ntldr
Date: Sun, 21 Jun 2015 09:11:56 +0300

В Sat, 20 Jun 2015 17:40:09 -0700
address@hidden пишет:

> >> I am performing test boots using QEMU/KVM.
> > 
> > It's rather different from "booting from USB" in your original post.
> 
> How is that different in any way of consequence?

Please explain how to boot from sda6 on real hardware.

>                                                  I am using QEMU/KVM to 
> boot a USB disk which is plugged into my machine. In my estimation, that 
> is exactly "booting from USB"
> 
> > You do not boot from sda6. You boot from hard disk that happens to have
> > the same size as sda6. No surprise booting does not work when disk
> > content appears to be suddenly moved to another disk location when
> > you try full disk.
> 
> This is a completely semantic point.

It is not.

>                                      Chainloading the PBR from GRUB 
> should have the same effect as treating the partition as an independent 
> disk and booting from its MBR.
> 

Any low level boot code on PC BIOS platform I'm aware of works in
terms of absolute disk offsets, at least during initial bootstrapping
phase. If you can boot when treating partition as independent disk, it
means whatever code is installed in PBR is set to work with offsets
starting from zero (first sector of disk). When you present this
partition as real partition, offset of the same data/code suddenly
becomes non-zero, so it simply looks in the wrong place. Which pretty
much explains why chainloading stops working in this case.

Not to forget that when you present partition as disk the *partition*
cease to exist (partition label is no more visible). Which could be
another issue, if e.g. Windows is set to look for unpartitioned disk
for its data. Which /may/ explain why it does not work when you load
ntloader directly.

I'm not native English speaker so I do not know if "should" in your
reply means "you assume but do not know for sure" or "you know how
PBR/ntloader code works and it is a bug in GRUB". In the latter case it
would be good if you could help to debug it.

> Just to cover my bases, I dropped into the windows cmdline with BCDedit 
> to verify the BCD data. I found it to be correct. Windows sees the 
> partition I'm trying to boot as volume E, and the "device" and 
> "osdevice" for the default boot entry are set to partition=e:
> 
> Everything to me seems to indicate bootmgr cannot even find the 
> \boot\bcd file, which raises questions to me about whether I am 
> overlooking something when setting the root partition in my GRUB 
> configuration..
> 
> On 2015-06-19 23:03, Andrei Borzenkov wrote:
> > В Fri, 19 Jun 2015 22:18:16 -0700
> > address@hidden пишет:
> > 
> >> I am performing test boots using QEMU/KVM.
> > 
> > It's rather different from "booting from USB" in your original post.
> > 
> >>                                            So to test a GRUB-handled
> >> boot, I am running:
> >> 
> >> qemu-system-x86_64 --enable-kvm -m 512 /dev/sdb
> >> 
> >> To boot the partition directly, I am running:
> >> 
> >> qemu-system-x86_64 --enable-kvm -m 512 /dev/sdb6
> >> 
> > 
> > You do not boot from sda6. You boot from hard disk that happens to have
> > the same size as sda6. No surprise booting does not work when disk
> > content appears to be suddenly moved to another disk location when
> > you try full disk.
> > 
> >> On 2015-06-19 20:33, Andrei Borzenkov wrote:
> >> > В Fri, 19 Jun 2015 18:10:55 -0700
> >> > address@hidden пишет:
> >> >
> >> >> Hello list!
> >> >>
> >> >> I'm encountering an issue with GRUB 2.02.beta2-5 in which I can't seem
> >> >> to chain load a windows partition on my USB stick
> >> >>
> >> >> The relevant portion of my config is included below:
> >> >>
> >> >> --grub.cfg
> >> >>
> >> >> insmod part_msdos
> >> >> set winpe3=(hd0,msdos6)
> >> >>
> >> >> menuentry "Windows PE 3.1" {
> >> >>    insmod ntldr
> >> >>    insmod ntfs
> >> >>    set root=${winpe3}
> >> >>
> >> >>    ntldr /bootmgr
> >> >> }
> >> >>
> >> >> --end cfg
> >> >>
> >> >> When booting my Windows PE installation from this configuration, I
> >> >> receive the error below:
> >> >>
> >> >> --
> >> >> File: \Boot\BCD
> >> >> Status: [octal garbage]
> >> >> Info: An error occurred while attempting to read the boot
> >> >> configuration
> >> >> data.
> >> >> --
> >> >>
> >> >> The error seems to obviously point to the boot configuration data as
> >> >> being corrupted or incorrect. However, when I bypass GRUB and boot
> >> >> directly from /dev/sda6,
> >> >
> >> > How do you boot directly from sda6? It is extended partition and
> >> > normally only primary partitions are bootable.
> >> >
> >> >>                          Windows PE boots completely normally,
> >> >> suggesting that not only is the BCD data completely fine, but even the
> >> >> PBR seems to be working properly. I have also tried chainloading using
> >> >> the following configuration
> >> >>
> >> >> --grub.cfg
> >> >>
> >> >> insmod part_msdos
> >> >> set winpe3=(hd0,msdos6)
> >> >>
> >> >> menuentry "Windows PE 3.1" {
> >> >>    insmod chain
> >> >>    insmod ntfs
> >> >>    set root=${winpe3}
> >> >>
> >> >>    chainloader +1
> >> >> }
> >> >>
> >> >> --end cfg
> >> >>
> >> >> This configuration doesn't even get me as far as the bootmgr error.
> >> >> Instead, I just get the less than descriptive message, "Boot error".
> >> >>
> >> >> Everything I have seen gives me more than ample reason to believe the
> >> >> boot data on this partition is completely valid. That leaves me with
> >> >> the
> >> >> conclusion that I have somehow misconfigured GRUB. Does anyone have
> >> >> any
> >> >> pointers for additional troubleshooting? Any suggestions or help
> >> >> greatly
> >> >> appreciated! Thanks in advance!
> >> >>
> >> >> --
> >> >> James Lott
> >> >>
> >> >> _______________________________________________
> >> >> Help-grub mailing list
> >> >> address@hidden
> >> >> https://lists.gnu.org/mailman/listinfo/help-grub
> >> >
> >> >
> >> > _______________________________________________
> >> > Help-grub mailing list
> >> > address@hidden
> >> > https://lists.gnu.org/mailman/listinfo/help-grub
> > 
> > 
> > _______________________________________________
> > Help-grub mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/help-grub




reply via email to

[Prev in Thread] Current Thread [Next in Thread]