How to create a DOS-bootable gpt partition

I'm attempting to boot DOS from a gpt ms-basic-data type partition. I have dd'ed a FREEDOS img to the partition and attempted to load it using grub chainloader. The result is:
Code:
partition signature !=55AA

Is what I'm attempting actually doable?
 
When using grub, FreeDOS limitations should not matter.
Try using memdisk, which is like a magic wand in most cases. Place it in /boot/grub (or wherever grub resides) & edit your grub.cfg as:
Code:
set root="hd0,gpt?"  # This is your grub-partition
set memfile="memdisk"  # expected to be in grub folder
set imgfile="?.img"    # name of img or iso or whatever
linux16 ($root)$memfile floppy pause    # wait=slow-down, floppy=older images require
initrd16 ($root)$imgfile

With, this, you don't even need a separate partition, the image file can be booted straight-up.
HTH
 
When using grub, FreeDOS limitations should not matter.
Try using memdisk, which is like a magic wand in most cases. Place it in /boot/grub (or wherever grub resides) & edit your grub.cfg as:
Code:
set root="hd0,gpt?"  # This is your grub-partition
set memfile="memdisk"  # expected to be in grub folder
set imgfile="?.img"    # name of img or iso or whatever
linux16 ($root)$memfile floppy pause    # wait=slow-down, floppy=older images require
initrd16 ($root)$imgfile

With, this, you don't even need a separate partition, the image file can be booted straight-up.
HTH
Many thanks for this insight.

After some experimentation, I think some progress is being made after making these changes:-
Code:
set root=(hd0,gpt2)
set memfile="/boot/grub/memdisk"  #  memdisk from syslinux 6.03
set imgfile="/boot/grub/dos.img"    #  balder10.img renamed as dos.img
linux16 ($root)$memfile floppy pause  
initrd16 ($root)$imgfile
This is what I got:-
Booting a command list

error: you need to load the kernel first.

Press any key to continue...
MEMDISK 6.03 2014-10-06 Copyright 2001-2014 H. Peter Anvin at al
MEMDISK: No ramdisk image specified!
Looks as though memdisk is starts but there may be something wrong with balder.img. Also which 'kernel' is being referred? It doesn't really seem to matter that it hasn't been loaded as the process continues anyway.

BTW I'm using the grub2-efi FreeBSD pkg.
 
It was late, it slipped my mind :p

The solution I gave is apparently for the FreeDOS floppy.img

The full .img file wil be more complex, as .img files are not images of a partition, but usually of a whole disk. That means they start with a bootloader and a partition table. Under normal circumstances, you have to find out the layout of the .img and modify the grub entry accordingly.

Lucky for you, memdisk has a complete how-to page. IDK which image you downloaded, so review :)
http://www.syslinux.org/wiki/index.php?title=MEMDISK
 
Thanks for pointing this out. I had actually looked at this page previously but failed to notice:

GRUB2
Add the following in your config scripts for grub2:

menuentry "Hardware Detection Tool from floppy" {
linux16 /memdisk
initrd16 /hdt.img
}

menuentry "Hardware Detection Tool from iso" {
linux16 /memdisk iso
initrd16 /hdt.iso
}

menuentry "DOS from floppy image (with 'raw' parameter)" {
linux16 /memdisk raw
initrd16 /dosboot.img
}

Armed with this, I'll be adding a number of entries to my FreeBSD rescue disk.
 
Glad I could help. I have a separate Grub partition at the end of my HDD (size 128M - 256M should suffice), so that I can boot into some rescue mode no matter what.
But my main purpose of using Grub is to boot PXE clients to almost anything, including loopbacked iso files served from my http server :))) . PXE allows safer virus scans on suspected Windows PC's.
I also have GPT partitioned USB sticks that allow me to Grub-boot several tools for rescuing or modifying systems.
 
Actually, I'm a big fan of PXE... I guess you have seen Warren Block's PXE Booting Utilities page ... took me some time to make it all work, but I'd be lost without it now. I'm not sure I understand how you use Grub with PXE.... although I'm only just getting the hang of Grub, but can't get it installed with an EFI based FreeBSD.

As for PXE utilities, I'm looking for something that will boot off a PXE server and allow me to mount network resources. mfsBSD would be ideal, but it doesn't seem to support SAMBA or NFS, as it comes.
 
Back
Top