Solved

Copying images of 1GB CompactFlash device running Redhat 9.0 w/LILO

Posted on 2004-10-21
674 Views
Last Modified: 2012-06-27
Hi all,

I have a need to quickly and easily create images of a 1GB CompactFlash card that contains a Redhat Linux 9.0 operating system with the LILO bootloader.  Once I have a "gold" image, I need to be able to make many copies of it (14 to start) onto other 1GB CF cards (all identical SanDisk Ultra II 1GB cards).

The method I have done to date works, but it is cumbersome.  I have a CF to IDE adapter on my desktop.  I use my Symantec Ghost 8.0 Corp Edition boot floppy to create an image of this device onto another machine over the network.  I then power down, connect another CF device to be copied to, and use Ghost to restore the image.  Ghost 8.0 corrupts the LILO configuration, so then I have to boot up a Redhat 9.0 CD and go through the linux rescue process to run lilo to restore the configuration so it can boot.  

What I would like is this:
1. Eliminate the linux rescue/lilo re-config step
2. A more "portable" solution.  I have a pair of SanDisk SDCFH-1024 PC Cards (PC Card IDE/ATAPI adapters for CF cards).  I'd like to be able to plug these into a laptop and then put in my "gold" CF card and another card and do an image copy right then and there.  I don't care what OS I need to run (Linux, Windows, etc).

The reason I need #1 and #2 is that I have a need to do this while away from the office.

I tried download a copy of Norton Ghost 9.0 (aka 2005) as it was supposed to incorporate features from Powerquest's DriveImage 7.0 that could copy a Linux partition using LILO without corrupting it.  However, when I run Norton Ghost, it doesn't see my CF drives as drives to back up.  The reason for this, I think, is that Windows 2000 sees these as removable devices instead of local disks.  It can back up TO a removable device but not FROM.  So I think I'm going to try to get a refund as this doesn't seem to want to work.

Do any of you have any ideas using my existing hardware?  Feel free to offer other hardware solutions as well.  I have looked into actual CF duplication products, but I'm not ready to fork over $3k just to duplicate these cards.  The volume just isn't high enough to justify the cost.

Thanks!

Jeff
0
Question by:masterbaker
    10 Comments
     
    LVL 3

    Accepted Solution

    by:
    Would it be possible for you to get another CF to IDE adapter? If so, you could grab yourself a copy of the Ulitimate Boot CD http://www.ultimatebootcd.com/ and use the Hard Disk Clonder called g4u I've had great success copying linux IDE drives using g4u, it copies the entire drive including the boot information un-corrupted.

    One other question though, is your LILO installed in the Superblock of the partition or on the MBR?

    -D
    0
     
    LVL 13

    Author Comment

    by:masterbaker
    DABOMB,

    How do you tell where LILO is installed?  I'm not very familiar with LILO.  Normally I use GRUB, which would have made this easier, but the image was created by someone else and we need to keep it as-is.

    As far as the 2nd CF to IDE adapter goes, that would work for my office here, but it won't help my #2 item (which really is the more important part, so I guess I should have made it #1).  

    What I will do is check out that link you sent to see if it recognizes the Sandisk PC cards and lets me image the CF cards with them.

    I'll report back with the results.

    Jeff
    0
     
    LVL 3

    Expert Comment

    by:DABOMB
    That software does have an option to make an image to an ftp server, I dont remember if there is an option for writing it to a temp file on your hdd or not. Of course if you had linux on your laptop you could download g4u and install it on your laptop, ignoring the ultimate boot cd. Then, have an ftp server running locally and image to the ftp (your hdd) and then from the ftp to the next disk, creating a nice temp file... but I guess this is not an "easy" solution.

    -D
    0
     
    LVL 3

    Expert Comment

    by:DABOMB
    Oh and as always, be careful you dont use the CF image and over-write your laptop's internal drive :)

    -D
    0
     
    LVL 13

    Author Comment

    by:masterbaker
    FYI - I tried the Ultimate Boot CD route with g4u but it didn't see the CF cards, just the local HD.  I popped in another HD in my laptop and am installing Fedora Core 2 right now.  It will see those cards as disks (as it already saw them when doing the initial disk setup).  The question is, will g4u see them?  We'll know soon...

    Jeff
    0
     
    LVL 3

    Expert Comment

    by:DABOMB
    This is definately an interesting problem. Are you working with some sort of linux-based embeded devices? like home automation or something?..... Anyway, now you've got me wondering if my firewire-based duplicator board will do this.... *runs off to try*


    Curiosity killed the cat, rat and even donkey! But it will never kill me!

    -D
    0
     
    LVL 13

    Author Comment

    by:masterbaker
    These CF cards are used by an embedded computer running on an ATCA blade using the PMC slot.  This computer is about as big as an AGP graphics card.  The CF is its drive.  This board provides the OS for the ATCA blade through NFS.  This whole setup is used to run our software for demonstrations.  

    The catch is, if you don't shut the system down properly, you could corrupt the OS on the CF card and make it virtually unusable.  While we're out giving demonstrations, we want to be able to restore a clean image on a CF card if it gets corrupted.  We will travel with spares of course, but we don't want to buy tons of these cards just to have spares.  

    I did get Fedora Core 2 loaded up but now it doesn't see the CF cards.  Great!  Now I have to go figure out why not.  By the way, installing g4u wasn't as straightforward as I hoped.  I went ahead and download partimage (I found a link to this earlier today, before I was going to try the Linux route).  Once I can make these drives visible, I can test out partimage.

    I do appreciate your comments.  I think we're getting somewhere.

    Jeff
    0
     
    LVL 3

    Expert Comment

    by:DABOMB
    Just a thought, if you're just going to re-image these cards, cant the image be on a dvd? throw the dvd in with whatever clone software you can get to work and load from there instead of pluggin in a cf, imaging swapping cf imaging again etc...?

    -D
    0
     
    LVL 13

    Author Comment

    by:masterbaker
    I finally got a setup that works.  Woo hoo!  Here's what I ended up doing:

    - Installed Fedora Core 2 on a laptop (Dell Latitude C610 to be exact)
    - Installed all current updates (used 'yum update' command), including latest kernel
    - Plugged in Sandisk PC Card Adapter with my "gold image" CompactFlash card
    - Used the dd command to back the image up to disk (dd if=/dev/hde of=/opt/flash/goldimage.dd)
    - Used the dd command again to backup the MBR (dd if=/dev/hde of=/opt/flash/goldimage-mbr.dd bs=512 count=1)
    - Removed the PC Card Adapter and replaced the "gold image" CF card with one of my new ones (exact same model and size)
    - Used dd to restore the image (dd if=/opt/flash/goldimage.dd of=/dev/hde)
    - Used dd again to restore the MBR (dd if=/opt/flash/goldimage-mbr.dd of=/dev/hde)
    - Removed the PC Card Adapter and removed the CF card (repeat previous two steps as needed)

    I'm not sure yet if I can omit the second dd steps.  I had some initial trouble booting these cards, so I grabbed the MBR from my gold image and slapped it on the cards I already made.  I need to run another test restore without the 2nd dd to see what happens.  It just takes 25 minutes to write a CF with that image (only 10min to back it up) and I want to get out of here.  I'm happy enough with the process now.

    Thanks for your help DABOMB.  Even though I went another route for the solution, I think you deserve some points.  You got me thinking about going the Linux route after I saw that Ultimate Boot CD.

    Jeff
    0
     
    LVL 3

    Expert Comment

    by:DABOMB
    Wow, thanks for the points, and I completely forgot about dd... cpio might have even worked. Glad to be of some assistance :)

    -D
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    If you have a USB Drive that is not recognized by Windows the problem is usually that you have too many network drives or other drives that occupy all the drive letters D: E: or F: which is the normal drive letter of a usb drive. The way to correct …
    How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
    This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
    This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

    856 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now