FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Thu May 13, 2021 00:56



Post new topic Reply to topic  [ 5 posts ] 
ntfsclone - ERROR: $Bitmap size is smaller than expected 
Author Message

Joined: Mon Jun 13, 2011 20:29
Posts: 3
Post ntfsclone - ERROR: $Bitmap size is smaller than expected
A while back, I used to use "ntfsclone" to keep image backups of Windows partitions, including the one here that now fails:

Code:
sudo /sbin/ntfsclone -o - /dev/sda2 > /dev/null
ntfsclone v2011.4.12 (libntfs-3g)
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 150037331968 bytes (150038 MB)
Current device size: 150037332480 bytes (150038 MB)
Scanning volume ...
100.00 percent completed
Accounting clusters ...
ERROR: $Bitmap size is smaller than expected (4578777 != 4578776)


I have another Windows partion on the same drive that completes successfully. I wonder if anyone has any insights as to what has happened here please? Or yet better, how to repair it because I want to start keeping these images again :-)

The partition that works (sda1) is loaded with Windows XP 64 bit edition
That which fails (sda2) has Vista 64.
The partition has been thoroughly "CHKDSKd" and boots and runs Vista normally.
It will also mount successfully into a VirtualBox VM running WIndows 7.

(Yes, these are old OSs, but I keep them for compatibility checking)

The host OS is Fedora 14, 64 bit.


Mon Jun 13, 2011 21:12
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: ntfsclone - ERROR: $Bitmap size is smaller than expected
Hi,

Quote:
ERROR: $Bitmap size is smaller than expected (4578777 != 4578776)

Strange. The correct size (volumesize/clustersize/8) is 4578776, but your $Bitmap apparently has an extra byte, which you should be able to check by (quote the file name to escape the '$' prefix) :
Code:
ls -l 'mountpoint/$Bitmap'

How did you format your partition initially (or how did you resize it later) ? this looks like a bad rounding up in computing the bitmap size when the count of clusters is a multiple of 8.

This extra byte is unimportant, I will later post a patch to ntfsclone for being tolerant to a single extra byte.

*edit*

Actually it is the opposite. The $Bitmap file is one bit short (designating the backup bootsector, which I forgot in the above computation).

Regards

Jean-Pierre


Mon Jun 13, 2011 21:55
Profile

Joined: Mon Jun 13, 2011 20:29
Posts: 3
Post Re: ntfsclone - ERROR: $Bitmap size is smaller than expected
Jean-Pierre,

I'm afraid I can't remember how I originally created this partition - it must have been maybe four years ago.
But - it has worked for most of that time, though it has been unused for a few months now.

Your suggestion:

Code:
-rwxrwxrwx  1 root root    4578776 Jan 15  2007 $Bitmap


Since you mention the boot sector ...

On this machine, Windows is booted in two stages: the Windows bootloader allows me to select between sda1 (for XP 64) and sda2 (for Vista 64). Linux "grub" is in the MBA which chain loads to the windows bootloader, or to Linux.

Mark


Tue Jun 14, 2011 00:35
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: ntfsclone - ERROR: $Bitmap size is smaller than expected
Hi,

Your configuration is unknown land to me. None of my partitions formatted with Microsoft tools has a number of sectors which is a multiple of 64 plus one, leading to a number of clusters which is a multiple of 8 plus one. I just see that in this situation mkntfs does not account for the last sector in the bitmap, and that chkdsk is happy with it.

Attached is a patch to accept this configuration.

The last sector is reserved for a backup bootsector which can be used to repair a damaged partition. Even when it is not accounted for in the bitmap, ntfsclone makes a copy of it when cloning or when making or restoring an image.

Regards

Jean-Pierre


Attachments:
ntfsclone.c.patch26.gz [363 Bytes]
Downloaded 959 times
Tue Jun 14, 2011 10:36
Profile

Joined: Mon Jun 13, 2011 20:29
Posts: 3
Post Re: ntfsclone - ERROR: $Bitmap size is smaller than expected
Jean-Pierre,

Peculiar configurations are my speciality (!).
I've just tried with your patch and I can report that all seems well.

Thank you very much for the individual care and attention.

Mark.


Tue Jun 14, 2011 22:29
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.