Jump to content











Photo

How to boot Windows Installer/WTG through BIOS off GPT partitioned Removable USB Drive ?

gpt mbr bios uefi bootmgr grub4dos wtg

  • Please log in to reply
45 replies to this topic

#26 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 406 posts
  •  
    India

Posted 14 January 2016 - 05:32 PM

Can you make a test installation? Does windows installs fully?

Setup fails at target disk selection here, wihtout ntboot.
The FirmwareBootDevice is set to floppy, the BIOS boot is missing.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"FirmwareBootDevice"="multi(0)disk(0)fdisk(0)"

 

I have tested Wonko 'Underfloppy' method by deploying grldr, menu.lst, bootmgr and /boot/bcd within small hidden MBR partition of GPT USB Drive. I had also located /boot/bcd to my GPT USB Partition by using Bootice. I have successfully reached to disk selection screen. But Setup fails during target disk selection ???

 

AFAIU, LBA 63 to LBA 2047 is a small MBR Partition, then why "FirmwareBootDevice is set to floppy". ? Should I have to change something within 'menu.lst' so that "FirmwareBootDevice will set to small MBR hidden partition instead of floppy ?

LBA 63 to LBA 2047 is superfloppy ? underfloppy ? FAT12 MBR partition ? If it it partition then why "FirmwareBootDevice is set to floppy". ?

 

 I could not understood what is the issue which cause problem during disk selection. Can anybody please describe the problem which cause setup failure ?

 

Regards...



#27 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 January 2016 - 05:43 PM

I have tested Wonko 'Underfloppy' method by putting grldr, menu.lst, bootmgr and /boot/bcd within small hidden MBR partition of GPT USB Drive. I had also located /boot/bcd to my GPT USB Partition by using Bootice. I have successfully reached to disk selection screen. But Setup fails during target disk selection ???

 
AFAIU, LBA 63 to LBA 2047[ is a small MBR Partition, then why FirmwareBootDevice is set to floppy". ? Should I have to change something within 'menu.lst' so that FirmwareBootDevice will set to small MBR hidden partition instead of floppy ?

LBA 63 to LBA 2047 is superfloppy ? underfloppy ? FAT12 MBR partition ? If it it partition then why FirmwareBootDevice is set to floppy". ?
 
I could not understood what is the issue which cause problem during disk selection. Can anybody please describe the problem which cause setup failure ?

That area (sectors 63-2047) is NOT a partition (as it is not written to any "standard" partition table).
The grub4dos maps it (temporarily) to first floppy disk.

Try reading again my last post (just above yours).

You can add that area to the GPT partition table, then maybe you could avoid re-mapping it in grub4dos to floppy disk as it will already be (hd0,x) and possibly this way the setup will be happy. :unsure:

:duff:
Wonko
  • devdevadev likes this

#28 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 406 posts
  •  
    India

Posted 14 January 2016 - 05:57 PM

 

Anyway I would try creating a new one, you should be familiar by now with the procedure.

Thanks you sir for maintaining hope. I am eagerly waiting for your next invention....

 

You can add that area to the GPT partition table, then maybe you could avoid re-mapping it in grub4dos to floppy disk as it will already be (hd0,x) and possibly this way the setup will be happy.  :unsure:

May be then we will also be able to use 'NTBOOT' for happy setup by some fd(0) to (hd0,x) 'copying' tweaks ?



#29 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 January 2016 - 07:02 PM

Thanks you sir for maintaining hope. I am eagerly waiting for your next invention....


No "next" invention, and nothing to wait for, had you actually §@ç#ing READ the original thread or even just the last two posts of mine on this thread :frusty:, you should have been aware how it is a "before" invention.
 
However I will try again. :)
 
a. Start again from scratch, removing all partitions on that stick.
b. Get Gdisk or GPT Fdisk from here:
http://sourceforge.n...jects/gptfdisk/
c. do EXACTLY what I posted here (quoting myself):
http://reboot.pro/to...drive/?p=197228
i.e. create a "first" partition in the GPT device, be sure to use the right N for the PhysicaldriveN
d. redo the same things you did initially in this thread, adding the two partitions, one for the Rufus UEFI:NTFS driver and one for the Windows setup files.

 

Then try booting on BIOS,  DO NOT execute the menu.lst commands BUT try to find out ON COMMAND LINE if the grub4dos can find the bootmgr on (hd0,0) and can chainload it directly.

 
OR (simpler as the partition order should not make any difference):
a. Get Gdisk or GPT Fdisk from here:
http://sourceforge.n...jects/gptfdisk/
b. use it to add a partition covering the range 63-2047 to the GPT partition table, command sequence would be:
 


gdisk32 \\.\PhysicaldriveN
x
l
1
m
n
3
63
2047
EF01
p
v
w

 

Then try booting on BIOS,  DO NOT execute the menu.lst commands BUT try to find out ON COMMAND LINE if the grub4dos can find the bootmgr on (hd0,2) and can chainload it directly.
 

 

May be then we will also be able to use 'NTBOOT' for happy setup by some fd(0) to (hd0,x) 'copying' tweaks ?

The interesting part is that the situation is somehow symmetrical :w00t: you cannot understand what I write, and I really cannot understand why you are so obsessed with using NTBOOT :dubbio: it is either *needed* or it is not, if it is possible to boot without it it is better, as there will be one complication/overlay less.
 
:duff:
Wonko



#30 cdob

cdob

    Gold Member

  • Expert
  • 1342 posts

Posted 14 January 2016 - 09:36 PM

I could not understood what is the issue which cause problem during disk selection.


I understand and guess (windows setup is a black box, details are unknown) this:

If you boot from USB the BIOS maps the USB to 0x80.
The internal disk is mapped ot 0x81.

If you boot Windows installation from USB and select a internal disk as target:
What's your intention?
Do you like to boot from USB next and load windows from internal disk?
Do you like to boot from internal disk next and load windows from internal disk?

Windows setup assumes the second one.
To do this, setup has to ignore BIOS hard disk order, assumes that the BIOS has shifted the hard disk to 0x81.
Windows setup can not know the next boot disk, a strange BIOS may have mapped different.
Or a end user may enter the BIOS and shift hard disk order after next boot, it's unlikely.
Setup assumes the most likely case.

Bootmgr searches \boot\bcd at MBR parition or a floppy or a cd. Bootmgr dosn't find \boot\bcd at GPT partition.
Bootmgr can read GPT partitions: boot.wim is found at GPT partition.

Gurrently Bootmgr finds \boot\bcd at grub4dos (fd0) device, hence the FirmwareBootDevice fdisk(0).
Window setup reads FirmwareBootDevice, but can't find a floppy.
Setup get confused: which boot device should I assume?
Setup tries to set boot file to a non exiting device: this fails.

Some questions:
Is it possible to create some work arround?
To test at a lot of different hardware?

Ideas:
Find a grub4dos mappting to satify both: bootmgr and windows setup
Fix at window boot: idea: read SystemStartOptions RDPATH and copy to FirmwareBootDevice.

99 per cent all machines works at USB MBR partiton, both BIOS and UEFI.
Is it's worth to create at USB GPT partition?
How to test windows installation at a lot of different machines?

#31 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 14 January 2016 - 09:46 PM

Have you tried omitting the root command and chainloading to (fd0)/bootmgr ?

Also, you may need to swap hd0 and hd1 so that Setup thinks the internal hard disk was the first boot drive.

title test
map (hd0)63+1985 (fd0)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
chainloader (fd0)/bootmgr

  • devdevadev likes this

#32 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 406 posts
  •  
    India

Posted 15 January 2016 - 03:20 AM

Have you tried omitting the root command and chainloading to (fd0)/bootmgr ?

Also, you may need to swap hd0 and hd1 so that Setup thinks the internal hard disk was the first boot drive.

title test
map (hd0)63+1985 (fd0)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
chainloader (fd0)/bootmgr

 

I had also seen similar approach at  http://bbs.wuyou.net...3&extra=&page=4

Finally test drive using above method makes the setup extremely haapy... :)

 

http://bbs.wuyou.net...ighlight=NTBOOT

Can anybody please provide alternative download link for 2016.01.06-NTBOOT.

 

Should I use following menu entry in E2B to complete Windows Setup without any issue ?

title Install Win 10
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
set ISOC=/sources/boot.wim
/%grub%/NTBOOT NT6=%ISOC% NTLDR=/_ISO/e2b/grub/DPMS/NTBOOT.MOD/bootmgr
boot

Thanks Steve..... :)



#33 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 15 January 2016 - 10:50 AM

title Install Win 10
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
set ISOC=/sources/boot.wim
/%grub%/NTBOOT NT6=%ISOC% NTLDR=/_ISO/e2b/grub/DPMS/NTBOOT.MOD/bootmgr
boot

Not sure if this will work because hd0 is no longer available

 

Try omitting the  'map --hook' line (the hook will be done by NTBOOT)

 

If that doesn't work try:

title Install Win 10
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
set ISOC=/sources/boot.wim
find /%grub%/NTBOOT
pause Check location of NTBOOT
(hd1,0)/%grub%/NTBOOT NT6=%ISOC% NTLDR=(hd1,0)/_ISO/e2b/grub/DPMS/NTBOOT.MOD/bootmgr
boot

This assumes that the location of NTBOOT returned was (hd1,0). You may need to change the 2nd-last line accordingy.



#34 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 406 posts
  •  
    India

Posted 15 January 2016 - 02:36 PM

After omitting the 'map --hook' line setup will become happy once again... :) AFAIU, We have to use following menu entry for both MBR E2B and GPT E2B...in order to successfully complete Windows Setup by using NTBOOT method.

title Install Windows 10
map (hd0) (hd1)
map (hd1) (hd0)
set ISOC=/sources/boot.wim
/%grub%/NTBOOT NT6=%ISOC% NTLDR=/_ISO/e2b/grub/DPMS/NTBOOT.MOD/bootmgr
boot

Is it TRUE ?

 

Now It will be nice if E2B 'grldr' also support GPT. I am unable to download latest NTBOOT. Can anybody please provide alternative download link of 2016.01.06-NTBOOT 

 

Regards..



#35 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 15 January 2016 - 03:12 PM

 

Now It will be nice if E2B 'grldr' also support GPT.

 

This requires a bug report on 0.4.6a which in turn requires you to tell us which (if any) version(s) of 0.4.6a work and which ones don't.

 

Just replace each time the grldr file and boot to test.

 

You can download the versions from here.

 

I suggest you test using the 'binary chop' method. i.e.  you start with the first version, the middle version and the last version.

 

2012=OK

2014 = Fail

Last 2016=Fail

 

so now you test a 2013 version, and depending on the result, you get closer and closer to where the change happened.

 

This is working on the principle that 0.4.5c works and that 0.4.6a started out from a version of 0.4.5c.

 

P.S. As many versions of 0.4.6a were buggy, if it doesn't actually get to the Main menu then just discard the result as invalid!


Edited by steve6375, 15 January 2016 - 03:13 PM.


#36 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 406 posts
  •  
    India

Posted 15 January 2016 - 03:39 PM

grub4dos-0.4.6a-2013-10-17 - OK

grub4dos-0.4.6a-2013-11-02 - FAIL



#37 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 15 January 2016 - 03:48 PM

Do all /many versions after 2013-11-02 fail in a similar way?



#38 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 15 January 2016 - 03:53 PM

Issue reported https://github.com/c...b4dos/issues/92



#39 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 406 posts
  •  
    India

Posted 15 January 2016 - 03:59 PM

Thanks.......I have tested at least 10 versions after 2013-11-02. And all fail in a similar way.



#40 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 January 2016 - 08:36 PM

Issue reported https://github.com/c...b4dos/issues/92


Just in case, you might want to specify how the approach DOES NOT use a "Hybrid GPT" partition, it uses rather a non-partition, actually an (under)floppy image with two bootsectors, one which doubles as MBR and has a 63 sectors "hole" and a "normal" one.

The modified MBR code DOES NOT use the conventional addresses for the partition table.
http://reboot.pro/to...e-9#entry193659

 

I tried to write this piece of info all over the place, seemingly it does not get through :frusty:

The "partition" only briefly exists, and vanishes as soon as the (loading grldr) volume bootsector is loaded.

 

The issue might be in the bootsector code that loads grldr.

A Hybrid GPT uses one or more the partition table slots, and it is "breaking" the standards, see:
http://www.rodsbooks...isk/hybrid.html


:duff:
Wonko



#41 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 15 January 2016 - 08:43 PM

A clear step-by-step guide on how to make it would probably be helpful to chenall, et al. (and me).

e.g. a complete download with a ReadMe.txt???

I haven't actually tried it myself because the thread is so long and it is not clear what batch file or procedure was actually followed...



#42 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 January 2016 - 12:02 PM

A clear step-by-step guide on how to make it would probably be helpful to chenall, et al. (and me).

e.g. a complete download with a ReadMe.txt???

I haven't actually tried it myself because the thread is so long and it is not clear what batch file or procedure was actually followed...

 

Well, it is (was) an experiment/work in progress, but the idea is straightforward and can be understood reading through just 1 (one) post on the original thread, which has already specifically been linked to at least twice:

http://reboot.pro/to...e-9#entry193659

and which includes a step-by-step guide.



The batch itself is (I believe) also very simple (and it is commented).



I don't know what to add :unsure:, the .zip contains:

  1. the batch
  2. a "base" FAT12 bootsector with code to load grldr
  3. a "base" MBR with some "special" code that chainloads the bootsector of a partition defined in a shifted, single entry, partition table at offset 0x19E and that includes a BPB area <- this is nothing by a slightly modified makebootfat MBR code (which in turn is derived from Syslinux)

The "shifted" partition table entry is of course only "visible" by the MBR booting code, so it doesn't really "exists" for anything longer than the time the MBR code uses it to chainload the "floppy" bootsector on LBA63, and as soon as grub4dos is booted access to the files can be obtained through (hd0) using the BPB in the MBR.

Since the MBR contains the "normal" GPT protective entry, grub4dos does see all the partitions in the GPT partition tables.



The original idea was to have a "stealth" method to make a pre-existing GPT partitioned disk bootable from BIOS WITHOUT breaking the GPT standard and WITHOUT altering anything that is actually ever accessed on the disk when used on a UEFI machine.



As said earlier, nothing prevents (in the case of a disk "designed" to be BIOS/UEFI dual bootable) to make an entry for the same small area in the GPT partition table, so that it is actually listed as a (hd0,x) in grub4dos and in the whatever OS is UEFI booted.



Later, a slightly modified version making use of the OFS concept, due to a request by cdob:

http://reboot.pro/to...e-9#entry193712

was provided:

http://reboot.pro/to...e-9#entry193947

but has never been tested or at least no reports about it came out.



The "issue" with the version described and used in this thread being that it is essentially an "evolved" version of the "Vista boot floppy" and as such the \boot\BCD is not mounted in the Registry when the windows OS is booted, but noone seemingly tested properly alternate mapping options in grub4dos or the concurrent mapping in the GPT partition table or both.



:duff:

Wonko



#43 tinybit

tinybit

    Gold Member

  • Developer
  • 1052 posts
  •  
    China

Posted 19 January 2016 - 01:46 PM

Issue reported https://github.com/c...b4dos/issues/92


yaya said he has just fixed the bug.

#44 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 19 January 2016 - 09:20 PM

yaya said he has just fixed the bug.

Where is new binary version? I can only see old 0.4.6a 2016-01-14??



#45 alacran

alacran

    Frequent Member

  • Advanced user
  • 490 posts
  •  
    Mexico

Posted 04 February 2016 - 05:35 AM

Well I can see there is a new grub4dos-0.4.6a-2016-01-19.7z in Download page: http://grub4dos.chen...egories/0-4-6a/and also  in Issue report #92 Steve6375 said thanks to yaya for this update.

But I want to know if it is working now as requested, has anybody tested it?

 

I ask because I do not have at the moment a drive available to format to GPT and try it myself.

 

alacran



#46 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 406 posts
  •  
    India

Posted 04 February 2016 - 02:15 PM

Now it works as requested if you apply it with Wonko underfloppy method...


  • alacran likes this





Also tagged with one or more of these keywords: gpt, mbr, bios, uefi, bootmgr, grub4dos, wtg

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users