sdi2hd and partition size

D

Darren

I currently use sdi2hd to load images onto target
device. When I create the virutal drive, it can't be
larger than the capacity of a cd. When the image is
complete, and the embedded OS boots, the root partition
size is 650MB. Is there a way to expand it to the entire
size of the hd while loading the image rather than using
something like partition magic after the image has
completely loaded?

Thanks,
Darren
 
A

Anil Ingle

Search this list for a Subject "Question about deploying with SDI"
-Anil [MS] This posting is provided AS IS. It implies no warranties &
confers no rights.
 
D

Darren

Thanks for your reply. I'm not sure if your are telling
me there is a thread on this topic, or if you are
suggesting a possible search. I searched based on the
subject suggested and found nothing related to this
topic. As a matter of fact, I searched on this topic
before posting my original thread. Do you have any other
suggestions?
-Darren
-----Original Message-----
Search this list for a Subject "Question about deploying with SDI"
-Anil [MS] This posting is provided AS IS. It implies no warranties &
confers no rights.

Darren said:
I currently use sdi2hd to load images onto target
device. When I create the virutal drive, it can't be
larger than the capacity of a cd. When the image is
complete, and the embedded OS boots, the root partition
size is 650MB. Is there a way to expand it to the entire
size of the hd while loading the image rather than using
something like partition magic after the image has
completely loaded?

Thanks,
Darren


.
 
A

Anil Ingle

Here is what was posted on the other thread. Does it help?
To add to this,

Doing this would render 39.5+ GB of disk space inaccessible.
Then you would need to increase size of FAT file system in FAT boot sector
table filed BPB_TotSec32 at offset 20h.

So you would need to do:
1. Run FBA on partition >5GB of size.
2. Copy post FBA files to partition of 350MB.
3. use sdimgr to copy PART blob in SDI file.
4. find FAT boot table pos 20h and change this DWORD to reflect maximum
accessible sector count available to FS. (40000000/512=78000)

After this you can use your image with full disk size.
Step 1 is probably required to avoid license check violation caused by
improper partition size



Regards,
Slobodan

Anil Ingle said:
Ted, SDI cannot do this in its current form. In addition to Slobodan's
suggestion below, you can try the following. It should work (I havent
played with SDI in a while so can't say for sure).
1. Instead of creating a "DISK", create a PART blob (ie. a copy of the
350MB partition) into the SDI file.
2. Create a partition > 350MB (for example a single partition of 40GB).
3. Use SDIMGR to Copy the 350MB PART blob onto your 40GB partition.
This "should" work.
-Anil [MS] This posting is provided AS IS. It provides no warranties and
confers no rights.


Slobodan Brcin said:
I have searched for this option and wasn't able to find it (it is not there
or I haven't searched good enough).

There are few problems with this to work.
SDI PART is byte copy of disk partition on disk you can have garbage not
just zeroes on unused space. SDI doesn't care nor it should care, since you
can have different file system.

I'm using SDI file created from RAM partition from other SDI file, and of
course FAT otherwise this procedure it won't work. So when you open new RAM
disk it is zero empty, and you copy files to it, there is no fragmentation,
and data is compact. then I use this RAM partition to create new SDI file
that is compacted. Zeroes from last data to the end of file.
Then I use my utility that store this as raw data to USB flash. And then use
custom boot loader to load this to memory for ram boot.

In most part this is not applicable to you, but you can use it with
modification to create compact SDI file, that will have zeroes at the end.
and then make simple app that will trim zeroes from end, and change size of
DISK BLOB accordingly. This will work for FAT, but not for NTFS, that has
signatures at the end.



Instead of this, you should consider creating XPE partition that is 300-400
mb, and data partition using diskpart, than will be used for pagefile, data,
etc.


Best regards,
Slobodan



Ted Lee said:
Hi folks.

how can I make SDI image assign the HDD size fully without making real size
SDI image?

for example,
run-time image size: 350MB
HDD size: 40GB

With this situation, I make SDI image size 400MB and copy the run-time to
it.
so, my SDI image's size is just 400MB (very portable with CDR)
after deploying this image via SDI2HD or SDIMGR, my HDD has only 420MB
partition and large unallocated area. doesn't it?

Can't the large unallocated area be allocated without making real size SDI
image?
in this case, 40GB SDI image!
I know Symantec Norton Ghost image can do it.
but the license is the problem.

I have read huge amount of articles on this NG.
but, I can't find any clue.
anybody to help me? my OEM wants it eagerly.

--
Ted Lee [Dr.Packet]
DST Corporation (http://www.dstcorp.co.kr, http://www.dst-asia.com)
Windows Embedded Community in Asia [WECOM Asia]
http://www.wecomasia.com
Windows Embedded Community in Korea [WECOM Korea]
http://wecom.dstcorp.co.kr



-Anil [MS] This posting is provided AS IS. It implies no warranties and
confers no rights
Darren said:
Thanks for your reply. I'm not sure if your are telling
me there is a thread on this topic, or if you are
suggesting a possible search. I searched based on the
subject suggested and found nothing related to this
topic. As a matter of fact, I searched on this topic
before posting my original thread. Do you have any other
suggestions?
-Darren
-----Original Message-----
Search this list for a Subject "Question about deploying with SDI"
-Anil [MS] This posting is provided AS IS. It implies no warranties &
confers no rights.

Darren said:
I currently use sdi2hd to load images onto target
device. When I create the virutal drive, it can't be
larger than the capacity of a cd. When the image is
complete, and the embedded OS boots, the root partition
size is 650MB. Is there a way to expand it to the entire
size of the hd while loading the image rather than using
something like partition magic after the image has
completely loaded?

Thanks,
Darren


.
 
S

Slobodan Brcin

Hi Daren,

If you are creating DISK blob you can't use this procedure.
Also if you need to use this partition for boot you will have problems.

I can give you one ad-hock solution that should work for DISK blob.

If you have one partition on disk or second is unformatted.

1. Defrag (compact) partition so data come at start of partition
2. Copy RAW disk data starting with MBR to file (size must be enough to
include all used data on disk)
3. Use SDIMgr to import this file as DISK blob.

You now have SDI image that is small and poses all info required for boot
when you copy it to target disk.

Step 2 you can accomplish in two different ways.
1.
- use sdimgr export feature to export DISK blob data to file.
- trim file size to appropriate
- use step 3

2. Write your utility for extracting data from HDD to file.
- Use CreateFile("\\\\.\\PHYSICALDRIVE0", ..... to open disk for read and
then read data with ReadFile, and write in file with WriteFile.

This is easy and it will automate process of making image, also you won't
have to copy tens of gigabytes trough phases, but only first few hundred of
megabytes.



Regards,
Slobodan


Anil Ingle said:
Here is what was posted on the other thread. Does it help?
To add to this,

Doing this would render 39.5+ GB of disk space inaccessible.
Then you would need to increase size of FAT file system in FAT boot sector
table filed BPB_TotSec32 at offset 20h.

So you would need to do:
1. Run FBA on partition >5GB of size.
2. Copy post FBA files to partition of 350MB.
3. use sdimgr to copy PART blob in SDI file.
4. find FAT boot table pos 20h and change this DWORD to reflect maximum
accessible sector count available to FS. (40000000/512=78000)

After this you can use your image with full disk size.
Step 1 is probably required to avoid license check violation caused by
improper partition size



Regards,
Slobodan

Anil Ingle said:
Ted, SDI cannot do this in its current form. In addition to Slobodan's
suggestion below, you can try the following. It should work (I havent
played with SDI in a while so can't say for sure).
1. Instead of creating a "DISK", create a PART blob (ie. a copy of the
350MB partition) into the SDI file.
2. Create a partition > 350MB (for example a single partition of 40GB).
3. Use SDIMGR to Copy the 350MB PART blob onto your 40GB partition.
This "should" work.
-Anil [MS] This posting is provided AS IS. It provides no warranties and
confers no rights.


Slobodan Brcin said:
I have searched for this option and wasn't able to find it (it is not there
or I haven't searched good enough).

There are few problems with this to work.
SDI PART is byte copy of disk partition on disk you can have garbage not
just zeroes on unused space. SDI doesn't care nor it should care,
since
you
can have different file system.

I'm using SDI file created from RAM partition from other SDI file, and of
course FAT otherwise this procedure it won't work. So when you open
new
RAM
disk it is zero empty, and you copy files to it, there is no fragmentation,
and data is compact. then I use this RAM partition to create new SDI file
that is compacted. Zeroes from last data to the end of file.
Then I use my utility that store this as raw data to USB flash. And
then
use
custom boot loader to load this to memory for ram boot.

In most part this is not applicable to you, but you can use it with
modification to create compact SDI file, that will have zeroes at the end.
and then make simple app that will trim zeroes from end, and change si
ze
of
DISK BLOB accordingly. This will work for FAT, but not for NTFS, that has
signatures at the end.



Instead of this, you should consider creating XPE partition that is 300-400
mb, and data partition using diskpart, than will be used for pagefile, data,
etc.


Best regards,
Slobodan



Hi folks.

how can I make SDI image assign the HDD size fully without making real
size
SDI image?

for example,
run-time image size: 350MB
HDD size: 40GB

With this situation, I make SDI image size 400MB and copy the
run-time
to
it.
so, my SDI image's size is just 400MB (very portable with CDR)
after deploying this image via SDI2HD or SDIMGR, my HDD has only 420MB
partition and large unallocated area. doesn't it?

Can't the large unallocated area be allocated without making real
size
SDI
image?
in this case, 40GB SDI image!
I know Symantec Norton Ghost image can do it.
but the license is the problem.

I have read huge amount of articles on this NG.
but, I can't find any clue.
anybody to help me? my OEM wants it eagerly.

--
Ted Lee [Dr.Packet]
DST Corporation (http://www.dstcorp.co.kr, http://www.dst-asia.com)
Windows Embedded Community in Asia [WECOM Asia]
http://www.wecomasia.com
Windows Embedded Community in Korea [WECOM Korea]
http://wecom.dstcorp.co.kr



-Anil [MS] This posting is provided AS IS. It implies no warranties and
confers no rights
Darren said:
Thanks for your reply. I'm not sure if your are telling
me there is a thread on this topic, or if you are
suggesting a possible search. I searched based on the
subject suggested and found nothing related to this
topic. As a matter of fact, I searched on this topic
before posting my original thread. Do you have any other
suggestions?
-Darren
-----Original Message-----
Search this list for a Subject "Question about deploying with SDI"
-Anil [MS] This posting is provided AS IS. It implies no warranties &
confers no rights.

I currently use sdi2hd to load images onto target
device. When I create the virutal drive, it can't be
larger than the capacity of a cd. When the image is
complete, and the embedded OS boots, the root partition
size is 650MB. Is there a way to expand it to the entire
size of the hd while loading the image rather than using
something like partition magic after the image has
completely loaded?

Thanks,
Darren


.
 

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

Top