Hi everyone,
I'm trying to use mkntfs to format a RAID device /dev/md0. I am trying to get mkntfs to skip the first sector of /dev/md0 so that I can put a partition table there, but mkntfs is always starting at sector 0 regardless of what I put for the --partition-start value. I've tried passing in values from 1 to 10 and it always starts at sector 0.
All I want it to do is skip one sector and then lay down the NTFS info.
Has anyone else experienced this problem??
I zero'd out the first few sectors of my disk array:
-----------------------------------------------------------
root@10:/tools> dd if=/dev/zero of=/dev/md0 bs=512 count=100
100+0 records in
100+0 records out
51200 bytes transferred in 0.011349 seconds (4511378 bytes/sec)
Read it back to verify
-----------------------------------------------------------
root@10:/tools> dd if=/dev/md0 of=blk1.blk bs=512 count=1; od blk1.blk
1+0 records in
1+0 records out
512 bytes transferred in 0.018710 seconds (27365 bytes/sec)
0000000 000000 000000 000000 000000 000000 000000 000000 000000
*
0001000
root@10:/tools>
Here's a run of the command with the --debug option turned on:
-----------------------------------------------------------
root@10:/tools> mkntfs --partition-start 10 --sector-size 512 --fast --debug /dev/md0
sector size = 512 bytes
Used BLKBSZSET to set block size to 512 bytes.
BLKGETSIZE64 nr bytes = 288462929920 (0x4329bb0000)
number of sectors = 563404160 (0x2194dd80)
HDIO_GETGEO sectors_per_track = 4 (0x4)
HDIO_GETGEO heads = 2 (0x2)
volume size = 281702079kiB
Cluster size has been automatically set to 4096 bytes.
cluster size = 4096 bytes
number of clusters = 70425519 (0x4329baf)
System page size is 4096 bytes.
mft record size = 1024 bytes
index record size = 4096 bytes
g_lcn_bitmap_byte_size = 8803192, allocated = 8806400
MFT size = 27648 (0x6c00) bytes
mft_bitmap_size = 27, g_mft_bitmap_byte_size = 8
$MFT logical cluster number = 0x4
MFT zone size = 35212756kiB
$MFTMirr logical cluster number = 0x2194dd7
$LogFile logical cluster number = 0x2194dd8
$LogFile (journal) size = 65536kiB
Creating NTFS volume structures.
Creating root directory (mft record 5)
ntfs_resident_attr_value_resize(): Entering for new size 56.
ntfs_attr_record_resize(): Entering for new_size 88.
Creating $MFT (mft record 0)
Creating $MFTMirr (mft record 1)
Creating $LogFile (mft record 2)
Creating $AttrDef (mft record 4)
Creating $Bitmap (mft record 6)
Creating $Boot (mft record 7)
sectors per track = 4 (0x4)
heads = 2 (0x2)
hidden sectors = 10 (0xa)
clusters per mft record = -10 (0xfffffff6)
clusters per index block = 1 (0x1)
Beginning bootsector check...
Calculating bootsector checksum... OK
Checking OEMid... OK
Checking bytes per sector... OK
Checking sectors per cluster... OK
Checking cluster size... OK
Checking reserved fields are zero... OK
Checking clusters per mft record... OK
Checking clusters per index block... OK
Bootsector check completed successfully.
Creating backup boot sector.
Creating $Volume (mft record 3)
Creating $BadClus (mft record 8)
Creating $Secure (mft record 9)
Creating $UpCase (mft record 0xa)
Creating $Extend (mft record 11)
Creating system file (mft record 0xc)
Creating system file (mft record 0xd)
Creating system file (mft record 0xe)
Creating system file (mft record 0xf)
Creating $Quota (mft record 24)
Creating $ObjId (mft record 25)
Creating $Reparse (mft record 26)
Syncing root directory index record.
ntfs_mapping_pairs_decompress(): Entering for attr 0xa0.
Mapping pairs array successfully decompressed:
NTFS-fs DEBUG: Dumping runlist (values in hex):
VCN LCN Run length
0 86537b 1
1 LCN_ENOENT 0 (runlist end)
Syncing $Bitmap.
ntfs_mapping_pairs_decompress(): Entering for attr 0x80.
Mapping pairs array successfully decompressed:
NTFS-fs DEBUG: Dumping runlist (values in hex):
VCN LCN Run length
0 86537d 866
866 LCN_ENOENT 0 (runlist end)
Syncing $MFT.
ntfs_pwrite(): Entering for pos 0x4000, count 0x400.
ntfs_pwrite(): Entering for pos 0x4400, count 0x400.
ntfs_pwrite(): Entering for pos 0x4800, count 0x400.
ntfs_pwrite(): Entering for pos 0x4c00, count 0x400.
ntfs_pwrite(): Entering for pos 0x5000, count 0x400.
ntfs_pwrite(): Entering for pos 0x5400, count 0x400.
ntfs_pwrite(): Entering for pos 0x5800, count 0x400.
ntfs_pwrite(): Entering for pos 0x5c00, count 0x400.
ntfs_pwrite(): Entering for pos 0x6000, count 0x400.
ntfs_pwrite(): Entering for pos 0x6400, count 0x400.
ntfs_pwrite(): Entering for pos 0x6800, count 0x400.
ntfs_pwrite(): Entering for pos 0x6c00, count 0x400.
ntfs_pwrite(): Entering for pos 0x7000, count 0x400.
ntfs_pwrite(): Entering for pos 0x7400, count 0x400.
ntfs_pwrite(): Entering for pos 0x7800, count 0x400.
ntfs_pwrite(): Entering for pos 0x7c00, count 0x400.
ntfs_pwrite(): Entering for pos 0x8000, count 0x400.
ntfs_pwrite(): Entering for pos 0x8400, count 0x400.
ntfs_pwrite(): Entering for pos 0x8800, count 0x400.
ntfs_pwrite(): Entering for pos 0x8c00, count 0x400.
ntfs_pwrite(): Entering for pos 0x9000, count 0x400.
ntfs_pwrite(): Entering for pos 0x9400, count 0x400.
ntfs_pwrite(): Entering for pos 0x9800, count 0x400.
ntfs_pwrite(): Entering for pos 0x9c00, count 0x400.
ntfs_pwrite(): Entering for pos 0xa000, count 0x400.
ntfs_pwrite(): Entering for pos 0xa400, count 0x400.
ntfs_pwrite(): Entering for pos 0xa800, count 0x400.
Updating $MFTMirr.
ntfs_pwrite(): Entering for pos 0x2194dd7000, count 0x400.
ntfs_pwrite(): Entering for pos 0x2194dd7400, count 0x400.
ntfs_pwrite(): Entering for pos 0x2194dd7800, count 0x400.
ntfs_pwrite(): Entering for pos 0x2194dd7c00, count 0x400.
Syncing device.
mkntfs completed successfully. Have a nice day.
The 'Hidden Sectors' value is set correctly. I think that's the number of sectors to skip.
hidden sectors = 10 (0xa)
Now, here's what my sector 0 looks like:
-----------------------------------------------------------
root@10:/tools> dd if=/dev/md0 of=blk1.blk bs=512 count=1; od blk1.blk
1+0 records in
1+0 records out
512 bytes transferred in 0.015100 seconds (33907 bytes/sec)
0000000 055753 047220 043124 020123 020040 000040 004002 000000
0000020 000000 000000 174000 000000 000004 000002 000012 000000
0000040 000000 000000 000200 000200 156577 020624 000000 000000
0000060 000004 000000 000000 000000 046727 001031 000000 000000
0000100 000366 000000 000001 000000 137773 001463 031153 006212
0000120 000000 000000 000000 000000 000000 000000 175000 140063
0000140 150216 000274 175574 140270 107007 143730 052006 000000
0000160 143400 053006 000000 143400 055406 010000 134000 006400
0000200 140216 155453 003750 064000 006400 063150 145402 051520
0000220 051121 063006 052241 063000 003003 000034 031546 063322
0000240 133417 014016 063000 170767 141376 013210 000132 105546
0000260 063320 165301 173420 015066 104000 022426 121400 000130
0000300 014241 025000 055006 040000 003073 000133 001566 055641
0000320 050000 001264 013213 000130 003261 163322 033012 000132
0000340 145213 164606 033212 000045 100262 011715 071130 000452
0000360 052006 101400 053026 000000 003051 000133 005566 160301
0000400 106005 001702 107320 165702 003612 054532 054133 137303
0000420 000531 004353 161676 165401 137003 000471 004750 137000
0000440 000655 001750 175400 177353 036254 072000 132011 135416
0000460 000007 010315 171353 016703 040400 062040 071551 020153
0000500 062562 062141 062440 071162 071157 067440 061543 071165
0000520 062562 027144 005015 024400 040400 065440 071145 062556
0000540 020154 064546 062554 064440 020163 064555 071563 067151
0000560 020147 071146 066557 072040 062550 062040 071551 027153
0000600 005015 022400 040400 065440 071145 062556 020154 064546
0000620 062554 064440 020163 067564 020157 064544 061563 067157
0000640 064564 072547 072557 027163 005015 031400 044400 071556
0000660 071145 020164 020141 074563 072163 066545 062040 071551
0000700 062553 072164 020145 067141 020144 062562 072163 071141
0000720 006564 072012 062550 071440 071571 062564 027155 005015
0000740 013400 056000 052116 042114 020122 071551 061440 066557
0000760 071160 071545 062563 027144 005015 000000 000000 125125
0001000
This should be filled with ZEROS still, right? This data should be located at sector 10, right? Everything before sector 10 should have been left alone, right?
Am I doing something wrong or is this a bug in the tool???
Thanks!
-Russell
|