Jump to content











Photo
- - - - -

Map MBR-style-disk on GPT partition

gptmbr map driver

  • Please log in to reply
28 replies to this topic

#26 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 10 September 2014 - 01:07 AM

So I want some ideas, esp by Sha0 : what should I pick as the starting point to make a simple driver to automount all embedded MBR disk images in GPT partitions? Windows or otherwise, whichever is easier.
 
I have zero experience in driver development, but I've been wanting to try, and this project seems ideally suited in that it is very simple in concept.

Well you could start by writing a driver which registers (subscribes) for notification of disk-arrival events. You could set that driver to load very early in the driver load-order. The driver could do something very simple such as walk GPTs and MBRs that are found on the disks (by reading sectors from those disks) and writing information about what was found to the Registry. You wouldn't worry about making a PnP driver for this kind of project. But that small project would, in my humble opinion, be a good introduction while actually covering some of the code you'd use in your full goal.

#27 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 10 September 2014 - 03:30 AM

Well you could start by writing a driver which registers (subscribes) for notification of disk-arrival events. You could set that driver to load very early in the driver load-order. The driver could do something very simple such as walk GPTs and MBRs that are found on the disks (by reading sectors from those disks) and writing information about what was found to the Registry. You wouldn't worry about making a PnP driver for this kind of project. But that small project would, in my humble opinion, be a good introduction while actually covering some of the code you'd use in your full goal.


Thanks for the info...

One more thing, should I start from the Win DDK and the MS docs, or should I pick an open-source driver and start from there?

Also, what kind of driver would this be? KMDF? WDM? "legacy" , meaning VxD or WIndows NT driver model?

#28 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 11 September 2014 - 12:43 AM

Thanks for the info...

You're welcome.

One more thing, should I start from the Win DDK and the MS docs, or should I pick an open-source driver and start from there?

Both. My WaitBt driver demonstrates some minimal driver stuff, including subscribing for disk-arrival event-notifications. Michael Brown's sanbootconf includes some Registry helper functions.

One possible "starting point" (well, "jumping right in" point) for a driver would be Microsoft's: http://msdn.microsof...3(v=vs.85).aspx

Also, what kind of driver would this be? KMDF? WDM? "legacy" , meaning VxD or WIndows NT driver model?

Such a small project probably wouldn't warrant KMDF. Yes, I think WDM would make sense.

#29 Areeb

Areeb

    Member

  • Members
  • 38 posts
  • Location:Lahore
  •  
    Pakistan

Posted 01 October 2016 - 05:47 PM

 
Nice concept. I tried this and used this Entry to boot in the MBR Based Disk Image Partition. Is this safe to use ?
 
title Start MBR Based OS
map --read-only --heads=0 --sectors-per-track=0 (hd0,6)+1 (hd0)
map --hook
chainloader (hd0,0)+1
rootnoverify (hd0)
map --harddrives=1
boot
 
I have successfully Installed and booted MS DOS on it. Will try Windows 3.1 next.
I have not tried XP yet but will try it soon too. Did anyone else had success with this method ?






Also tagged with one or more of these keywords: gptmbr, map, driver

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users