FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Fri May 07, 2021 03:42



Post new topic Reply to topic  [ 3 posts ] 
Detect unformatted NTFS partition so that I may mkfs.ntfs 
Author Message

Joined: Mon Jan 18, 2010 16:38
Posts: 30
Post Detect unformatted NTFS partition so that I may mkfs.ntfs
Greetings,

I am wondering the correct technique to perform to test a secondary (data) partition when deploying an NTFS Clone primary (os) partition?

I have the steps worked out in order to deploy the NTFS image, expand the image to the target partition free space, then mount the partition to add device drivers specific to the target image.

How may I be sure that the D: partition is actually NTFS and not raw, only in which case I wish to call mkfs.ntfs to format the D: partition prior to booting Windows.

I am thankful,


Thu May 29, 2014 23:32
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Detect unformatted NTFS partition so that I may mkfs.ntfs
Hi,

Quote:
How may I be sure that the D: partition is actually NTFS and not raw

Assuming you want to do the check on Linux, you first have to determine which partition is (or will be) the D:, I have no recipe for that.

Then, you can check whether the bytes 3 to 10 of the partition contain "NTFS " (four spaces after "NTFS"), for instance check the output of
Code:
head -c 11 /dev/sdb3 | tail -c 8

This will provide some hint, but will not tell whether the partition is correctly formatted and usable. With ntfsfix, you can check whether the partition is mountable :
Code:
if ntfsfix -n /dev/sdb3; then echo ok; else echo bad; fi

Regards

Jean-Pierre


Fri May 30, 2014 08:45
Profile

Joined: Mon Jan 18, 2010 16:38
Posts: 30
Post Re: Detect unformatted NTFS partition so that I may mkfs.ntfs
Greetings Jean-Pierre,

Excellent, looks exactly like I needed.

Yes, the partitioning is consistent and standardized. First partition on the drive is C:, second is D:, Linux maintenance partition is behind Windows.

I am thankful,

_________________
--
Michael Lueck
Lueck Data Systems


Fri May 30, 2014 12:47
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.