nickdu088 / SharpExt4

A .Net library to provide full access (read/write) to Linux ext2/ext3/ext4 filesystem
https://www.nickdu.com/?p=890
42 stars 9 forks source link

Could Not Read Disk MBR #7

Closed SpecialBus closed 2 years ago

SpecialBus commented 2 years ago

Hey Nick, I was trying to access a 1TB Sandisk sdxc card formatted as EXT4 and I am getting the error :

An unhandled exception of type 'System.IO.IOException' occurred in SharpExt4.dll Could not read disk MBR.

Basic Code:

 var disk = ExtDisk.Open(1);
  Debug.WriteLine(disk.ToString());

I can confirm I am passing in the correct Disk number (verified via Disk Manager. Here's some additional info that may help.

OS: Windows 11 Home (10.0.22000) Visual Studio Community 2022 .NET 4.8

Could it be because I'm using EXT4 with casefolding?

nickdu088 commented 2 years ago

Hey Nick, I was trying to access a 1TB Sandisk sdxc card formatted as EXT4 and I am getting the error :

An unhandled exception of type 'System.IO.IOException' occurred in SharpExt4.dll Could not read disk MBR.

Basic Code:

 var disk = ExtDisk.Open(1);
  Debug.WriteLine(disk.ToString());

I can confirm I am passing in the correct Disk number (verified via Disk Manager. Here's some additional info that may help.

OS: Windows 11 Home (10.0.22000) Visual Studio Community 2022 .NET 4.8

Could it be because I'm using EXT4 with casefolding?

How you made the ext4 disk? From the error, sharpext4 cannot read or understand the disk MBR sector.

You have to make sure you are running the program in admin permission. Follow the steps here https://www.nickdu.com/?p=919