feyrer.de

g4u - Harddisk Image Cloning for PCs

  • ️Thu Jan 12 2012
2.6 g4u 2.6 was released after a brief testing period. Major changes include:
  • Make this build with NetBSD-current sources as of 2017-04-17 (shortly before netbsd-8 release branch), binaries were cross-compiled from Mac OS X 10.10
  • Many new drivers, bugfixes and improvements from NetBSD-current (see beta1 and beta2 announcements)
  • Go back to keeping the disk image inside the kernel as ramdisk, do not load it as separate module. Less error prone, and allows to boot the g4u (NetBSD) kernel from a single file e.g. via PXE (Testing and documentation updates welcome!)
  • Actually DO provide the g4u (NetBSD) kernel with the embedded g4u disk image from now on, as separate file, g4u-kernel.gz
  • In addition to MD5, add SHA512 checksums
  • Happy 18th Birthday, g4u!

I've also put an article about the g4u 2.6 release in my NetBSD blog - have a look! [20170608] 2.6beta2 was released after snoozing for only four years. See my blog for more information. Happy 18th Birthday, g4u! [20170420] 2.6beta1 was released, see my blog [20131110] 2.5 After an extended time for beta testing, I'm pushing out g4u V2.5 now, with no functional changes between 2.5beta1 and the final release. Of course full release testing was done on the final release. G4u 2.5 is mainly a maintenance release that brings in driver updates from NetBSD, and some minor enhancements like (finally!) enabling command line history.

Here's a full list of changes:

  • New commands "uploadmbr" and "slurpmbr" to backup and restore the master boot record, which includes the partition table. Required to restore a partition to an empty disk.
  • New command "copymbr" to copy the MBR from one disk to another, similar to "copydisk"
  • New command "wipedisk" to write the disk full with 0-bytes once from start (sector 0) to end (last sector)
  • Enable command line history/editing by forcing /bin/sh to be built without -DSMALL (ugly hack... there be lots of dragons!)
  • When setting up a fresh compile tree, g4u patches are now applied automagically without aborting the build
  • Error detection was now enabled in the dd(1) command, which is the core of g4u (surprise!). With that, disks with broken/unreadable sectors should now be copied, skipping the unreadable sectors and copying the rest. This affects a number of programs: copydisk, copypart, uploaddisk, uploadpart. BEWARE: I wasn't able to actually test this as I do not have a disk with bad sectors here. Please report back your experiences!!!
  • Make this build with NetBSD-current sources as of 2012-01-12
  • New drivers added to the kernel:
    • RDC PMX-1000 IDE controllers
    • Intel SCH IDE controllers
    • TOSHIBA PICCOLO controllers
    • Attansic/Atheros L1C/L2C Ethernet
    • Broadcom BCM43xx wireless
    • Agere/LSI ET1310/ET1301 Gigabit Ethernet
    • RDC R6040 10/100 Ethernet
    • USB LCDs and USB-VGA adaptors, e.g.:
    • DisplayLink DL-1x0/1x5
    • Option N.V. Wireless USB WAN modems
    • Microsoft RNDIS specifications USB ethernet
    • Atheros AR9001U USB Wifi
    • Intersil PrismGT USB Wifi
    • Virtio PCI, memory balloon, disk & network devices
    • ... and many more that slipped past QA
  • ... and any driver updates, optimizations and bug fixes and other enhancements from NetBSD-current
[20120613] 2.5beta1 This is a test release to get feedback on a bunch of new features, most importantly master boot record (MBR, includes partition table) backup/restore and being able to handle disks with bad sectors. Also, I finally got around to enable command line editing / history. For more information and download links, see my blog. [20120114] Still 2.4 The netbooting chapter was updated with a more recent link, and some dead links were removed. [20111121] 2.4 was finally released after three years. Major updates include
  • Major new supported device types include bluetooth keyboards and SD/MMC cards - feedback highly appreciated!
  • Lots of new drivers. Too many to list, please see the g4u section of my blog for details.
  • Based on the NetBSD development version from Sep 2009
  • Source builds native and without root privileges on NetBSD 5.0 and crossbuilds also without root privileges from Mac OS X (tested) and probably others (untested; expected: Solaris, Linux).
Also, see my blog. [20091025] 2.4alpha4 was released, see my blog [20090831] 2.4alpha3 was released, see my blog [20081122] 2.4alpha2 was released, see my blog [20080120] 2.4alpha1 was released, see my blog [20070808] 2.3 Final release, no substantial changes from the latest beta. Changes over 2.2 include updated drivers based on the latest development version of NetBSD, a complete overhaul of the build system to remove the 2.88MB size limit, and availability of contracts for technical support. Some links for downloading: Floppies (uncompressed one, two; all floppies ZIP compressed), ISOs (uncompressed, ZIP compressed), source. [20070125] 2.3beta3 Move towards pushing out a release to have the build infrastructure updates available. The kernel got audio and other irrelevant drivers shaved off. Include floppies this time. Some links for downloading: Floppies (uncompressed one, two; all floppies ZIP compressed), ISOs (uncompressed, ZIP compressed), source. [20061228] 2.3alpha6 I've released 2.3alpha6 which mainly contains updated drivers, as reaction to all those new Dell machines etc. people mention on the g4u-help list. If you send bug reports, please DO INCLUDE DMESG OUTPUT, see bugreporting! [20061102] still 2.2 As proposed in my blog, I have enabled Google ads on the front page, to keep you informed. If you come across anything interesting, feel free to inform yourself! :-) For those that don't follow the mailing lists, a bunch of 2.3alpha versions have been put out, it's currently at 2.3alpha5. [20060919] 2.2 Final release, no functional changes over 2.2beta2 (see below), some documentation updates. [20060531] 2.2beta2 Preparing a new major release, I'm releasing this beta version for some public testing plus to have the full load of updated drivers available rather sooner than later, as more and more people keep asking. Changes to look forward in g4u 2.2:
  • The build infrastructure was changed: The kernel used is now based on a GENERIC kernel with ramdisk hooks, instead of a customized INSTALL kernel. There's still a ramdisk embedded in the kernel, and that kernel+ramdisk are used to build the ISO and floppy-set. My main motivation for this release is to utilize NetBSD's 'makefs -t cd9660' and bootxx_cd9660 for creating the ISO version, the floppy splits the kernel+ramdisk over (now) three floppies using NetBSD's ustarfs. This approach allows growing the ramdisk with more programs without the 2.88MB limit imposed by harddisk-emulation-booting and mkisofs before, to an (sort of) arbitrary size. Size restrictions right now are the size of the CD and (more likely) the size of the ramdisk that can fit into RAM, see below.
  • Password entry in all scripts is now without echo (added stty(1) to run 'stty -noecho')
  • The G4U kernel is now a real NetBSD "GENERIC" kernel with an embedded ramdisk, with all the devices supported there. The trade-in for the reduced maintenance costs are a minimum of 16MB RAM needed now. Please let me know if this is an issue!
  • Updated hardware support to match NetBSD-current's GENERIC as of 20060406, adding support for Workbit NinjaSCSI-32 (pci); Symbios 53c875 SCSI and newer (pci); Qlogic ESP406/FAS408 SCSI (pcmcia); Cardbus SCSI including AdvanSys 1200[A,B], 9xx[U,UA] SCSI, Adaptec ADP-1480, Workbit NinjaSCSI-32; Intel 82597 10GbE LR NIC (pci); Sun Microelectronics STP2002-STQ (pci); Intel PRO/Wireless 2100 and 2200BG (pci; may not work due to missing firmware); PCnet-PCI Ethernet (pci); ralink wifi (pci); 3com 3cr990 (pci); VIATech VT612X Gigabit Ethernet (pci); Neterion (S2io) Xframe-I 10GbE (pci); BayStack 660 (802.11FH/DS, pcmcia); Cardbus NICs including Atheros 5210/5211/5212 802.11, ADMtek ADM8211 (802.11), 3Com 3C575TX, Intel i8255x, Realtek 8129/8139/8180L (802.11) and DECchip 21143; CDC, Ethernet Networking Control Model and Davicom DM9601 based USB-ethernet adapters; Atmel AT76C50XX based adapters and Ralink Technology RT25x0 802.11a/b/g USB WLAN adapters
  • TODO for 2.2: disable non-working progress bar that appears in copydisk & uploadpart that shouldn't appear (and doesn't in all the other commands).
  • I've added an item "What FTP server software to use?" to the FAQ list.
  • I've added a reference to the g4u blog (or rather, the g4u part of my NetBSD blog :).
2.2beta1 Was never released publically Still 2.1 Added PXE netboot information 2.1 Changes: Added serial drivers (com on isapnp and isa) back for those people that need serial console (a few asked...), added support for IT Express and ATI IXP IDE and Promise SATA150 controllers, many bugfixes and enhancements from NetBSD-current, including EHCI-based USB improvements, and "dmesg" now hints at pressing space/CR to scroll down [20050622] 2.0 Yes, that's 2.0 - really! I got so fed up with the constand lack of space on the g4u floppy version that I finally decided to end the never-ending madness of removing drivers to make it fit. Instead, there are two versions of g4u now: a CDROM-version (can also be used on DVD at no extra costs), and a TWO-floppy-version (consisting of, well, TWO floppies, instead of the one used so far)! When booting the floppy version, it will load the first floppy, then ask for the second one. Press RETURN, and it will load the second floppy. (The splitting onto more than one floppy was made possible by NetBSD's fine infrastructure which is used for g4u, and which allows booting from a multi-volume tar-archive).

The floppy and CDROM version still share the same codebase - there's still a limit of 2.88MB now, but this allows me adding back all the drivers I had to remove in the past:

  • The wscons console driver, which allows using USB keyboards
  • SATA drives (updated)
  • I2O devices
  • CS8900 (ISA) Ethernet
  • Alteon ACEnic gigabit Ethernet
  • PCMCIA and Cardbus drivers for SCSI, IDE and a *lot* of ethernet and wireless network cards.
  • Fiber Channel drivers for your SAN!
  • Hardware RAID drivers: Adaptec AAC family, AMI/LSI Logic MegaRAID, Compaq PCI array controllers, ICP-Vortex GDT and Intel RAID, Mylex DAC960 & DEC SWXCR family and 3ware Escalade RAID controllers. Whee!
  • Wireless LAN cards: Aironet PC4500/PC4800, Atheros 5210/5211/5212, ADMtek ADM8211, Intersil Prism Mini-PCI.
  • Token Ring drivers for both PCMCIA and ISA IBM/3COM TROPIC cards

Besides all these drivers which were previously removed from g4u and now added back, be sure to check out the full list of supported hardware, including more wavelan cards, gigabit ethernet and SATA drives!

Another minor addition made in this release is the 'copypart' program, which can be used to, well, copy single partitions locally. See Copying a partition locally for more information.

So, this all sounds like christmas? That's a bit away, but maybe you want to donate a bit so I can buy myself and my beloved some nice present (and maybe even one that allows me to do a port of g4u to an Apple PowerBook G4? *hint, hint*)? ;)

Those that want to do some good not only to me but to themselves and their beloved too can now aquire an optional commercial license for g4u. g4u will remain free to use for both private and commercial users, but I've received many requests for commercial licenses, and here they are!

Last but not least, I'm fed up with the slowness of Orkut, and using the infrastructure from Source Forge, I've created two mailing lists, one for g4u related announces, and one for general questions on g4u. See the support section for more information.
[20041207]

Still 1.17 Today I had to discover that someone used g4u as a source for g4l, but instead of giving proper credit and respecting the licensing and copyright on g4u, all traces were removed that the core work was done by me. Instead, the author put his name in and his work under a different license. I'm not happy about this, and ask people to discourage such actions as well as to despise the the author of g4l (cowardly calling himself only "nme"). Read more about this in my blog. 1.17 Major bugfix release which intends to address all the flaws in previous releases (see release notes for 1.15 and 1.16)! Besides the Freshmeat g4u page, interested parties can now find a g4u community with forum etc. on Orkut - drop me a mail if you want/need an invitation or have any questions (just as before :)! [20040718] Back to 1.15! There's a critical flaw in slurpdisk and other restore facilities in 1.16, which render g4u 1.16 unusable. The QA team has been fired, and we're back to 1.15. Sorry! :( [20040702] 1.16 OK, let's see if I got things right this time: Fixed copydisk, which I broke while adding the progress bar code. Document default GZIP level when calling uploaddisk and uploadpart with no argument. Shaved more space from the config by going for the generic PCIIDE driver (only; please let me know if this made things a lot slower and if it killed SATA-support esp. if enabling IDE in your BIOS won't help - and send me a SATA-equipped machine to test this in the future! :-), removed 'rnd', gave the kernel a fixed device to start from (the ramdisk), removed COMPAT_*. Replaced console driver - you may need to turn on support for USB keyboards in your BIOS! [20040630] still 1.15 There's a bug in the "copydisk" command of g4u 1.15, please use g4u 1.14 if you need the copydisk command. still 1.15 I have a donations page now! 1.15 Finally: Improved progress report! No more dots, volume transferred and current throughput is printed instead. Other changes: 'help' command to re-print help screen; update help screen a bit and made the prompt look a bit friendlier. Consistent GZIP handling. Building as non-root is now fully working (Thanks NetBSD!). No more Token Ring drivers, sorry, ran into space issues again. Thank for everyone who has donated so far, I'm working on a donations page. FWIW, donations of books from Amazon are welcome as well, see my wishlist: [20040412] 1.14 After some minor *cough* bugs in 1.13, here's 1.14. No more "file system full" etc., no functional changes either. Added a few screenshots to the documentation. Keep the donations coming! :-) [20040218] Still 1.13 Source update! The sources released for 1.13 had a small problem (missing gz_compress, etc. while linking), I've updated the g4u-1.13.tgz source archive. Proper checksums are 2226011164 (CRC, cksum(1)) and fa2e2f00b079be1a9cf1c81d625896b1 (MD5). [20040122] 1.13 13's a bad sign, and version 1.13 means so for g4u. Due to my job situation I'm not sure if I can continue working on g4u in the future. Your donations can motivate to do so - paypal@feyrer.de is waiting for you. Today, g4u is mentioned in in one place with commercial products like PowerQuests's DriveImage and Norton's Ghost. g4u is free software and I hoped upon it's users to support it via donations. If I just got $10 from everyone sending me questions about g4u, that'd be more than enough. Fact is that only 1 person has donated back some money so far. Here's your chance to contribute back to the Open Source community - join in!

Griping aside, V1.13 is a wrapup based on NetBSD-current as of Jan 14th 2004, esp. made after many people hat troubles booting 1.12. New drivers are for Adaptec 29320, 39320 (aic790x) SCSI (ahd), Broadcom 4401 10/100 Ethernet (bge), DECchip 21x4x and clones Ethernet (tlp), Intel 8254x gigabit (wm), Intel IGP01E1000 MII driver (igphy), Intel i31244 and SiI SATALink SATA controllers. See the g4u kernel config file for all the details. Matthias Jordan has also sent me an update of his "nullfile" to v1.02 which I've added to the g4u webpage.

Due to some things growing again, I had to remove all Wireless LAN and most PCI RAID controller drivers. Maybe it's time to start special g4u versions for laptops (with pcmcia, cardbus, usb, wavelan), servers (with raid, ...) in addition to the current version of g4u. Let me know if you're interested! [20040111] 1.13pre2 Prerelease of 1.13 ISO after many people had problems booting the 1.12 ISO. No new features, but two administrative things to note: First, I've lost my job on Jan 1st 2004 due to the Bavarian government killing jobs in academics. That job was the main motivation behind creating g4u, and development of g4u beyond that date is uncertain. I plan to do at least one more release to wrap up things, but that'll need some more time to decide what drivers to include (not). Second, I have created a paypal account paypal@feyrer.de, if you want to donate money, buy me a pizza or coke or just SUPPORT FREE SOFTWARE, do so! (Judging by the feedback I got both in personal mail and in public forums, g4u seems to be a major alternative to some commercial products these days. I'd be happy if the people using it could give some money back to make it possible to continue working on the project! Yes, this is a plea for help!) 1.12 Fix broken dd commmand ("out of memory!"). [20030820] 1.11 New commands "uploadpart" and "slurppart" to save and restore partitions. Partition information is not changed and taken from MBR. Command 'disks' to list disks found, command 'parts' to list (BSD!) partitions on a given disk (wd0, ...). "uploaddisk" now has a default of rwd0d.gz for the imagename, so just "uploaddisk server" should work (just as "slurpdisk server" does already). [20030819] 1.10 Bugfix release: make "GZIP=1 uploaddisk ..." work properly; document how to use a different account than 'install'. Document how to get the image size down by filling unused disk blocks with zero-bytes. [20030603] 1.9 Maintenance update for NetBSD-current as of today; "dmesg" is now page-wise (|more); "disks" lists disks recognized on boot; allow setting GZIP=-1 to get lower compression; increased NMBCLUSTERS for usb2ethernet; Cloning from local disk to local disk with "clonedisk"; Lots of doc updates. [20030522] 1.8 The Pumpkin Release! Sync with NetBSD 1.6. Now includes drivers for USB, RAID cards, Gigabit Ethernet and Token Ring. As a Halloween special, g4u now also comes as ISO image file in addition to a floppy image, so it can be booted from a CD instead of a floppy. Happy Halloween! :) [20021031] 1.7 Update to accomodate latest drivers and kernel features from NetBSD 1.5.2. Fixed download of the .fs files from the web server. Added documentation about disk sizes. [20010919] 1.6 Maintenance release to use latest drivers from NetBSD 1.5.1. Due to increased size, the Token Ring driver was removed, sorry. Greeting message of g4u with instructions was improved a bit. Web site now has a copy of the kernel config, for documentation of supported device drivers. [20010516] 1.5 This release adds support for easy cloning of SCSI disks by giving "sd0" as the third argument to slurpdisk and uploaddisk. Also, support for i386 and i486 CPUs was added. [20010515] 1.4 Maintenance release. [20010306] Played with GIMP to create the Animation next to the TOC. Thanks to the XBill artists for the OS images! Various doc updates. [20010306] Updated the web page a bit to answer various questions on supported filesystems and operating systems I got. Also add TOC. [20010305] 1.3 Another bugfix release. This should get to a working state soon (i.e. now) [20010302] 1.2 Bugfix release, the ramdisk was busted so that many commands just didn't work (ftp, ...) [20010301] 1.1 First public release, updated to NetBSD 1.5 [20010228] 1.0 Internal version based on NetBSD 1.4 that's been in use for two years in internal operation.