It seemed simple enough...

G

Guest

Hello XPE Gurus,

I am hoping someone out there can give me some ideas on how to proceed with
what seemed like a simple task. I have an embedded product in the field
which is running from a CF which is VERY difficult to get to physically. It
uses an XPE image with no write filter, and a lot of the CFs are now corrupt.
We now have a new EWF image which has performed much better in testing. I
was tasked with a project to come up with a way to "reflash" the OS if you
will while leaving the card in circuit.

I thought this would be very straightforward since the device has an
available USB port, and the mainboard supports booting from USB. I have the
XP embedded image that needs to go on the CF, and a customized FBA that will
handle all the configuration with no user interaction. So the trick would be
to boot from the USB port using a thumbdrive or even a portable HD, initiate
an NTFS format of the CF already in the system, then copy over the new XPE
folder.

From there I should just be able to tell the user to remove the thumbdrive
and reboot the system and let FBA take care of the rest. Right? WRONG.
After 3 days I still can't get the USB boot of any XPe image. And yes, I
went through the mounds of threads in here where other people had the same
problem. I tried the tips in Sean Limings book, and then the more detailed
set of instructions on his website. I also followed a MS tutorial on this,
but alas I always end up with the dreaded blue screen and the meaningless 7B
error.

No problem. I don't really need to boot XPE anyhow. Why can't I boot
FreeDOS or some such open source OS. Maybe linux? Well, to answer that I
have had no issues booting either from a thumb drive or a USB hard drive once
XPE was out of the picture. No blue screen either thank you very much. But
the issue of formatting an NTFS drive and then copying files to it from DOS
seem to be never ending. Particularly since the goal is to have the whole
thing scripted, i.e. no user interaction.

I don't know a lot about linux but maybe someone out there knows if there is
a good way to do this from a bare bones linux distro? Or maybe there is
some other more clever approach I've overlooked altogether? I guess I am
open to hearing any ideas about why I can't boot my XPe image from the USB
drive as well, since I can use the same image on my internal CF (HD0) with no
issues. As I said though, I've already went through any number of sites
offering help with the 7B issues and haven't made any head way.

Thanks to anyone who might have some suggestions!

Bill
 
B

Ben Voigt [C++ MVP]

No problem. I don't really need to boot XPE anyhow. Why can't I boot
FreeDOS or some such open source OS. Maybe linux? Well, to answer that I
have had no issues booting either from a thumb drive or a USB hard drive
once
XPE was out of the picture. No blue screen either thank you very much.
But
the issue of formatting an NTFS drive and then copying files to it from
DOS
seem to be never ending. Particularly since the goal is to have the whole
thing scripted, i.e. no user interaction.

Don't think in terms of format and copy files, think in terms of clone an
existing disk image. There are plenty of tools for that (PQDI DriveImage,
Symantec Ghost, linux dd command) which run outside Windows.
 
R

Rich Noonan

I don't know a lot about linux but maybe someone out there knows if there is
a good way to do this from a bare bones linux distro? Or maybe there is
some other more clever approach I've overlooked altogether? I guess I am
open to hearing any ideas about why I can't boot my XPe image from the USB
drive as well, since I can use the same image on my internal CF (HD0) with no
issues. As I said though, I've already went through any number of sites
offering help with the 7B issues and haven't made any head way.

For a handy linux distro see http://www.sysresccd.org/Main_Page. Can
be used from CD or USB-DOK. Lots of pre-integrated tools.

We use partimage on that CD as a method of install in some cases.

Since you can't create an NTFS fs from linux, I've also been known to
simply "rm -rf *" the existing filesystem and copy new contents in
with tar. Using the ntfs-3g driver you can r/w on the NTFS
partition. Note, I've not used this process for our production
stuff. Ah, you state the fs may be hosed, so maybe this is a
particuarly bad idea for you. As already mentioned, dd is a way to
image a device to a file and then write that out to a new device.
It's painfully slow out to a flash device, but it will give you a
perfect block level copy that includes MBR, partition table,
filesystem, and contents.

For getting XPe onto a USB-DOK, are you using XPe SP2 w/ FP2007? I'm
not sure it's possible without the USB Boot components which only come
with that release. Try creating a project with only the required
components for your h/w, an appropriate design template, and the USB
Boot component. Use ufdprep to setup the device and filesystem, then
just xcopy the XPe build on (I use "xcopy /E /Q /H /C <src> <dest>").
Note, this process will leave you running FBA on flash which is
potentially a bad idea. I haven't had a problem with it, but I try to
do that once, then image the device, and replicate a post-FBA image if
at all possible. There really should not be anything more to it than
that. If you can get this working and lay down an NTFS fs from
Windows you can just xcopy your new device image from the USB-DOK to
the device storage. As much as I find the linux tools handy, this
would likely be the better method.

-Rich
 
G

Guest

Thanks Rich,
I will spend some time with both the linux distro you mentioned and trying
to narrow down my XPe problems. Just FYI I have been able just yesterday to
get an XPe image to boot from the USB so long as its replicated after FBA has
run. I'm not sure why that is but in all honesty I planned to replicate the
thumbdrive after FBA anyhow so its not a big deal. Thanks for the command
lines for XCOPY as well. You don't by chance no a way to get the standard
format command to run without that prompt about "formatting a hard disk press
Y to continue" do you? Sadly there is no keyboard on the units out in the
field. I suppose I could have the guys out there try and hook one up via a
hub, but its much more attractive to ask them only to insert the memory stick
and reboot the system.
Regards!
Bill
 
J

JS

Try something like:

echo Y|format blah blah blah

another approach is:

format blah blah blah <yes.txt

note: no space between the Y and the vertical bar.
 

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