1

i have a Kingstone DT101 G2 (8G) Flash Stick from Ubuntu linux i removed the partition from it and created 2 partitions (4GB NTFS Partition), (4GB EXT3 Partition).

as i expected the EXT3 Partition doesn't appear on windows machines, it only appear in the "Computer management application as a volume with unknown file-system.

what i want now is to read the EXT3 Partition Serial ID from windows using C# code. i tried the DriveInfo.GetDrives(); but it lists only the other drives (C:, D: ..etc)

any ideas ?

Emad Elsaid
  • 323
  • 3
  • 19
  • What for? Can your code reasonably assume that there is *always* one of these flash sticks connected with exactly the same partition scheme? What problem are you trying to solve? – Cody Gray - on strike Jul 28 '13 at 13:58
  • i'm trying to have an EXT partition in a Flash Stick, then hard code he EXT partition serial in my C# application and i won't let the application to start except when he read this EXT serial from the flash stick. – Emad Elsaid Jul 28 '13 at 14:16
  • Which OS are you running on ? Which permissions does your application have ? Is it always a physical machine or could it be a VM ? – Yahia Jul 28 '13 at 14:29
  • i'm on windows 8, application will we a Local System service (currently testing code snippets in a console application), production machines are physical, testing machines are virtual, the solution of this question is required for physical machine. – Emad Elsaid Jul 28 '13 at 14:35
  • 1
    You need to read the raw partition using the [`CreateFile` API](http://stackoverflow.com/questions/38190/how-do-i-read-a-disk-directly-with-net), this will allow you to read the partition. Then you need to read the EXT3 file system structure to get the volume ID. There is plenty of google-fu for this information – Anya Shenanigans Jul 28 '13 at 14:59

1 Answers1

0

Download and install "Ext2 Volume Manager" on your Windows OS partition. This should allow you to view the Linux partitions in a Windows environment in read/write mode. Good luck.