Jump to content











Photo
- - - - -

Does UEFI booting read the MBR or PBR?


Best Answer Wonko the Sane , 17 April 2015 - 11:45 AM

Well, presuming that you are going to make a MBR style USB stick, UEFI completely ignores both the MBR and the PBR boot code, and loads the *whatever* UEFI bootloader that is found (on a FAT volume on the device).

 

You may want to read:

http://homepage.ntlw...ot-process.html

http://homepage.ntlw...ot-process.html

And more generally everything here:

http://homepage.ntlw...ynepollard/FGA/

under "Operating system bootstraps".

 

About CD/DVD's, yes, you can use EITHER some obscure OSCDIMG command or some somehow slightly less obscure MKISOFS command (making SURE to have a compatible mkisofs version), see:

http://reboot.pro/to...maker/?p=189257

http://reboot.pro/to...-under-windows/

 

:duff:

Wonko

Go to the full post


  • Please log in to reply
7 replies to this topic

#1 generalmx

generalmx

    Newbie

  • Members
  • 14 posts
  •  
    United States

Posted 16 April 2015 - 08:25 PM

Is there a way with USB Flash drives to automatically use BOOTMGR.EFI if UEFI-booting, otherwise use say grub4dos? I'm trying to make an absurdly compatible Easy2Boot setup where it boots into BOOTMGR by default only if UEFI-booting. Would I need to hack grldr to rename it to "bootmgr" for MBR loading, or can I just leave the Easy2Boot MBR & PBR records and place the necessary EFI files on the root? Not sure if EFI/UEFI even generally looks at the MBR or PBR.

 

I also want to do this for bootable DVDs too, but I suspect it's some fancy oscdimg command.


Edited by generalmx, 16 April 2015 - 08:26 PM.


#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 April 2015 - 11:45 AM   Best Answer

Well, presuming that you are going to make a MBR style USB stick, UEFI completely ignores both the MBR and the PBR boot code, and loads the *whatever* UEFI bootloader that is found (on a FAT volume on the device).

 

You may want to read:

http://homepage.ntlw...ot-process.html

http://homepage.ntlw...ot-process.html

And more generally everything here:

http://homepage.ntlw...ynepollard/FGA/

under "Operating system bootstraps".

 

About CD/DVD's, yes, you can use EITHER some obscure OSCDIMG command or some somehow slightly less obscure MKISOFS command (making SURE to have a compatible mkisofs version), see:

http://reboot.pro/to...maker/?p=189257

http://reboot.pro/to...-under-windows/

 

:duff:

Wonko


  • generalmx likes this

#3 generalmx

generalmx

    Newbie

  • Members
  • 14 posts
  •  
    United States

Posted 18 April 2015 - 02:17 AM

Awesome links Wonko, thanks! I actually ended up throwing the EFI portion of the Windows 8.1 Recovery USB files on an Easy2Boot (grub4dos) flash drive and seeing what pops up on a:

 

- Windows 8.1 Laptop using Secure Boot

- Windows 8.1 Netbook

- Macbook Pro (Intel) running Mac OS X 10.10

 

And in each case, including the Macbook, it's just as Wonko said --- the EFI files were detected and could be used, despite the MBR & PBR pointing to grub4dos.

 

So to make my Super-Easy2Boot-UEFI-Compatible Tech flash drives, I just need to start with Easy2Boot and throw my current setup on top of it.



#4 steve6375

steve6375

    Platinum Member

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

Posted 23 April 2015 - 04:56 PM

That only works if the E2B drive is FAT32 and you can only install one version of Windows.

Also, many systems will not give you a CSM\MBR boot choice if they are UEFI systems and detect the UEFI .efi boot file - so you wont be able to boot to Easy2Boot on those systems.

E2B uses .imgPTN files for UEFI booting. If you use these (converted from .iso files using MakePartImage) then you won't have these issues.



#5 S466531257BOSS

S466531257BOSS

    Member

  • Members
  • 33 posts
  • Location:NIEDERSACHSEN ( Lower Saxony ) , HANNOVER ( Hannoi )
  • Interests:ETC PP ...
  •  
    Germany

Posted 05 August 2015 - 02:51 PM

Because it is the only place where i have found

 

a : the two guys i thought of that can answer the question

 

and

 

b : a slight similar base to what i am requesting | asking

 

Wonko | Steve | anyone else that can help out ;

 

( it helps to look at the given posts the other way around ... to understand the following )

 

How could easy2boot as it is be made to work off a gpt-type internal SSD whereas the ESP ( fat28/32 ) is itself declared as active partition in hybrid mbr starting at sector 2048/64 (whatever works better) followed by either a single primary ntfs usable as storage hold for vhds or mostly appreciated an extended partition for native installed systems running from logical partitions containing lvm2 ; accessible as extended booted either via g4d of easy2boot from the esp-mbr-hybrid-active-partition or via grub2 from boot partition following the extended/ being the third and last primary at all partition ( rest is blocked in hybrid mbr and used for gpt-partitions ) ; I am steadily stumbling in some part of the process, feeling a bit like Schroedingers cat.

 

If you get the essence of what i am asking, please give advice/hints/links to similar tutorials/experiments.

 

And for sure, i don't want to dicuss the sense of this; to me it makes sense and i do not want to aim anything else by doing this, this is what i am aiming for, just to make it clear in forefront.

 

Any help appreciated.

 

 

THANKS FOR YOUR INTEREST .

 

S466531257 BOSS

PAETH CLAUDIUSRAPHAEL

 

P.S.: the background information you might have riddles on is : creating a gpt-based bios-bootable (without DUET or similar emulated EFI ) with the possibility to use the for-boot-accessible storage-part of the SSD|HDD up to 2.2TB Limit for native (hybrid-)mbr-partitioned (1P+1E) followed by the grub-boot that itself marks the border for anything-that-follows-is-purely-gpt-and-storage-or-chainloaded .


Edited by S466531257BOSS, 05 August 2015 - 02:57 PM.


#6 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 05 August 2015 - 04:28 PM

Right now it is clear (to me) only the solemn declaration that the intended/designed environment is not up for debate (which BTW not necessarily will grant you immunity from debate/observations on it).

 

The actual description of the environment is a single extremely loooong sentence:

How could easy2boot as it is be made to work off a gpt-type internal SSD whereas the ESP ( fat28/32 ) is itself declared as active partition in hybrid mbr starting at sector 2048/64 (whatever works better) followed by either a single primary ntfs usable as storage hold for vhds or mostly appreciated an extended partition for native installed systems running from logical partitions containing lvm2 ; accessible as extended booted either via g4d of easy2boot from the esp-mbr-hybrid-active-partition or via grub2 from boot partition following the extended/ being the third and last primary at all partition ( rest is blocked in hybrid mbr and used for gpt-partitions ) ; I am steadily stumbling in some part of the process, feeling a bit like Schroedingers cat.

 

that I really cannot understand. :(

 

Maybe you can re-describe it in a simplified manner, possibly using a list of the points or something similar, and possibly posting a copy of the Hybrid MBR as it is now?

 

What is missing at first sight is if this is a BIOS or UEFI (or UEFI+CMS=BIOS) system.

grub4dos requires BIOS, and should the actual "base" question  be "how to boot on BIOS on GPT", there are IMHO better methods than a Hybrid MBR:

http://reboot.pro/to...in-bios-to-gpt/

 

Shameless plug (and WARNING still to be fully tested/experimental):

http://reboot.pro/to...e-7#entry192974

http://reboot.pro/to...o-gpt/?p=193659

(you will need to read most of the thread to get the hang of the two possible solutions above)

 

And conversely (yes I am ignoring your request for no debate) it makes little sense to use GPT on a SSD on a BIOS system, unless the SSD exceeds 2.2 Tb.

 

If you are going for a Hybrid MBR instead make sure to be familiar with the info here:

http://www.rodsbooks...isk/hybrid.html

 

:duff:

Wonko



#7 S466531257BOSS

S466531257BOSS

    Member

  • Members
  • 33 posts
  • Location:NIEDERSACHSEN ( Lower Saxony ) , HANNOVER ( Hannoi )
  • Interests:ETC PP ...
  •  
    Germany

Posted 05 August 2015 - 06:52 PM

Thanks Wonko, i'll take a look into the links .

 

To roll it up from top to bottom :

 

Yes, i am familiar with hybrid mbrs efi uefi duet tianocore also and especially rodsbooks practical notes on that .

 

For testing purposes a just big enough 80GB SSD (  Intel X-18M G1 80 GB SSD - original one from the 2730p ) ;

If it survives the task - next stage is on the 2740p which runs a samsung evo 840 1TB ; next stage on the 2760p with samsung evo 850 1TB ; If it is possible to create the setup stable i am willed to spend a ( so-to-say refurbished then ) 3TB Fixstars ( possible in Q2 next year ) ;

 

Testing work also for testing on 1.5TB and 3TB Drives ( mechanical WD i think 32M Cache ) in forefront for HDD's 4TB and 8 TB external SATA-600 USB-3 and as sas raid 4 x 8TB but not as hardware raid, that would be total nonsense and even myself accpets that as a no-go. 

 

Oh sorry, the NoteBooks are Convertibles with digitizer HP CompaQ EliteBook 2730p | 2740P | 2760P - as an alternative a ruggedized Panasonic ToughBook CF-30 and a CF-31 later when worn-out will be the basement for the next years for the 2.5 inch drives ( the problem with the elitebooks is they need 1.8'' (7mm) drives ; its a bit cozy in there . CPU Classes vary from Core-Duo to i5 . RAM is varying from 2 to 8 GB .

 

 

The EliteBooks have HP-Customized (U)EFI from version 1.7 ( 2730p alternatively modded variant available with 2.0 but needs time and concentration due to TPM-Binding ) others are 2.0 2.1 2.10 2.11 ; EliteBooks are CSM-enabled and support Intel TXT | CIRA | SecureBoot model-dependent ; the ToughBooks are a bit more complicated ( GPS-Lock and some other fancy remote-stuff ) and the CF-30 runs EFI (1.3/1.7 ? AMI-EFI-CSM-Bios ) --- in short --- 5 mixed CSM/EFI/UEFI - Setups

 

--- and the wish to run and prepare the same drives also on bios-based systems ( Dell Poweredge 2900 (broken right now ) and 2950 ESXI5 | Windows Server 2008 | Windows Hyper-V 2012 | Ubuntu Server Lucid | Precise | Trusty | Fedora 21 WorkStation | Server and CentOS 6 and Debian Jessie untouched for month ) --- so in short --- i need interchangeability , mostly because i try to avoid to sit anymore than necessary right besides these monsters - i would estimate around 100 to 115dB noise of Wind on a beaufort scale around 6 -- NEVER SMOKE ASIDE ! )

 

The ToughBook runs fine/excellent with a hybrid-mbr in any variant. It runs Leopard / Fedora 21 WorkStation and Ubuntu Precise Desktop Which is the main reason for using a hybrid mbr as long as i haven't found more simple ways to run a hackintosh ( especially interested in Snow Leopard / Mavericks on the EliteBooks if Posssible ).

 

The eliteBooks by the way are the most hairy ones in terms of bitching around when something changes ( It is more complicated to avoid that the books save em'self beware of potential problems which there might could happen then to break them at will / at least when using the hardware-assisted tpm/credential/fingerprint-combo in combination with amt-assist and remote-storage ) --- however in short --- hybrid mbr because of hackintosh .

 

The optimum in terms of disk layout i can think of

 

1. ESP ( EFI system Partition )

: of 8GiB up to 32GiB

: ( Offset and Sector-Alignment 63 ( 32KB / 512 Byte/Sector ))

--- which is already problematic with external HDD 1.5TB USB-3 cases because i haven't found a firmware that allows me to handle that directly and the 3 TB are Adavanced Format ; So a better solution would be circumventing the start at Sector 63 for hybrid MBR problemless booting in bios mode ; any ideas/informations welcome

 

The ESP also

--- as the first hybrid mbr partition

--- active

--- containing any boot loaders

--- easy2Boot (G4D)

--- besides

: Clover / Chameleon / grub4dos earlier versions / refit / refind / grub2 / burg / ntldr / bootmgr ( except grub2 stage 1.5 - that one is appended as separate gpt partition and mirrored as bios-boot partition )

 

2. So to say in the inbetween of the first active primary hybrid mbr which is identical to the ESP

--- an hybrid mbr extended partition

--- with fixed positions

--- and reserved space between the EP and the first logical

--- to secure that ( due to the fact an MBR-EP handles PBR listwise ) the corruption is as minimal as possible just in case ;

 

--- followed by a copy of the EP ( 0x88 ) which is unknown to the hybrid mbr and set with enough offset to the ExtendedPartition-Definition

--- followed by all logical partitions pre-reserved in stackings of

: 8 GB + reserved-space-up-to 8 GiB

: 16 GB + reserved-space-up-to 16 GiB 

: 32 GB + reserved-space-up-to 32 GiB

: 64 GB + reserved-space-up-to 64 GiB 

 

etc. ( just to be able to calculate the offsets in case of repairing tables / recovery )

--- if you ask why --- BECAUSE ( in the logical ones interchangeable SetUps / Installed Versions of mostly Linux-LVM2-Container-Stuff awaits editing / direct-booting / cloning / deploying / virtualizing / etc. via Network/SDHC/CompactFlash/VHD(1/RAW)/DVD/BluRay )

 

So just in case one can follow - this is all about having a fixed grid that can be calculated in disaster case by hand and also can be setup dependent on a fixed set of hardware for storage/backup/deployment-purposes

 

 

However

 

The last logical-partition is the grub-stage 1.5 / the full grub2 --- aka the bios-boot which can already and should be runable in any mode (bios/csm/efi) problem is sometimes it does / sometimes not

 

--- so right now i am staggering with gaining the feel of when something will definately go to break ;

 

3. After the extended partition (well-defined as you might have understood right now and so far according to Steves notes on Easy2Boot )

--- the hybrid mbr

--- JUST contains the ESP as first primary

--- and the extended partition 

--- containing a plaintext-copy of the EP-PBR-LIST

--- followed by the Logicals

--- followed and therefore ended/closed by the grub2 bios-boot partition

 

... and here it comes : the icing on the top of the fire-pickle-carrying water-rock-climbing-deep-sky-diver drowning under it :

 

--- all that is followed by the MSR ( MicroSoft Reserved Partition which can be 32MiB if just followed by one 16GiB GPT-Partition or 128 MiB for any bigger amounts following )

 

... so the MSR states the border between the (hybrid-)MBR-Portion and the GPT-Piss-In-Rest-Portions of the drive .

 

... I know, i know you might think i am crazy and one could do that easier ; Well if so please show me the way . If not feel free to tinker with it .

 

The main problem right now is the layout of the grid to specify where the partitions have to start and end so that

--- enough space is inbetween

--- the offsets accord to the rules given by MBR | GPT | BIOS | EFI and the necessities of the bootloaders

--- and the offsets have to fit into the possible formats ( 512Byte/2kb/AF or conditions like having the ESP fat28/32 with 4k-clusters etc. )

 

All in all its simple , but to create it practically has to be done step-by-step and though almost all parts behave like they should if used on their own it is problematic because i haven't found the least common denominator for the partition-splitting.

 

And also i am not sure about things like in fact Mac OS X as stated on rodsbook has a definitive problem with hybrid-mbr protected ee-partition-type additionally ; it is true but i haven't found an alternative yet that is untouched by other operating systems ( besides x88 which is recognized by some os but doesn't bother them ) .

 

 

Well, that's it in a round-up for now.

 

When time comes - i'll try to essay out the conclusions and spend some drawings and attaching some partition tables and configurations; Until then : Maybe one has a deeper knowledge and an interest in it and is willed to help out with some thoughts to give the cuddle-muddle in my head based on some hundred tested variants until now a better shape .

 

 

YOU DID IT ! I AM PROUD OF YOU !! YOU BEHAVED BRAVE !!!

 

Now forget about all that crap, go get a girl or a drink or show your kid why you have that funny unexplainable look on your face ...

 

 

THANKS FOR YOUR INTEREST .

 

S466531257 BOSS

PAETH CLAUDIUSRAPHAEL

 

P.S.: You are save now ... That was the last post from my side, mostly because

: Reboot.Pro tells me ' You can make 1 more posts until A minute ago. '  :dubbio:

 

BURN AFTER READING .



#8 S466531257BOSS

S466531257BOSS

    Member

  • Members
  • 33 posts
  • Location:NIEDERSACHSEN ( Lower Saxony ) , HANNOVER ( Hannoi )
  • Interests:ETC PP ...
  •  
    Germany

Posted 05 August 2015 - 07:16 PM

And maybe i should end right here, copy that post into a new thread and in the meanwhile think of a fancy title for it ... before i get kicked because of hijacking threads ; Hmmm ...

 

Maybe :

 

REQUEST : Thoughts on Partitioning ( Hybrid-MBR / GPT ) - Stacked Partition Grid

 

THANKS AND SORRY FOR THE FISH .

 

S466531257 BOSS

PAETH CLAUDIUSRAPHAEL






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users