FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Fri May 14, 2021 22:57



Post new topic Reply to topic  [ 3 posts ] 
using ntfsinfo and mounted images of a partition 
Author Message

Joined: Thu Jan 15, 2015 18:22
Posts: 2
Post using ntfsinfo and mounted images of a partition
I've mounted a ntfs partition, from within a raw image file, using the command:

mount <imagefile> -o loop,ro,offset=<starting_FS_offset> /media/mntpt1

I now want to run ntfsinfo commands over the mounted partition.

When I try
ntfsinfo -m /media/mntpt1
I get the following errors and comments
Error reading bootsector: Is a directory
Failed to mount '/media/mntpt1': is a directory
Failed to open '/media/mntpt1'.

I can see and interact with the files in the mounted partition, through normal user stuff (e.g. copy, delete, etc)
I can extract the partition, then point ntfsinfo at the extracted partition and get information. it is a workaround. I would rather work directly with the mounted partition.

Anyone have a solution for my problem?


Thu Jan 15, 2015 18:44
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: using ntfsinfo and mounted images of a partition
Hi,

Quote:
I now want to run ntfsinfo commands over the mounted partition.

But ntfsinfo is designed to extract data from an unmounted partition....

Quote:
When I try
ntfsinfo -m /media/mntpt1
I get the following errors and comments
Error reading bootsector: Is a directory
Failed to mount '/media/mntpt1': is a directory
Failed to open '/media/mntpt1'.

This is because /media/mntpt1 is the mounted directory tree, not a raw partition image...
Quote:
Anyone have a solution for my problem?

You could try losetup, which has an offset option, something like (untested) :
Code:
losetup -o <starting_FS_offset> /dev/loop0 <imagefile>
ntfsinfo -fm /dev/loop0

Regards

Jean-Pierre


Thu Jan 15, 2015 22:29
Profile

Joined: Thu Jan 15, 2015 18:22
Posts: 2
Post Re: using ntfsinfo and mounted images of a partition
I think that will do what I need. Thanks.


Thu Jan 15, 2015 23:03
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.