-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not read disk MBR error #11
Comments
You need to convert the virtual machine (.vhdx) format to the raw disk format. |
Can you give an idea on how I can do this? |
https://docs.openstack.org/image-guide/convert-images.html As far as I know, the file header format is different. |
Yep, it doesn't seem to work for me. Actually, I can read the paths of the files with DiscUtils, but I need to export these files. Any idea how it could be? |
If you can use diskutils, you should be able export those files without any issue. Diskutils only provides read permission only from the disk image, but not write. SharpExt4 allows you to write a file to the disk image. |
I am reading with this code. If I make any changes to this code, I can export it.
|
listbox.Items.Add(name) |
I don't think it's possible with something like this, but I tried it anyway.
|
You can't just use File.Open(dd,FileMode.Open). That is the.net native way. You need use diskutils API to open the file. Check diskutils file open API. |
Hello
I mount a Linux-based virtual machine (vhdx) with the arsenal mounter. I see this added in Disk management I want to access this disk with Sharpext4 and read and copy it I couldn't find how to do it. I used the code below but I get the Could not read disk MBR error.
private void Mountet_Click(object sender, RoutedEventArgs e)
{
//Open a Linux ext4 disk image
var disk = ExtDisk.Open(1);
//Get the Linux partition, and open
var fs = ExtFileSystem.Open(disk, disk.Partitions[0]);
//List all files in /etc folder
foreach (var file in fs.GetFiles("/etc", "*", SearchOption.AllDirectories))
{
Console.WriteLine(file);
}
} }
The text was updated successfully, but these errors were encountered: