Slashdot Mirror


Ghost for Unix

junyoung writes "Hubert Feyrer released the latest version of g4u ("ghost for unix"), a NetBSD-based bootfloppy/CD-ROM image that allows one to easily clone PC harddisks by using FTP. Since it reads the disk bit by bit, it can create an image of any operating system and any file system. Besides, it's free (under BSD style license)."

38 of 265 comments (clear)

  1. Alternatives by Huff · · Score: 4, Insightful

    When i was reading the article i was thinking 'why do we need another bl**dy disk copier/ghoster/whateverer' But the link states that it can be used with all file systems, which is something i have yet to see in other utilities.

    Good on the chap who wrote it.
    I definantly will be using this in future.

    Huff

    1. Re:Alternatives by alsta · · Score: 3, Insightful

      As previously mentioned, copying bit-by-bit is something Ghost already does. The problem, and ultimately unfeasibility with this utility is that it DOESN'T recognize filesystems and structures.

      That means that you can only restore an image to a disk in equal or larger size than that of the dump. It also means that if you have a larger disk you'll find that you'll end up with unused space or perhaps worse, a boot sector in the wrong place so that you can't even boot your system.

      I do believe that this project has the ability to go further at some point, but right now, I see it as a NetBSD boot floppy with network drivers and a ramdisk which has dd(1).

      --
      Wealth is the product of man's capacity to think. -Ayn Rand
    2. Re:Alternatives by BlueUnderwear · · Score: 3, Informative
      But the link states that it can be used with all file systems, which is something i have yet to see in other utilities.

      Udpcast handles any filesystem just fine. Indeed, it reads directly from the device, and is thus able to handle even filesystems that are not supported by Linux. And in order to handle the case of "almost empty" partition, it supports compressed transfers: the empty, zero-filled sectors compress to almost nothing, and thus don't consume any bandwidth.

      --
      Say no to software patents.
  2. g4u source code mirror by vidnet · · Score: 5, Funny

    server.sh:
    cat /dev/hda | nc -l -p 5030

    client.sh:
    nc server 5030 > /dev/hda

    1. Re:g4u source code mirror by taviso · · Score: 4, Informative

      hes talking about netcat, the general purpose network swiss army knife.

      you should install it, its probably one of the most useful netowrk utilities ever written.

      --
      ex$$
    2. Re:g4u source code mirror by BlueUnderwear · · Score: 4, Interesting
      server.sh:
      cat /dev/hda | nc -l -p 5030

      client.sh:
      nc server 5030 > /dev/hda

      This works fine, as long as you have only one receiver (client). No imagine a school who wants to image a whole classroom of 25 machines at once. Your solution will consume 25 times the bandwidth, because it will open 25 point-to-point links!

      A better solution would be to use udpcast which uses Ethernet's multicast abilities to allow all PC's to be loaded from the same stream of data.

      --
      Say no to software patents.
  3. Re:hmms by Student_Tech · · Score: 5, Informative

    they are using dd as well, just running it through gzip -9 before uploading it to the server (distrib/i386/floppies/ramdisk-g4u/uploaddisk in the source)

  4. Make that "old skool BSD license" by yerricde · · Score: 3, Informative

    From the article:

    3. All advertising materials mentioning features or use of this software must display the following acknowledgement:
    This product includes software developed by Hubert Feyrer .

    This form of the BSD license has a minor problem.

    --
    Will I retire or break 10K?
    1. Re:Make that "old skool BSD license" by Arandir · · Score: 3, Informative

      If those notices are regarding the Regents of tht University of California, then they have already been rescinded.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    2. Re:Make that "old skool BSD license" by clifyt · · Score: 3, Insightful

      Yes, that is a major problem.

      GPL gets around this by asking that you give them the copyright and give them all the credit leaving you with none.

      I **HATE** when someone wants credit for the stuff they've created. The nerve of them. Especially after telling you that you can do anything you want with the software only you better give credit where credit is due.

      I'm glad you cleared this up for us so none of use that restrictive BSD licensed crapware.

      PS. This ain't a troll or funny. Its fucking sarcasm.

      clif

    3. Re:Make that "old skool BSD license" by StormReaver · · Score: 5, Informative

      "GPL gets around this by asking that you give them the copyright and give them all the credit leaving you with none."

      The GPL does nothing of the sort. Nowhere in the GPL is the request made for contributors to sign over their copyrights. Just the opposite is true. Contributors retain copyrights over contributed code that is their own creation. The GPL states that contributors of derivitive code must grant others the full right to copy, modify, and distribute those derivitive contributions. That's it.

      You are probably confusing the GPL with the FSF's advice to assign it the copyright to your GPL'd code that you wish to have legally defended by the FSF (under the assumption that you are not financially able to enforce your copyrights yourself). Nowhere is this a requirement.

      Likewise, there is no provision in the GPL to strip you of credit for contributions you have made. Once again, quite the opposite is true. The GPL goes to great length to make sure you are properly attributed and that recognition for your contributions is not usurped.

      The GPL has been carefully crafted to protect the rights of authors without imposing unnecessary burdens on contributors of derivitive works. The only inconvenience I have ever noticed with the GPL was experienced from a proprietary software perspective. And that was a primary purpose of the GPL: to make life difficult for those who want to steal the works of others, while making life easier for those who want to build upon the works of others and contribute those improvements back to the world.

      The GPL works wonderfully and is a thing of beauty.

  5. Exellent! by muixA · · Score: 4, Insightful

    The thing I dislike the most about Norton Ghost, is hat it's DOS based. Getting networking working, for SMB image transfer is not always easy...

    Cloning PC-Unix boxes (Linux, etc), doesn't really require any special software though... When I need a new node for our EDA cluster, I boot tomsrbt, and run fdisk, and then kick off a script that pulls down an .tar.gz, and takes edits various /etc files to change hostname, IP, etc. Chroot, run lilo, and your done.
    --
    Matt

    1. Re:Exellent! by slaker · · Score: 3, Informative

      It's less of a big deal than it was, with the new version. Ghost 2003 makes several different bootdisks, including a LanMan client (which can be a PITA for modern NIC drivers) and, IIRC, FTP.

      Ghost 2003 also handles local CD-R, USB, USB2 and Firewire disks, and can write an image file to a local NTFS disk, which is a neat trick for a DOS program.

      The bigger challenge with the latest version of ghost is remembering where the hell you put the bootdisk you need, since you can't get all the features on the same disk (e.g. no LanMan client + USB2 support).

      Ghost is what lets me do other things while I'm at work besides fix PCs.

      I license ghost @ something like $11 a copy for all the PCs I'm in charge of, and given the time-savings, it paid for itself in about two weeks.

      Still, this looks really good. I like free. I'll probably give it a try next week.

      --
      -- I wanna decide who lives and who dies - Crow T. Robot, MST3K
  6. Paramount by Trusty+Penfold · · Score: 5, Funny

    Ghost is a trademark of Paramount Pictures

    You should do a trademark search at the patent and trademark office before releasing infringing software.

  7. Only if it's the same size disk by j3110 · · Score: 5, Insightful

    If the target is 1 sector less, you aren't going to be able to use this tool. I still think tar and netpipes is the only way. (unless you use XFS, in such case the best way would be xfsdump, tar, and xfsrestore) I'm trying to write a multicast fileserver for just this purpose. I have a lab of hetrogeneous machines(I take what I can get from the university) that need to be clones(btw, don't forget to run lilo if you use tar/xfs, and don't forget to change the site-key for ssh). I'm ending up using a homebrew solution. There are other good ghost utilities out there that boot from a cdrom(BART perhaps isn't bad), but I still need my own custom solution because I'm not gonna be here forever to make this lab work, and it needs to be "put this in the floppy drive and select options from the menu" easy.

    --
    Karma Clown
    1. Re:Only if it's the same size disk by G27+Radio · · Score: 3, Interesting

      If the target is 1 sector less, you aren't going to be able to use this tool.

      This is true, but if the target is larger you're still OK. I've never used the Unix version, but the DOS version would restore to a larger target with no problem, except that the extra sectors on the target would remain unused. In other words, it's not necessary to have identical drives in both systems. Just make sure that your source image is < or = to the target drive.

  8. In other news... by kenthorvath · · Score: 4, Funny

    ...RMS is set to release gnu4u, "GNU's Norton Utilities 4 Unix". Wow...

    1. Re:In other news... by Graspee_Leemoor · · Score: 5, Funny

      " ...RMS is set to release gnu4u, "GNU's Norton Utilities 4 Unix". Wow..."

      Ugh, RMS in a pink shirt and a smile. Thanks for sticking that image in my brain.

      graspee

  9. Huh? by FreeLinux · · Score: 5, Insightful

    Ghost handles all file systems as well. They call it a sector by sector disk copy. In this case Ghost does not care what is on the disk, it copies the DISK rather than the filesystem or partition as it does by default. But as with g4u you can't resize and so forth with a sector by sector copy.

    The only problem with Ghost is the licensing cost.

  10. Ghost is worth the money by DrZaius · · Score: 5, Informative
    I think it's worth it to pay for enterprise ghost and the win2k box it needs to run on if you really need ghost.

    The multicast console kicks ass -- I can ghost a tonne of workstations at one time and not kill the network.

    Symantecs' support infrastructure is wicked too. We haven't hit a problem that wasn't documented on their website yet.

    Also, ghost understands filesystems and not raw blocks. I don't understand why reading the raw data is an advantage -- you get images the size of your hard disk or partition instead of the size of the data. Ghost 7.5 can understand fat/ntfs/ext2 and ext3. It can also do raw reads of the hard disk.

    btw, I don't work for symantec.

    --
    -- DrZaius - Minister of Sciences and Protector of the Faith
    1. Re:Ghost is worth the money by Ektanoor · · Score: 4, Informative

      Well I once tried ghost and sincerly it was a great product. But since Symantec bought it, I forgot about that thing. Because Symantec wacked it to the impossible. After a few tries I dropped any idea to use the product altogether. And one of the problems was with multicast. It would die after some minutes and leave all stations in a dead end. Besides, on multicast, I couldn't ghost a tonne of workstations. Yes, could ghost a lot more than unicast but not a tonne.Well if Symantec solved these problems, then, I'm happy for them. But it is not good to make much hype of it. Ghost was a great product, probably still is a great product. But it is a product that it is oriented in one of the most critical segments of the market. Hypes here are too bad.

      Yes, it is good that ghost understands filesystems. But it is also good that ghost would work nicely on raw data. Why? For forensics, to copy unmovable data (in relation to the disk itself), to mirror disks where data is partially damaged. At the time I tried, Ghost was "acceptable" on this level but it had some problems.

      Anyway, for those who would like to work nicely without caring for many hassles about how these things work, ghost is probably the best choice.

  11. Low level error correction by yerricde · · Score: 3, Insightful

    isn't there a big chance that some bits would get corrupted?

    Modern storage devices use error correction at a very low level. For instance, CD-ROM has three error-correcting codes: two in the CD layer and one in the sector layer. In addition, a partition could be written to multiple discs in a manner similar to RAID 5, such that every fifth disc stored an xor of the four previous discs.

    --
    Will I retire or break 10K?
  12. Ghost doesn't work with non-PC's... by Anonymous Coward · · Score: 5, Interesting

    Ever try using Ghost on a Sparc station? Ghost can't handle any file systems at all if they aren't sitting on x86 hardware, which is a problem g4u can solve. So that's two problems with Ghost.

  13. Wipe every free block for great compression by yerricde · · Score: 5, Interesting

    I don't understand why reading the raw data is an advantage -- you get images the size of your hard disk or partition instead of the size of the data.

    Shouldn't matter. If you have wiped your drive's free space (trivial; use a program that creates thousands of 1 MB files filled with a repeating pattern) first, an "image the size of the hard disk or partition" will compress much smaller.

    Ghost 7.5 can understand fat/ntfs/ext2 and ext3.

    But does it grok ReiserFS or any of the other more obscure filesystems in use on servers?

    --
    Will I retire or break 10K?
  14. Partition Image by tseng_mike · · Score: 5, Informative

    There is also partition image which is more advanced imo.

  15. Re:Cold feet by FreeLinux · · Score: 3, Insightful

    Try an OS upgrade on >2000 machines and then tell me this. Better yet, try an OS replacement, say Windows 95 to Linux on >50 machines and then tell me you don't see the point of cloning workstations.

  16. Bzzt! Ghost walker works great!! by FreeLinux · · Score: 3, Informative

    I have installed thousands, yes thousands of images of Windows 95 - 2000, as well as restored Windows 2000 domain controllers from backup images with Ghost and Ghost Walker. It works great.

    Thanks for playing.

  17. Re:Cold feet by wfmcwalter · · Score: 5, Insightful
    I'd be interested to see if anyone can justify this, I just don't feel overall comfortable with the concept of UNIX cloning.

    Okay, here's a few, and there's many more from whence these came:

    1. You're the lab manager for a large university. You just bought seven hundred identical PCs. You have one week to install a customised kernel, a variety of applications, and lots of site-specific settings onto each machine.
    2. You're the above lab manager and several hundred of those machines will sit in a public lab with no grown-up to police them. Experience tells you that student pranksters will do stuff to these machines on a pretty regular basis. Each student is supposed to keep all their work (on an ongoing basis) purely on their network-mounted directory. So you want to periodically (ideally nightly) have the machines return to a known software state.
    3. You're the lab manager for the QA department of a large software company. A lot of the tests that the testers perform involve installing new software, performing the necessary patches - these must be performed on machines with exactly the correct software setup, otherwise the test is invalid. Generally, running each test takes less than an hour. You don't want testers sitting waiting for their (rare) test machines to reinstall any longer than absolutely necessary.
    4. You're the production manager for a large PC company. You make production runs of thousands of identical machines each day. Time is short, and the production engineers won't let you specialise a given harddrive on the line until its actually inserted into a machine (very common), so you want to very quickly have production machines netboot and pull down their software image. Every minute a machine spends on the production line cost the company a dollar.
    --
    ## W.Finlay McWalter ## http://www.mcwalter.org ##
  18. Re:This is very nice by tcc · · Score: 5, Interesting

    > Ever since Symantec bought Ghost, they've been changing it from a simple, easy to use, small, beautiful and most of all SMALL utility to a typical bloated pile of junk

    Actually, you could say that about just EVERY product they've bought, EXEPT ghost.

    The executable still fits on a 1.44MB diskette with MSDOS bootable files, and has a LOAD of features for the size.

    I don't care about the TAR or tape driver portion of it, but I sure do care about the splitting, compression, encryption, being able to read the god damn compressed/encrypted/segmented file WITHOUT having to reghost it back to a hard drive in case I need a single file, I love being able to ghost directly to CD-R/RW, DVD-R/RW, to another machine or straight to a win2k server with ghost enterprise) exept that this portion is more or less good because of the fact that you need a dos packet driver and it causes a PITA with modern networking cards. I love the fact that it even worked with my 1.2TB raid (yeah, just for testing :)), it proves that the code base is solid and WORKS, all the features WORKS, they don't have crap like product activation, they aren't being lame about expiry or whatever other PITA software come with. This tool is one of the few that I'd put on EVERY sysadmin desk.

    Okay it's not free, but it sure isn't overpriced compared to office suites or some other software out there that are doing far less and are in no way near as reliable as Ghost is. It pays for itself. Now if you want to compare this with a unix variant, be my guest, I have nothing against competition, but I sure do have something against +4 insightful comments based on something thrown in the air without substancial evidence. This isn't Norton Internet Security or Personnal Firewall that we are talking about (yes they really killed Atguard with this pile of ... ).

    The only thing I'd complain about ghost is that it's still dos based. I'd like to be able to have a hotswap IDE bay and keep my Win2k machine up and plug the drive, ghost it, move the file to my datacenter, and unplug without having to reboot or anything, that would be great, right now I use a testbench for this and it's still good enough for my needs, and saving me a LOT of time.

    --
    --- Metamoderating abusive downgraders since my 300th post.
  19. Partition Image by ZaPhOd42 · · Score: 5, Informative
    Partimage is a similar utility based on Linux.

    We've been using it to clone our NT based workstations at work for some time now and it kicks ass! It copes quite happily with NTFS(!), FAT16/32, Ext2/3, ReiserFS etc etc...

    It's a client/server program and they provide a bootable ISO image on their site (saves you having to create one if you're lazy like me) ;). You can also compress the image taken using either gzip or bzip compression.

  20. Random thoughts. by t0qer · · Score: 5, Interesting

    Just a few random thoughts on this..Sorry moderators if I get too bleeding edge for you :)

    This was listed under developers when it should have been listed under desktop monkeys that run around putting out fires everytime the sales groups comes back with a crateload of laptops that just got smashed through the Chicago Ohara airport baggage system and now he/she has to get these laptops ready for the next trade show kind of person. (zoolander speak, gotta love it)

    I remember doing this a few years back when I worked for Altigen. Well, ok it was transferring over the SCSI bus instead of ethernet... Here's what happened.

    There was some big 'ol trade show in vegas and we were getting chummy with 'ol compaq. They wanted us to be a VAR by adding our telephony system to their servers. So as a show of like, i dunno what to call it, good faith? They shipped us 10 of their top of the line servers all decked out sweet.

    Hmm, what year was that? 2000? Well, win2k was just out and our version of ghost hadn't quite caught up to M$'s new moving target NTFS. (Everytime you install any MS they do little tweaks to the MBR that aren't backwards compatible.) So me and my partner were sitting there scratching our heads. The servers had arrived 1 day before the show (late, fuqin compaq) so our choices were...

    a. stay up all night installing these motherfuckers one by one.
    b. figure it out.

    Well, my partner was totally windows at that time, and I had been using linux for about a year and open source was getting me jazzed. I had a linux system I had scratched together from broken parts in the warehouse running next to my 2k system. So I went around IRC and reading up howto's about DD.

    I made some notes and yanked the IDE drive out of my system, walked over to the compaq's and pulled a drive from each one, then filled one of them with all the drives. I put my linux IDE drive in the system and booted.

    dd if=/dev/hda of=/dev/sda

    It was a suspenseful moment to say the least. We watched as the first image was being made and almost held our breaths in anticipation as we waited for it to boot up.

    Success!

    That night we both went home totally stoked that we got it done without hassle. We just repeated the process for the rest of the machines and we got to go home early. I fucking hate this gay ass penguin OS for a desktop (it really sucks!!!) but i'll take it any day over any commercial product if I need to save my ass.

    Thanks :)

    --toq

  21. Another One by OrangeHairMan · · Score: 3, Informative

    There's a similar project, called RECCD toolkit, but it places the hard drive image onto a CD, rather than over a network. It's great for backup and use in computer labs.

    http://www.bablokb.de/reccd/index.html

  22. Re:Seems like a good idea. by hubertf · · Score: 3, Informative

    1. slow: yes. It reads the whole disk and compresses it, then when it's moved over the net it's decompressed again and written back to disk. Esp. compression is very slow, at deployment the bottle neck is somewhere between disk and network.

    The only way to work around that is to add some intelligence WRT file systems, which is exactly what tools like ghost etc. do. g4u does not do so to remain simple, and be able to clone _any_ operating system or combination of operating systems. See the web page for more background!

    2. bit corruption:
    do you trust your harddisk to give you back the bits you hand it over? I do, and if we can't do that one day, we all have a problem.

    - Hubert

  23. I fail to see anything new here? by bourne · · Score: 3, Informative

    I can see no discernable difference between this and any bootable Linux CD with 'dd', 'gzip', and 'nc' or 'ssh' installed. The reason people buy Ghost is that it resizes partitions, and this doesn't have any of that.

    Am I missing something? Is there something on their page that I didn't see as I read through? Is there a demand for new and unfamiliar commands for doing familiar things?

    This is not a troll - this is honest curiosity. I've used Partition Image, which is similar, and don't use it for pretty much the same reason - nothing added. On the other hand, I've used multiple bootable distributions (linuxcare, superrescue, @stake) to make disk images using dd/gzip/nc/ssh/md5sum. Cake.

    1. Re:I fail to see anything new here? by hubertf · · Score: 3, Insightful

      Of course there is nothing new in g4u, it's just Unix after all.

      But why spend an afternoon surfing the web for alternatives to Ghost, DriveImage and friends when you can rewrite your own version from which you know what it does, and while there get famous on /.?

      - Hubert

      P.S.: Does Ghost etc. support Gigabit Ethernet? USB Ethernet? Token Ring? No? Of course not - have fun finding the necessary DOS drivers.
      See the g4u webpage for reasons why I wrote this. :)

  24. Re:Setting the record straight by clifyt · · Score: 3, Insightful

    That YOU changed. It doesn't stop you from ripping out the copyright notices and claiming that it was written then by you.

    The GPL makes its notice to make YOU sign your name to it if you change anything to ensure that if you screw something up that the original author doesn't get his reputation tarnished because of your modifications.

    So, I decide I want to change a variable name, I'm now considered to be the only one that needs to have my name on the license.

    The GPL is a religion, its not a license. BSD is common sense and is as close to coming to public domain as possible but still ensuring the author gets credit for his work. I wish folks would stop bowing down to the GPL as if it were given to you by God and thus infallible...

  25. Ghost 7.5 experience by ModelX · · Score: 5, Interesting
    Quite recently I used Ghost 7.5 to clone a win2k+rh8 installation to 15 workstations. My experience was the following:

    it can clone win2k partitions without any problems

    it has problems cloning redhat 8.0 ext3 partitions (cloning breaks with a strange error)

    it can clone anything in the sector by sector mode (the images are compressed on the fly)

    it is extremely efficient in multicasting mode - it cloned to 14 machines only slightly slower than to a single machine!!

    a lousy DOS packet driver can cause really strange problems (that's the driver problem, but still it does affect ghost!)


    I see advantages and disadvantages with g4u:

    + you are not tied to a win32 ghost server on the LAN, you merely need a reachable FTP server

    + many many NIC drivers included

    - no multicasting

  26. SystemImager by FredGray · · Score: 4, Interesting

    We have about 50 Debian boxes, all installed with Systemimager. Basically, it uses EtherBoot to load a kernel/initrd over the network, then uses rsync to do most of the heavy lifting. We had to make a few local customizations, but it has worked quite well for us.