More than Just Lines on a Map: Best Practices for U.S Bike Routes
Windows Embedded & Optimizing Windows For Car PCs By Silvio Fiorito
1. Windows Embedded & Optimizing Windows for Car PCs MP3Car Meet: August 22, 2009
2. Overview Intro Windows Embedded Using Windows EmbeddedFeatures on XP/Vista/Win7 Tips & Techniques for Testing & Deploying Images Questions
3. Intro Silvio Fioritosilvio.fiorito@granturing.comhttp://blog.granturing.com MP3Car forum member since May 2004 Interests mainly in Windows Embedded, flash/USB booting, OS optimization, & software development Posted EWF, HORM, & MinLogon guides in December 2004 Worked with MP3Car on custom Windows Embedded Project Chapter in Car PC Hacks on “Embedding Windows”
4. Windows Embedded - Background Formerly called XP Embedded Released 2001 Based on XP but with additional embedded features Currently based on XP SP3 “Componentized” version of XP Over 12,000 components Embedded team worked alongside other Microsoft OS & services teams Includes “macro” components (i.e. Internet Explorer) as well as low level components such as drivers Each component has dependencies, defines registry entries, files, settings, etc. Private portal for customers to get component updates, security patches, etc. Available through embedded distributors, MSDNAA, & MSDN Embedded Not yet part of BizSpark, or for hobbyists….I’ve tried!
5. Windows Embedded - Architecture Component Database Runs in most SQL 2005+ databases Can be local or remote Component Database Manager Import new components Component Designer Create new components Target Designer Create images Component Repositories File share which holds the actual binaries Local or remote, but alwaysreferenced by share name Target Device Can be a virtual machine, same dev machine,or typically other physical hardware
6. Windows Embedded – Developing Images Identify target hardware using theTarget Analyzer Probe (TAP) Best to use a WinPE disc Enumerates the base hardwaredevices: CPU Chipset Audio Devices USB, etc. Create a custom component forhardware Have multiple components fordifferent hardware platforms Identify software dependencies What are you planning to run onthe image OS or 3rd-party Beware of 3rd party apps with nodocumentation Think about DLLs, COM objects,WMI, networking
7. Windows Embedded – Developing Images If you have an installer tryunpacking and analyzing installsteps Orca - http://msdn.microsoft.com/en-us/library/aa370557%28VS.85%29.aspx Windows Installer XML (WiX) -http://sourceforge.net/projects/wix/ Find file system changes, registrysettings, etc. Installer is not always enough,what about runtime dependencies Process Monitor - http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx Not always full-proof, it’s an iterative process If all else fails, have setup tool run during device’s first boot process Not “clean”, increases first boot time, potentially more dependencies for install program, leaves temp files
8. Windows Embedded – Custom Components Reusable components with all binaries, settings, and dependencies…just drop into image Loaded into component database, shared with other developers Can be versioned, auto upgrade images Common steps: Bundle files Define registry settings Define dependencies to other embedded components Create settings to be defined at build time Good way to make easy images Think about any activation or licensing issues for your components
10. Windows Embedded – Deployment Build output is a base XP OS, just files xcopy build to target device and boot up First Boot Agent (FBA) Configures hardware devices, loads drivers, executes custom actions FBReseal: sysprep for Embedded Capture image then redeploy to SAME hardware devices Runs through a minimal FBA again
11. Windows Embedded – Pros & Cons Ultimate control over your image From miniscule OS for specialized devices… … to full blown XP with embedded enabling features (EWF, HORM, FBWF, etc.) Highly reliable, high-performance OS when done right However…. Development time can be much higher Lots of dev and testing time for custom components, especially for 3rd-party $995 for tools, $90/device What’s the future of Windows Embedded? Skipped Vista, next version based on Windows 7 Hopefully better dev tools, and easier experiencing customizing images
12. Windows Embedded - Alternatives nLite (for XP): modifies XP installation by removing components from install XP installation uses commands to set registry settings, place files, etc. Can be almost as effective as Windows Embedded, but takes just as much testing time Need to run through a full install every time you update vLite (for Vista): modifies installation image Important difference between XP and Vista installations Vista uses installer images (think OS image) Much easier deployment, can support multiple architectures Great products for hobbyists, free and large community Not for commercial products, potential licensing issues
13. Optimizing Windows UI Hacks for an OEM look Boot.ini: /noguiboot Custom boot logo C:indowsoot.bmp 8-bit 640x480 BMP AND set it as the desktop background! Hide startup and shutdown statusmessages Hide balloon tips Hide desktop icons and taskbar Replace Explorer with custom shell Performance & Reliability Auto restart on BSOD!!! Don’t write full memory dump Disable unnecessary services(i.e. print spooler…) On Vista & Win7: delay load services hybrid sleep Image from Gizmodo http://gizmodo.com/5322825/hey-look-another-blue-screen-of-death
14. Optimizing Windows Enhanced Write Filter (EWF): filters writes to configured volumes In memory or on hidden partition Necessary for certain flash drives (USB or CF) Useful for flash devices with slow write speeds Easy to setup, need to carefully consider what volumes you protect (i.e. don’t write protect your media drive!) File Based Write Filter (FBWF): filters writes to specific paths Again, useful for certain types of flash devices Alternative to EWF, protect all files except your front end config, or media folders Hibernate Once, Resume Many (HORM): works in concert with EWF, create a static hibernation state Set your image up and hibernate From then on, just turn your CarPC off, when you restart it will resume from hibernation Even if you get a BSOD or total power failure, XP won’t know the difference Hybrid sleep on Vista + Win7 MinLogon: bypasses XP logon process and runs OS as local system account Extremely fast boot up process Can introduce compatibility issues
42. Some Tips for Easy Deploying & Testing Get yourself a WinPE disk! Windows Automated Installation Kit: http://technet.microsoft.com/en-us/library/dd349343%28WS.10%29.aspx USB, CD, or HDD Can be used for all Windows OSes ImageX: file-based disk images Used for Vista & Win7 installs Works for XP as well Capture image, deploy to any other disk Use network share or place on large enough USB WinPE drive Typically used along with Sysprep Use virtualization!! Especially useful for Vista & Win7: no hacks to transfer from hardware architectures Use differencing disks to test out new settings Keep master image and update, test, as needed Put it all together: Build your CarPC image in a VM Install front end, software, drivers, etc. Be careful with chipset drivers though… Test your image Capture with WinPE and ImageX Apply image to physical hardware Validate