Author Topic: USB MSD with multiple partitions  (Read 5221 times)

egovind

  • Member
  • ***
  • Posts: 14
USB MSD with multiple partitions
« on: February 23, 2016, 05:38:26 am »
Hi,

I would like to create a USB MSD device with 2 partitions. What is the right way to go about it?

1. Do I just mount as a LUN = 1 device and then allow the host operating system to partition the media disk appropriately? I am aware that this method has a problem in Windows 7, that it only mounts one partition for removable disks

2. Do I set LUN = 2 and setup the firmware so that LUN1 LBA[0,MAX] are mapped to [LBA 0, MEDIA_MAX_LBA/2] on the media and LUN2 LBA[0,MAX] are mapped to [MEDIA_MAX_LBA/2, MEDIA_MAX_LBA ] ? In this case I presume the OS would see two disks corresponding to each LUN and would install an MBR on each of them?

The "media" in my case is an SD Card.

Govind

Bret

  • Frequent Contributor
  • ****
  • Posts: 68
Re: USB MSD with multiple partitions
« Reply #1 on: February 23, 2016, 10:16:31 am »
I think you've already answered your own question.  If you want it to work with Windows and don't want to write a custom driver, you'll need to do option 2.

Also, the problem of only mounting one partition I don't think is limited to Windows 7.  I'm not 100% positive, but I think it started in Vista and is a "feature" in all versions of Windows since Vista.

egovind

  • Member
  • ***
  • Posts: 14
Re: USB MSD with multiple partitions
« Reply #2 on: February 23, 2016, 08:17:48 pm »
Great! Thanks a lot for the feedback!