SDI Manager

M

Manoj Alappat

Hello,

I created a disk with size 128mb(FAT) using sdi loader and diskmanager. I
copied only 5 MB of data to the virtual disk. Af ther that i diconnected the
drive and ran "sdimgr /pack <name of sdi file> hoping it will reduce the
size of the sdi file. But the size of the sdi file remains 128mb itself.
MSDN says /pack option will compact the file to get rid of free space. Can
any one help me in this regard?

Thanks,
Manoj Alappat
 
S

Slobodan Brcin \(eMVP\)

Unfortunately you are the only one who can help you with this problem.

sdimgr /pack is used for other purposes it can't compact partition of disk
data (even if they are empty).

Only (nonstandard) solution that I'm using as a work around is:
1. Create virtual disk in file. (during the creation of file you will have
content of whole file(disk) are zeroes)
2. Use diskmanager to partition and format this disk with FAT. (It is
imperative to use FAT, since NTFS has some data sectors on the end of
partition)
3. Do only once copy of files from your HDD partition to this virtual
partition.
4. Use sdimgr to capture image of this disk or partition to SDI file.
5. Now you will have SDI file that have data in your case in first 8-10 MB
and after that you will have only zeroes.
6. Trim file size (after the last non zero sector.)

Now you will have small SDI file that can be used with custom bootloaders
for instance.

Regards,
Slobodan
 
M

Manoj Alappat

Hi Slobodan ,

I appreciate your quick reply.

I have a question. Below is the copy paste from MSDN.

"Microsoft Windows XP Embedded
PACK
This command removes all unused space from the file. If an alignment factor
is specified (>= 1) that is different from the current alignment factor,
this command re-aligns the file.

PACK[:alignment]
Parameters
alignment
Alignment factor multiplied by the block size (4 KB) provides the page
alignment size (0-4294967295).
Remarks
This commands truncates free space from the end of the file."

In that case what does microsoft mean by "This command removes all unused
space from the file"?

Thanks,
Manoj alappat
 
S

Slobodan Brcin \(eMVP\)

It also says:
/pack[:alignment]
Packs the file by removing free space and moves the binary large object
(BLOB) of type BOOT to first BLOB position. Aligns the file to the new
alignment, if specified.



Your disk or partition is contained in BLOB. And BLOB is by default meant
to be used without any interpretation.
pack is used with some type of boot scenarios for BLOB sort and alignment
purposes only, and probably for compacting holes left by usage of delete
command.

Regards,
Slobodan


Manoj Alappat said:
Hi Slobodan ,

I appreciate your quick reply.

I have a question. Below is the copy paste from MSDN.

"Microsoft Windows XP Embedded
PACK
This command removes all unused space from the file. If an alignment factor
is specified (>= 1) that is different from the current alignment factor,
this command re-aligns the file.

PACK[:alignment]
Parameters
alignment
Alignment factor multiplied by the block size (4 KB) provides the page
alignment size (0-4294967295).
Remarks
This commands truncates free space from the end of the file."

In that case what does microsoft mean by "This command removes all unused
space from the file"?

Thanks,
Manoj alappat


Slobodan Brcin (eMVP) said:
Unfortunately you are the only one who can help you with this problem.

sdimgr /pack is used for other purposes it can't compact partition of disk
data (even if they are empty).

Only (nonstandard) solution that I'm using as a work around is:
1. Create virtual disk in file. (during the creation of file you will have
content of whole file(disk) are zeroes)
2. Use diskmanager to partition and format this disk with FAT. (It is
imperative to use FAT, since NTFS has some data sectors on the end of
partition)
3. Do only once copy of files from your HDD partition to this virtual
partition.
4. Use sdimgr to capture image of this disk or partition to SDI file.
5. Now you will have SDI file that have data in your case in first 8-10 MB
and after that you will have only zeroes.
6. Trim file size (after the last non zero sector.)

Now you will have small SDI file that can be used with custom bootloaders
for instance.

Regards,
Slobodan
diskmanager.
I diconnected
the
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top