Farookh's profilefm noisePhotosBlogListsMore Tools Help
    8/23/2006

    Customizing BartPE for the digital picture frame

    Once I had a barebone BartPE Live CD booting my laptop, the next step was to create a customized version with the photo slideshow viewer, amongst other things.
     
    The digital picture frame I built earlier reads photos off a network share over WiFi.  I first tried to do a similar setup, but couldn't get wireless networking on BartPE to work without manual intervention.  I could boot into BartPE and manually connect to my WiFi network by providing the SSID and WEP key for my network, but couldn't figure out how to supply the SSID and WEP to the WiFi driver so it connects automatically on boot.  Thus, I decided to build a standalone picture frame that reads photos off a compact flash card.  I used a compact flash PCMCIA adapter that I could plug into the laptop's PCMCIA slot.  The standalone picture frame should be easier to use by non-geeks and thus is ideal to gift to someone.
     
    I then hacked together a BartPE plugin for gPhotoShow, my preferred slideshow application for picture frames.  The plugin instructs PE Builder to copy the gPhotoShow screensaver and a .reg file that has the screensaver settings customized to what I need (slideshow interval, path to photos, the transition effect to use, etc.)  BartPE natively doesn't have support for screensavers, i.e. launching them at a set interval of inactivity.  Thus, I used the autorun feature of BartPE to launch the gPhotoShow screensaver on bootup.  Screensaver's (.scr files) can be launched by passing the /s command line param to the .scr file, e.g. "logon.scr /s" will launch the logon screensaver.  The autorun cmd file I wrote for launching gPhotoShow is kinda hacky in that it first imports the .reg file using "regedit /s" and then launches the gPhotoShow screensaver.  A better approach would be to have the required reg settings in the inf file for the gPhotoShow plugin so that PE Builder populates the registry with it, but that was much more work, so I took the easy/hacky route.
     
    The only other configuration I needed to do was to set the right display resolution and bits per pixel for my LCD display (1024x768, 24bpp at 80Hz) in plugins\!custom\custom.inf, before burning a CD.
     
    It takes around a minute to bootup off the noisy and slow CDROM drive that my laptop has, but once booted it is super silent as the CDROM drive winds down and there are no other moving parts (besides the fan which comes on once in a while).  gPhotoShow launches as soon as BartPE boots up and starts displaying photos off the compact flash card.  To add new photos, I just have to pop out the CF card, add the photos and pop it back in.  gPhotoShow patiently waits while displaying the last photo on screen before the card was popped out.  This is perfect, since if gPhotoShow had barfed on a missing drive, I would've had to restart the picture frame each time I added photos to the CF card.
     
    Now all I need to do is encase the guts of the laptop in a good photo frame and make it more robust than my last one, so I can gift it.

    BartPE is cool!

    Creating a BartPE Live CD is easy.  Point the PE Builder application to the Windows installables, select the Plugins you want installed (networking, anti-virus, Remote Desktop, etc.) and click Build.  It picks the minimal set of binaries off the Windows installable and burns a CD (if you choose to do so).  Pop the CD into your PC and boot into BartPE.  It comes with a custom shell called Nu2Shell that lets you launch applications.  You can run all Windows apps as long as the necessary supporting components have been copied over.  For instance, you need to install DirectX support (via a plugin) if your app requires DirectX.
     
    There is a "super"-plugin called Reatogo X-PE that adds support for the Explorer shell, plug-n-play, MMC, WMI, etc.  Once you add X-PE, your experience is like pure Windows with the Explorer bar and Start menu, and you can open MMC applications, plug in devices, etc.  A bare minimum BartPE disk (for Windows XP) was around 158MB and with X-PE (including DirectX, PnP, Help, etc.) was around 260MB.  Even if you aren't making digital picture frames, having a BartPE disk (or USB key-fob[*]) handy would be very prudent.  It is the right tool to have to recover machines infected with spyware or to recover NTFS partitions if your primary disk crashes.
     
    There is a large repository of plugins for Microsoft applications and components (like DirectX and WSH) commercial applications (like anti-virus software) and freeware (like Systernals utilities and Firefox).  One could thus create a disk with just the tools and applications one needs.
     
    BartPE rules!
     
    [*] Tom's Hardware has a writeup on creating a BartPE USB key-fob.
    8/19/2006

    Here I go again...

    Almost a year-and-a-half after building my first digital picture frame, I decided to make one (or two) more of them.  One I will hang either in my study or elsewhere in my house to display portrait images (the previous frame displays landscape-oriented photos) and another I plan to gift to another photography afficionado in my family tree.
     
    Just after I got the previous Tecra 8000 from eBay, I got my hands on another one in what was stated as "non-working condition" from a local source.  This laptop was opened by the previous owner in a haphazard way and he/she had ripped out parts from it. It didn't have a hard disk, memory, CDROM drive or power cable.  It was also missing other parts like the modem, sound card, batteries, etc.  The daughter-board hosting the CPU was without the heatsink and the heat spreader on the chips (CPU and GPU) were ripped out leaving just a bare Intel 266 MHz CPU with some thermal goo on it.
     
    I put it all together and powered it, but as expected it didn't show any signs of starting - no display, no LEDs lighting up, nothing.  I thought it was DOA, but then I put in a stick of memory from my other Tecra, and voila, it booted up.
     
    Since it didn't have an HDD, I decided to try to build a picture frame without using a hard disk.  The previous one I made uses a rather noisy hard disk to boot up Windows, but displays images stored on a network share.  I had the CDROM drive from the previous Tecra which I could use on this one, so booting off CD was the best choice.  Since I assumed I couldn't get Windows to run off a CD, I tried various Linux distros like Damn Small Linux (DSL), Puppy Linux and finally Ubuntu.  All of them let you create a Live CD.  I wanted to create one with Samba and have it map a drive on my network just like my Windows picture frame and render images off there.
     
    Unfortunately, none of the distros I tried supported my graphics card - an old Neomagic.  Thus the best resolution I got was an inadequate 640x480 with low bits per pixel.  I looked around a bit, but couldn't find drivers for my card.  This was around 8 months back and since I didn't have enough spare time to tinker I put this on the back burner.
     
    Then, a couple of days back I decided to give this another shot, this time with Windows, but without a hard disk.  The options I had were to boot from a CD, over the network or from USB.  Since the Tecra doesn't support USB boot and network didn't seem feasible, I looked at other options including an IDE to compact flash adapter (I didn't know these things existed until I saw one at the local Fry's).  This will let me have a CF card act like an IDE hard disk.  The only problem with this was that I would need a 2GB to 4GB CF card to host Windows.  I have a few 1GB cards at home, but those wouldn't be large enough and I wasn't ready to buy a new card.
     
    I then looked at WinPE (Microsoft's Windows Preinstallation Environment) which is supposed to let you boot into a minimal version of Windows to let you bootstrap an installation.  Of course, this isn't free.  I then seem to have hit paydirt with BartPE - a preinstallation environment hacked together by an enterprising person named Bart Lagerweij.  It not only is free, but is customizable via "plugins" (and other means) and many have contributed various plugins including those for TightVNC, IrfanView, etc.
     
    Time to give this a whirl.