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)."
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
I'd really like to know what the performance is like. Ghost can be very fast sometimes.
It's too bad that it won't allow you to resize partitions, as you can with Ghost but, it looks like a great start, so long as it isn't too slow.
server.sh: /dev/hda | nc -l -p 5030
/dev/hda
cat
client.sh:
nc server 5030 >
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)
From the article:
This form of the BSD license has a minor problem.
Will I retire or break 10K?
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...
.tar.gz, and takes edits various /etc files to change hostname, IP, etc. Chroot, run lilo, and your done.
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
--
Matt
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. It's so nice to see someone develop an open and free version that recaptures the original idea - just copy the fricken hard disk already!
"How perfectly Goddamn delightful it all is, to be sure" Charles Crumb
Ghost is a trademark of Paramount Pictures
You should do a trademark search at the patent and trademark office before releasing infringing software.
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
...RMS is set to release gnu4u, "GNU's Norton Utilities 4 Unix". Wow...
I've never used g4u personally, but I did some research on disk cloning back awhile ago and a common complaint about the software was that even though it was rock-solid for all kinds of different operating systems, it was really slow. Anyone have any idea how reasonable the speeds are now?
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.
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
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?
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.
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?
Thank you thank you thank you!!! I am just about to install a cluster, so instead of installing RedHat for the nth time, I can make all the nodes' disks off-site -- and probably while unattended somewhat -- and then bring them in, pop in the drives, and go.
To-do List: Receive telemarketing call during a tornado warning. Check.
There is also partition image which is more advanced imo.
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.
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.
I'm waiting for the day when some d00d will run both on the same b0x! Then, he can like, back up his stuff through FTP, FTP it back through localhost, and it will be l33t!
Kind of like a Rube Goldberg contest for doing mundane day-to-day system maintenance tasks!
All you have to do is run 'sysprep' before you make your images. Makes it pretty easy from there.
"In a cat's eye, all things belong to cats."
I've still got several Win98 clients in a lab setting (the main room of my school newspaper, where all editors/writers can use them). I use Ghost to reimage them weekly, and gwalk does a fine job of changing the SID/machine name/whatever it is under Windows.
I'm interested in this, because at the moment, I need to use one of the Windows clients to generate/push images. I'd also like something that could work for MacOS (9.x, unfortunately, since we use Quark).
WMBC freeform/independent online radio.
Just a few days ago,after hours and hours of frustration and failure with Ghost and DeployCenter and other commercial products, I decided to use g4u on my college's CS lab for dual boot (RH80 and W2K). I just popped the floppy in and the image copy was underway. Too bad it corrupted both OS's filesystems. It was so simple and straight-forward I was sure it would work. Is this realease any different from the one available a few days ago? Out of all the other solutions I tried this was the closest to helpful. (Most other FOSS failed to even get DHCP up)
Personally, I agree with UDP multicasting being the way for multiple network-based clones... For only a handful of clones Mondo+Mindi might be an alternative, too... No network, but CD-ROMs over sneakernet though... :)
Okay, here's a few, and there's many more from whence these came:
## W.Finlay McWalter ## http://www.mcwalter.org ##
Kernel panics with "failed to read sector ######" when mirroring a broken hard disk. Any workarounds?
"The lesson to be learned is not to take the comments on slashdot too literally." --Vinnie Falco, BearShare
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.
Did you mean hours?? Or minutes? 8 - 10 hours to copy an image and install it is ridiculous. Norton Ghost takes about 15 minutes each way, a total of 30 minutes on similar hardware. Granted that isn't the sector by sector copy method but why use that if you don't have to? Norton Ghost handles ext2/3 partitions with no problem at all.
Working with HP-UX at work, i got the chance to work with the Ignite backup tool HP provides to backup their machines. /dev/0m and it dumps an image to your DLT tape, you take the tape, put it in the victim machine, boot from it, it puts the image on the new hard drive (assuming there's enough space on it), you boot it again, and you have an identical machine to the one you've taken the image from, kinda neat, but works only for HP machines running HP-UX 10.20 and later.
In a big cluster there is always the need that computers be as identical as possible so troubleshooting problems is easier when they take place on some computers simultanuesly.
you just mk_recovery >
Putting all together, g4u could possibly help deploying that technology to other unices which are non-proprioty.
May the developers continue their good job with their innovatives ideas.
Dan.
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
wd0: (uncorrectable data error)
... /dev/rwd0d: Input/output error
wd0: transfer error, downgrading to PIO mode 4
wd0(pciide0:0:1): using PIO mode 4
wd0d: error reading fsbn 56960 of 56960-57087 (wd0 bn 569760; cn 60 tn 4 sn 8); retrying
dd:
27+0 records in
27+0 records out
28311552 bytes transferred in 41.015 secs (690273 bytes/sec)
226 Transfer complete.
8087791 bytes sent in 00:37 (211.08 KB/s)
221 Goodbye.
rm: not found
#
Any help?
"The lesson to be learned is not to take the comments on slashdot too literally." --Vinnie Falco, BearShare
To clear up any misconceptions that the sarcastic parent comment might have created:
GPL gets around this by asking that you give them the copyright and give them all the credit leaving you with none.
Actually, every author of a GPL program gets credit. The GNU GPL, section 2, requires that "You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change." Thus, the credit stays where it belongs, in the source code, documentation, and (for interactive programs) the about box, rather than in possibly unrelated advertising.
Will I retire or break 10K?
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
Wow, looks like someone put dd on a boot disk! Will the innovation never cease?
Come on, there IS a reason people pay for ghost. I for one, would like some assurance that I can clone disks that aren't exactly identical..
I guess I should really add this next time.
:-)
For now you can do:
dd if=/dev/rwd0d of=/dev/rwd1d bs=1m progress=1
(Yeah, that's Unix! I will give you a shell wrapper in g4u 1.9. Suggestions for a name, anyone?
- Hubert
[A file made of all zeroes] should leave us with very compressible freespace, right?
I suggested a repeating pattern rather than zeroes because some UNIX systems represent an all-zero file cluster by not allocating the cluster at all. A file that contains such a cluster is called a "sparse file".
Will I retire or break 10K?
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
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.
One problem with blindly dding images and compressing them is that "slack space" that previously contained data may be incompressible and will lead to large images unless the data is zeroed out first. The same problem will be seen when imaging swap space.
I wrote a utility for Solaris boxen that uses ufsdump and ufsrestore to do the same (as well as copying the disk layout (format.dat) via the format command). All mounted slices get gzipped and can be stored on NFS-mounted drives. When you restore, you can specify a different disk layout by changing the format.dat file prior to the restore. It takes about a half hour to dump a full solaris install with about a gig of other applications/data on the drive. Total image size is about 1.5 Gig.
I plan on writing a Linux flavor of the same utility, but dealing with icky PC drive formats will be a LOT harder than with SPARC Solaris drives.
Don't anthropomorphize computers, they don't like it.
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
I wonder.. am I the only one who reloaded his page a couple times to see how quickly the visitor number at the bottom increased as a result of the slashdot effect? :-)
Cheers,
Moz.
see a Text Widget
Linux dosn't suport every NIC. Niether dose any OS. However Linux dose prety well.
My idea is to produce a utility like this with all autoloadeble NIC drivers included. Of course it would practicaly be aLinux distribution andwouldneed a CD for those files but so what?
PS: Away to have it produce a floppy with just the right driver once it gets a working combination would be cool.
--= Isn't it surprising how badly I spell ?
A technically better solution is probably to use multicast rsync, either on the raw partition, or on the mounted file system. Using it on a mounted file system has the advantage that it works on live file systems, can deal with different drive geometries, and doesn't waste any time copying free blocks that still contain data.
If you do use "nc", there are two things you should do first: (1) clear out any free data on the source partitions by "cat /dev/zero > junk; rm junk" (this will improve compression), and (2) use gzip, as in "gzip /dev/hda".
This should have been: (2) use gzip, as in "gzip < /dev/hda | nc -l -p 5030" and "nc server 5030 | gunzip > /dev/hda".
Netpipes with tar is OK in a pinch, but for ghosting rsync is probably the better solution all around. With rsync, you can already get a multicast server and don't have to "write your own".
redhat: kickstart.
solaris: jumpstart.
US Citizen living abroad? Register to vote!
It would probably be instructive to try rsync anyway. It dramatically slashes the transfer time even on compressed CDs (e.g. Mandrake Cooker CD's a few subreleases apart).
Setting that aside and turning to multiple clients, having a `what-do-I-need' MD5 broadcasting session followed by a multicast or broadcast of the required blocks (and refrain, in case a client missed anything) would probably save a lot of bandwidth except on initial installs where every answer would be `I need everything'. You could invent a nifty little sparse-blocks reply algorithm that listed ranges in the simple case and bitmaps on messy sections.
Got time? Spend some of it coding or testing
And if not, just run over it with SecureDelete's wipe-the-empty-space utility. If you don't have that to hand, this command will do near enough:
You'll need to run those once on every real partition.
Got time? Spend some of it coding or testing
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.
Try udpcast. It supports multicast and has boot floppies. I use it to replace ghost on a 40 computer lab. Supports stdin and stdout multicast so it's easy to use in many different cases. I'm working on boot disks that only require one disk for each client.
They can use different compression schemes to trade off space vs the size of backups. They already offer gzip and bzip2, I think, so lzop should be easily added - that is very quickly compressible and decompresses obscenely fast, several megabytes per second on a P133.
Ghost for unix? already done.
[alk]
Don't you mean x86 OS independant rather than platform independant? As far as I'm aware it only works on PCs.
Please read a dd(1) manpage somewhere.
rwd0d is the raw device (r) of the first IDE disk (wd0), using a special partition (d) that spans the disk from the very first to the very last byte.
I *think* it's the same as hda under Linux, but I'm not sure there.
- Hubert
I've used Ghost to deploy images to 80 machines simultaneously and it's never had problems, except when the PCs are new and have loose network cards.
Of course, this is over switched 100M ethernet run with Cisco 2924/2950s. YMMV with coax/hubs/whatever.
Hi. I'm a GPL Compliance Engineer for the Free Software Foundation. Part of my job is to find GPL violations and help enforce the GPL.
It looks like the Virgin Webplayer violation is years old and no longer ongoing. So, there's not much that can be done about it now.
It's true that two years ago, we pursued fewer GPL violations than we do now. This was before I started working for the foundation. Now, we pursue every report that we receive. We can't do much on software where we don't hold copyright, but almost all violations include one of gcc, glibc, gzip, or bash. I've solved dozens of violations in the eight or so months I've been working on it, and it's quite rewarding.
Instead of complaining that nobody ever does anything about GPL violations, why not help? Send violation reports to lv@fsf.org, with as much detail as possible.
Become a FSF associate member before the low #s are used