Jump to content











Photo
- - - - -

Grub4dos for GPT disk or USB-sticks ?


  • Please log in to reply
13 replies to this topic

#1 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 26 August 2011 - 01:16 PM

Hi
I have been away for quite a while and could not follow latest research so this may be a stupid question ...

I am looking for a bootmanager/loader like grub4dos that can handle hardisks or USB-devices that use GPT partitioning.

Goal: create a USB-device with maybe 10 partitions and create a bootmenu to switch between them.

Plan B: use a regular MBR style USB-disk and then use a small diskimage of about 300 MBtotal size with maybe GPT - 3 partitions.
Then I would need to find a way to load this image into RAM and chainload it from Grub4Dos

Ideas or links welcome

thanks Ulli

#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 August 2011 - 02:49 PM

Hi
I have been away for quite a while and could not follow latest research so this may be a stupid question ...

I am looking for a bootmanager/loader like grub4dos that can handle hardisks or USB-devices that use GPT partitioning.

Goal: create a USB-device with maybe 10 partitions and create a bootmenu to switch between them.

Plan B: use a regular MBR style USB-disk and then use a small diskimage of about 300 MBtotal size with maybe GPT - 3 partitions.
Then I would need to find a way to load this image into RAM and chainload it from Grub4Dos

Ideas or links welcome

thanks Ulli


grub2 supports GPT.
You can do a hybrid MBR/GPT setup, most probably.
Read:
http://reboot.pro/11600/page__st__32
http://reboot.pro/15117/
http://reboot.pro/15158/


WHAT is the problem of having 10 partitions with "normal" MBR disks? :unsure:
Besides that you can make logical partitions bootable allright, you can use also a "rotating" MBR Partition Table:
http://reboot.pro/7138/

:cheers:
Wonko

#3 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 30 August 2011 - 07:41 PM

Hi Wonko
thanks for your links

the OS that made me try GPT boot-sticks was ESXi 5 - now I found a way to let it run directly from a CD or from a fat-partition on a MBR-partitioned USB-stick
so all this GPT-stuff is no longer necessary

thanks anyways

Ulli

#4 nando4

nando4

    Frequent Member

  • Advanced user
  • 112 posts
  •  
    Australia

Posted 06 September 2011 - 12:17 PM

I too require grub4dos to be able to directly map then boot a floppy image that may be on a GPT partition. Once in DOS, I'm using TianoCore's DUET-UEFI to chainload back to a UEFI partition. Only other bootloader that I've found can do direct mapping and possibly deal with GPT partitions is Burg4DOS. Is there any way grub4dos can provide the same functionality?

#5 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 September 2011 - 01:04 PM

Only other bootloader that I've found can do direct mapping and possibly deal with GPT partitions is Burg4DOS. Is there any way grub4dos can provide the same functionality?

No, the developers will need to add the feature to the app, and this is not necessarily a soon-to-be-implemented or planned-for-the-immediate future feature/addition.

What is the problem with burg4dos? :unsure:

:cheers:
Wonko

#6 nando4

nando4

    Frequent Member

  • Advanced user
  • 112 posts
  •  
    Australia

Posted 06 September 2011 - 01:16 PM

No, the developers will need to add the feature to the app, and this is not necessarily a soon-to-be-implemented or planned-for-the-immediate future feature/addition.


I use grub4dos to chainload into my floppy image then back out again. Of course it makes more sense to request that grub4dos could have this extra ability to map the floppy image on a GPT partition but it looks like my only choice is burg4dos. Burg4dos doesn't have a DOS binary so I would need to include two bootloaders to accomplish what I want. I'll need to evaluate how much extra space burg4dos needs and if it's excessive will need to give up on booting a floppy image instead referring affected users to boot USB sticks instead.

#7 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 September 2011 - 01:36 PM

Hmmm, I see.

Maybe you could combine WEE into the mix, as it is smaller than grub4dos:
http://reboot.pro/11751/
(but of course it depends on your booting sequence - which is not clear to me)

Just to disambiguate, are we talking of burg4dos:
http://reboot.pro/13282/page__st__16
http://sourceforge.n...jects/burg4dos/
or of burg4dos? :w00t: :
http://reboot.pro/12474/page__st__6
http://code.google.c.../downloads/list


:cheers:
Wonko

#8 nando4

nando4

    Frequent Member

  • Advanced user
  • 112 posts
  •  
    Australia

Posted 07 September 2011 - 03:05 AM

Maybe you could combine WEE into the mix, as it is smaller than grub4dos:
http://reboot.pro/11751/
(but of course it depends on your booting sequence - which is not clear to me)

Just to disambiguate, are we talking of burg4dos:
http://reboot.pro/13282/page__st__16
http://sourceforge.n...jects/burg4dos/
or of burg4dos? :w00t: :
http://reboot.pro/12474/page__st__6
http://code.google.c.../downloads/list


:cheers:
Wonko


I am booting a floppy disk image from Linux (grub2), Win7 (bootmgr) or XP (ntldr). grub4dos does that very well unless the image is hosted on a GPT partition.. then it can't find it in which case I have to either find another bootloader to do it or ask my users to boot from a USB stick with the floppy image data on it.

Was interested in wee that you linked but the doco says it can't be used to boot via ntldr's boot.ini, so no go.

Yes.. burg4dos is what I was referring to. It's the only bootloader I've found besides grub4dos that can do direct mapping of non-contiguous floppy images. I need that since I load/save configuration data to the floppy image. burg4dos seems to support GPT too so it provides a lot of functionality. If it had a DOS binary for my second chainloading then I could completely replace grub4dos with burg4dos instead. Would be great if the author could compile a new version. I believe it's based off grub2 which is now at version 1.99.

#9 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 September 2011 - 07:01 AM

Yes.. burg4dos is what I was referring to. It's the only bootloader I've found besides grub4dos that can do direct mapping of non-contiguous floppy images.

Perfect :thumbsup:, the idea was to disambiguate: I listed TWO links BOTH leading to a project called burg4dos. WHICH of the two (or a third one) are we talking about?

I am booting a floppy disk image from Linux (grub2), Win7 (bootmgr) or XP (ntldr). grub4dos does that very well unless the image is hosted on a GPT partition.

I still do not see an explained boot sequence in the above. Maybe I am a bit tough. :dubbio:
A boot sequence as I see it something like:

BIOS->Internal Hard disk MBR->PBR ofActive partiton->grub4dos->Floppy image->NTLDR
The grub4dos uses this menu .lst entry:


title XP

find --set-root /ntldr

chainloader ntldr

The above is an example and NOT an attempt to describe what you posted, which I do not understand. :ph34r:
WHAT device is booted?
WHAT is booted on it?
To WHAT is passed control?
etc. etc.

In order to (hopefully) give you a valid suggestion/idea, I need to understand in DETAIL WHAT you want to do and HOW you are currently doing it.

:cheers:
Wonko

#10 nando4

nando4

    Frequent Member

  • Advanced user
  • 112 posts
  •  
    Australia

Posted 08 September 2011 - 04:10 AM

@Wonko - here's my grub4dos configuration files to help understand what I'm doing. If you want, you can load the package yourself: DIY eGPU Setup 1.x for a first hand look at what I'm doing.

1. Boot the disk image using direct mapping, since I need to save some info to the disk image. This will be done via boot.ini (ntldr), BCD (bootmgr) or Linux grub2. Problem I've now got is this will not work with GPT partitions. Only burg4dos could do the direct mapping + boot the disk image from GPT. The other workaround for the GPT issue is to just get the user to boot from a USB stick rather than a disk image hosted off a partition.

:: Load disk image as floppy disk (fd0)

:: This file must be in root directory!!

 

# debug 0 is quiet operation

debug 0

timeout 0

 

# Set location of image file

set IMG=/eGPU/eGPU-Setup-10f.img

 

# Set root to be found location of image file

# The image can be found on *any* partition

find --set-root %IMG%

 

# Map image file as writable floppy drive (fd0)

map %IMG% (fd0)

map --hook

root (fd0)

chainloader (fd0)+1

rootnoverify

2. Do my pci-e fixups.

3. Chainload back out to the required OS using a method below. The first four work for BIOS boot. The last required for UEFI boot.

MBR
#############################################################################

# menu.mbr - boot from Master Boot Record (MBR)     						#

# Use 'grub4dos.Prompt' menu, type 'ls (hd[tab] to see drive mapping    	#

# DRV var passed by grub4dos.bat: A=USB-FLOPPY/DISKIMAGE(fd0). C=USB-HDD(hd0)   #

#############################################################################

# Quiet operation

debug 0\ntimeout 0

 

# Appears need the following line for highest compatibility across machines

# If still see a A20-related chainloading halt then edit %DRV%:\fdconfig.sys

# and change the himemx.exe /METHOD parameter as described in config.sys

map --a20-keep-on=0

 

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# DO NOT EDIT THIS SECTION. DRV=boot drv. If it's C then swap real hdd(hd1)

# as hd0 and real second hdd(hd2 - if it exists) as hdd1.

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Cater for USB-HDD boot/clobbered USB controller

if "%DRV%"=="C" map (hd1) (hd0)

if "%DRV%"=="C" map (hd2) (hd1)

if "%DRV%"=="C" map --rehook

 

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# User edittable section below

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#Boot MBR of first hard disk

chainloader (hd0)+1

 

#OR boot MBR of second hard disk

#chainloader (hd1)+1

XP
#############################################################################

# menu.xp - boot using XP /ntldr                                        	#

# Use 'grub4dos.Prompt' menu, type 'ls (hd[tab] to see drive mapping    	#

# DRV var passed by grub4dos.bat: A=USB-FLOPPY/DISKIMAGE(fd0). C=USB-HDD(hd0)   #

#############################################################################

# Quiet operation

debug 0\ntimeout 0

 

# Appears need the following line for highest compatibility across machines

# If still see a A20-related chainloading halt then edit %DRV%:\fdconfig.sys

# and change the himemx.exe /METHOD parameter as described in config.sys

map --a20-keep-on=0

 

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# DO NOT EDIT THIS SECTION. DRV=boot drv. If it's C then swap real hdd(hd1) as

# hd0 and set harddrive count=1 so the find doesn't use USB drive (clob sup)

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Cater for USB-HDD boot/clobbered USB controller

if "%DRV%"=="C" map (hd1) (hd0)

if "%DRV%"=="C" map --harddrives=1

if "%DRV%"=="C" map --rehook

 

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# User edittable section below

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#Use find to set root to location of XP's /ntldr then chainload it.

find --set-root --ignore-floppies --ignore-cd /ntldr

chainloader /ntldr

 

#OR chainload ntldr off a specific partition, eg:hd0,1

#chainloader (hd0,1)/ntldr

WIN7/VISTA
#############################################################################

# menu.win - boot using VISTA/W7 /bootmgr           						#

# Use 'grub4dos.Prompt' menu, type 'ls (hd[tab] to see drive mapping    	#

# DRV var passed by grub4dos.bat: A=USB-FLOPPY/DISKIMAGE(fd0). C=USB-HDD(hd0)   #

#############################################################################

# Quiet operation

debug 0\ntimeout 0

 

# Appears need the following line for highest compatibility across machines

# If still see a A20-related chainloading halt then edit %DRV%:\fdconfig.sys

# and change the himemx.exe /METHOD parameter as described in config.sys

map --a20-keep-on=0

 

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# DO NOT EDIT THIS SECTION. DRV=boot drv. If it's C then swap real hdd(hd1) as

# hd0 and set harddrive count=1 so the find doesn't use USB drive (clob sup)

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Cater for USB-HDD boot/clobbered USB controller

if "%DRV%"=="C" map (hd1) (hd0)

if "%DRV%"=="C" map --harddrives=1

if "%DRV%"=="C" map --rehook

 

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# User edittable section below

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#Use find to set root to location of Win7/Vista's /bootmgr then chainload it.

find --set-root --ignore-floppies --ignore-cd /bootmgr

chainloader /bootmgr

 

#OR chainload bootmgr off a specific partition, eg:hd0,1

#chainloader (hd0,1)/bootmgr

LINUX

#############################################################################

# menu.lin - boot using Linux /boot/grub/core.img (grub/grub2)          	#

# Use 'grub4dos.Prompt' menu, type 'ls (hd[tab] to see drive mapping    	#

# DRV var passed by grub4dos.bat: A=USB-FLOPPY/DISKIMAGE(fd0). C=USB-HDD(hd0)   #

#############################################################################

# Quiet operation

debug 0\ntimeout 0

 

# Appears need the following line for highest compatibility across machines

# If still see a A20-related chainloading halt then edit %DRV%:\fdconfig.sys

# and change the himemx.exe /METHOD parameter as described in config.sys

map --a20-keep-on=0

 

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# DO NOT EDIT THIS SECTION. DRV=boot drv. If it's C then swap real hdd(hd1) as

# hd0 and set harddrive count=1 so the find doesn't use USB drive (clob sup)

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Cater for USB-HDD boot/clobbered USB controller

if "%DRV%"=="C" map (hd1) (hd0)

if "%DRV%"=="C" map --harddrives=1

if "%DRV%"=="C" map --rehook

 

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# User edittable section below

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#Use find to set root to location of /boot/grub/core.img file then boot it

find --set-root --ignore-floppies --ignore-cd /boot/grub/core.img

kernel /boot/grub/core.img
UEFI
#############################################################################

# menu.uef - boot UEFI x64 Win7 by chainloading via Tianocore's UEFI-DUET   #

# See https://gitorious.org/tianocore_uefi_duet_builds/pages/Windows_x64_BIOS_to_UEFI

# for more details.                                 						#

#                                                   						#

# NOTE: due to requiring a floppy image with the UEFI framework, a USB  	#

#   	install with a clobbered USB controller will fail to boot.      	#

#############################################################################

# Quiet operation

debug 0\ntimeout 0

 

# Appears need the following line for highest compatibility across machines

# If still see a A20-related chainloading halt then edit %DRV%:\fdconfig.sys

# and change the himemx.exe /METHOD parameter as described in config.sys

map --a20-keep-on=0

 

# Set location of image file - this must be a contiguous file or else

# chainloading will fail as can't map a non-contiguous file for read/write.

set IMG=/uefi/Tiano_UDK_DUET_X64.img

 

# Set root to be found location of image file

find --set-root %IMG%

 

# Map image file as writable floppy drive (fd0)

map %IMG% (fd0)

map --hook

rootnoverify (fd0)

map --floppies=1

chainloader (fd0)+1

Edited by nando4, 08 September 2011 - 04:12 AM.


#11 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 September 2011 - 09:11 AM

Only burg4dos could do ...


I'll try again, for the third (and last) time. :frusty:
Is the burg4dos you are using the whatever you can get from here:
http://sourceforge.n...jects/burg4dos/
or is it the whatever you can get from here:
http://code.google.c.../downloads/list

Or more generally WHERE can I find the EXACT version of burg4dos you are using?

:cheers:
Wonko

#12 nando4

nando4

    Frequent Member

  • Advanced user
  • 112 posts
  •  
    Australia

Posted 08 September 2011 - 10:26 AM

Or more generally WHERE can I find the EXACT version of burg4dos you are using?


This post says burg has direct floppy image mapping abilities like grub4dos, this post says This can be copied to help customize your C:\burg\burg.cfg file. They show how to boot various flavors of Linux from both MBR and GPT partitions. So the combination of features means it could be a candidate to try to massage to get my image booted off a GPT partition but I'm not keen on the package size to do it. Hence I've not tried to integrate my package with it.

I'm awaiting word to see if the syslinux folks can be enhanced to provide direct mapping functionality.

#13 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 September 2011 - 11:28 AM

I see :), you don't want to play with me. :( :bye:

:cheers:
Wonko

#14 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 09 September 2011 - 02:30 AM

I've got the impression, he does want to play with you, but don't know how... Besides, he might not use any Burg version so far... and that option was missing in your query. :dubbio: :book:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users