For the curious, I've added a few screenshots:
In addition to that, you may want:
SHA512 (g4u-2.6-1.fs) = 1164c3b24a95afa3836a0c4317cb3aaa155aa6b6e70bdbb8c6e272dc9edb0c6a6a9d2ca8b6595a6b83db52819e493b2f1eb35bd32df97915ea44487f715058c9 SHA512 (g4u-2.6-2.fs) = d9bdd236ba5ff5ec0bab2d1189ff2195534a6c494c6c340b65d1c84adb3bdb59a9e0ea1e45cc2dfd1420561df62b7ee40fe7bc8531ffd28f2a1b13480b801619 SHA512 (g4u-2.6-3.fs) = 49f64a568d9f219c2785a94277d4c0937671cd9263306e5e596c5f732f6ed2802c8c6152363d484ec3510fbfe5bf37cda5a2ef7850c92c45f96fe072ac06c987 SHA512 (g4u-2.6-4.fs) = a2daff9bb234efdc1eb20047fae3afef29b38b7c4fbfdf8a9d55679a2c64bb1e8c56134394d6d0a869c42f55b1b2b4095432add1d199cc3f75ec480001851240 SHA512 (g4u-2.6.iso) = c885ca25c97631348eb7a69ef1de72933b8c2994174a0f1199a727bbf3cbb33f706f8e5e752af26a12396e1324e4cb182eb29b7104e7359188e2bdefc7162872 SHA512 (g4u-kernel-2.6.gz) = 0df42b1fc269aa4d851a709e3cfd61f3c11bce614d1f2a642d1b3f61d0cad825b8ec9aea2a0ba1d1ee15f60f8f9821895d5e12b999df994c24526cfc7551eef7 SHA512 (g4u-2.6.tgz) = b6791e0d031c39c419049416af498b0bb5eb114c0f3edf8eefa7a9f9e33df67e848aa63d39cc2298bd5cab348f021d76740f0c6e24fd46dcb459e1412acd3554 SHA512 (g4u-2.6.fs.zip) = 843309131b2e7625d2620537c5672a1dbbaf51cc55482464dacc8087b6683ad0860a13fc7a1c7af4413a8bdf1729c861bada33ba4b00146282a5e28d78715fe8 SHA512 (g4u-2.6.iso.zip) = 43d2beb5058b31bc48ffdac41d525a807d0c19fe26ce0dd0fa9a371d609b1f3e78dc74b1797c8f2bf2df4b0bcef798337bca4dd57ee6fac0592c18c2a405cf16
MD5 (g4u-2.6-1.fs) = 3bc7a1e18a769676fe28bddbf330ea11 MD5 (g4u-2.6-2.fs) = 8b55f3fe6a4806c9a65a3d176463e1bc MD5 (g4u-2.6-3.fs) = f4f28bd96364d597daa81ab501806b97 MD5 (g4u-2.6-4.fs) = 49c1a4530c17d6fba281a81548749db9 MD5 (g4u-2.6.iso) = 8d26857a90845ee6964451eca0aaadd3 MD5 (g4u-kernel-2.6.gz) = 8da39f174fc14f43ffe5a0f0c705d848 MD5 (g4u-2.6.tgz) = 0bee3b148566687e74ced0a77536e27d MD5 (g4u-2.6.fs.zip) = a16336c83b281ea31154958c9647a7fd MD5 (g4u-2.6.iso.zip) = de8c890046d62e1112645a5a7c511152
Older versions of g4u are available as well:
4.1 Preparations
There are also similar devices for USB sticks, but you need to grab the g4u.fs from the ISO to put there:
If you're using Microsoft Windows or DOS, use rawrite.exe. There's also a Windows-based program available called rawr32.zip.
If you want to use a different account, you can specify "login@server" for slurpdisk, uploaddisk etc..
4.2 Image creation
If you want to clone your second IDE disk, add it's name on the uploaddisk command line: "uploaddisk your.ftp.server.com filename.gz wd1". Similarly, if you use SCSI instead of IDE disks, use "uploaddisk your.ftp.server.com filename.gz sd0".
If you want to use a different account name than "install", use "account@your.ftp.server.com" for both uploaddisk and slurpdisk.
4.3 Image deployment
If you want to restore to a SCSI disk, add the disk's name to the slurpdisk command line, e.g. "slurpdisk your.ftp.server.com filename.gz sd0".
See above if you want to use an account name other than "install".
4.4 Copying a disk locally
A list of disks as found during system startup can be found using the "disks" command.
4.5 Copying a partition locally
copypart wd0e wd0fA list of disks can be found using the 'disk' command, to list all the partitions on a disk use the 'parts' command. Partitions have the form of "wd0d", "w1e", "sd1f".
Be aware that the partitions to copy should have identical size (down to the sector), else funny things will happen. When copying a 'big' partition into a 'small' one, g4u won't thrash the data behind the 'small' partition, but of course the copy is not complete either. Take special note that that case could happen when you restore a copy made that way, and which went fine when you first copied your small working partition to your big backup partition!
5.1 Supported filesystems
5.2 Supported Operating Systems
By moving the harddisks to a PC, g4u can even be used to deploy operating systems for non-PC based SCSI machines running HP-UX, Irix, Solaris, AIX etc.
5.3 Supported Hardware
If you're unsure if your hardware is supported, simply boot g4u and see if your network card gets listed by "ifconfig -a" and if your disks get listed by the "disks" command. If not, adding relevant parts of "dmesg" output (from g4u; press space bar to scroll down) is required for analysis if you ask for help. See "Reporting problems" for more information.
5.4 A word on disk sizes
If you cannot avoid preparing an image on a big disk that'll get deployed to a small disk later, make sure the "extra" space is not occupied by a active partition or filesystem, else data loss is very likely to occur!
If you intend to deploy a "small" image to a "big" disk, the extra space that's not covered by g4u can be used for creating a partition and a filesystem. You will have to do that on your own, e.g. using your operating systems' post installation steps.
5.5 Changing compression level
# GZIP=1 uploaddisk your.ftp.server.com filename.gzYou can change compression levels between 1 (fast, little compression) and 9 (slow, maximum compression). Of course you can specify all the usual options to uploaddisk.
5.6 List of recognized disks
# disks wd0 at pciide0 channel 0 drive 0:The above example shows a 6GB IDE harddisk.wd0: drive supports 16-sector pio transfers, lba addressing wd0: 6149 MB, 13328 cyl, 15 head, 63 sec, 512 bytes/sect x 12594960 sectors wd0: 32-bit data port wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
5.7 Problems with images at 2GB
So far, whatever FTP server comes with NetBSD, Solaris and Windows 2000 has been used without problems.
5.8 Can you add feature XXX?
After moving to a two-floppy set for g4u, some of these features may be added in the future, while others (X...) are not likely. Stay tuned!
5.9 Problems with network performance
Enforcing 100BaseTX/Full-duplex:
# ifconfig fxp0 media 100BaseTX mediaopt Full-duplex # ifconfig -a fxp0: flags=[...] media: Ethernet 100baseTX full-duplexUsing autonegotiation (default):
# ifconfig fxp0 media auto # ifconfig -a fxp0: flags=[...] media: Ethernet autoselect (100baseTX)
For more information, please see the ifconfig(8) manpage as well as the Auto-Negotiation Valid Configuration Table featuring "Why Can't the Speed and Duplex Be Hardcoded On Only One Link Partner?".
5.10 Reducing the image size
But there is an easy way to circumvent the problem: use the native operating system's understanding (and implementation) of the filesystem, and make sure it prepares empty/unused blocks in a way so they don't contain random garbage data but values which can be compressed easily by g4u, thus resulting in small image sizes.
Effectively, you just fill up the disk's unused blocks with zero-bytes. Open file for writing, stuff in 0-bytes until the disk is full, then close the file and remove it. The result is that all unused blocks were used by the file, and filled with data that g4u can then compress easily. Usually the operating system will just mark the blocks as unused, without changing the actual data content.
Using this technique on a 20GB disk that had 6GB Solaris 8/x86 and the rest Windows 2000 Workstation shrunk the image from ~6GB compressed to ~2GB compressed. You can probably imagine the effect of this on deployment time too. :)
To perform the filling of unused data blocks with zero-bytes, there are several ways, depending on what operating system you use on your computer, and what software you have available:
dd if=/dev/zero of=/0bits bs=20971520 # bs=20m rm /0bits
cd /d c:\ c:\win-preclone.pl c:Click here to download the win-preclone.pl perl script.
5.11 Setting IP-number manually
ifconfig -aYour network device is something like "ex0", "tlp0", etc. (Note that unlike in Linux, NetBSD doesn't call all ethernet cards "eth0"!)
ifconfig xx0 1.2.3.4 netmask 255.255.255.0
route add default 2.3.4.5
5.12 Extracting the g4u kernel
The idea is to extract the kernel from the boot floppy, and hand that to grub (or whatever bootloader you want - maybe use PXE to netboot g4u). Here's how to extract the kernel, named "netbsd":
% ( cat g4u-2.6-1.fs | dd bs=512 skip=16 ; \ ? cat g4u-2.6-2.fs | dd bs=512 skip=16 ; \ ? cat g4u-2.6-3.fs | dd bs=512 skip=16 ; \ ? cat g4u-2.6-4.fs | dd bs=512 skip=16 \ ? ) | tar vxf - -r--r--r-- 1 feyrer netbsd 53948 Nov 3 23:08 boot -rw-rw-r-- 1 feyrer netbsd 1479905 Nov 3 23:08 netbsdNote that the kernel ("netbsd") is actually still compressed, which is fine for the NetBSD bootloader and probably GRUB, but just in case, you may want to uncompress it:
% file netbsd netbsd: gzip compressed data, was "netbsd-INSTALL_G4U", from Unix % mv netbsd netbsd.gz % gunzip netbsd.gz % ls -la netbsd -rw-rw-r-- 1 feyrer wheel 5523084 Dec 7 18:08 netbsd % file netbsd netbsd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
5.13 Netbooting g4u via PXE
A writeup of the necessary steps for g4u is available by Mariusz Zynel.
5.14 What FTP server software to use?
553 Cannot send file larger than 4 gigabytesscroll by, you can assume that that line (and any others with a number at the start) originates from your FTP server, and it is thus not g4u that's buggy but your FTP server software that has a problem.
Some known working FTP server programs are:
5.15 Booting g4u from USB
5.16 Non-standard applications
6.1 Support
There's a "g4u" community at Orkut which I've created as a forum for g4u. As Orkut is too slow these days (Dec 2004), I won't follow discussion on Orkut a lot, and recommend using the above-mentioned mailing lists for getting timely response.
6.2 Reporting problems
Send your bug reports to the g4u-help mailing list.
6.3 Blog
For those interested, there's also a RSS feed for the g4u part available (in addition to the full RSS feed of my NetBSD blog).
To rebuild the images:
% su # mkdir /usr/cvs # chown $USER /usr/cvs # ln -s cvs/src /usr/src # exit % cd /usr/cvs % env CVS_RSH=ssh cvs -d anoncvs@anoncvs.netbsd.org:/cvsroot co -P -D 20170418 srcNote that newer dates may or may not work, the above date is what the release was built and tested with.
% cd /usr/src % tar plzvxf .../g4u-2.6.tgz
% su - # touch /etc/mk.conf # chown $USER /etc/mk.conf # exit % echo OBJMACHINE=1 >>/etc/mk.conf %
% cd /usr/src % sh g4u-buildDepending on your machine, this will take some time!
% ls -l /usr/cvs/src/distrib/i386/g4u/g4u* -rw-r--r-- 1 feyrer staff 6035496 Apr 20 00:57 g4u-kernel.gz -rw-r--r-- 2 feyrer staff 6567936 Apr 20 00:57 g4u.iso -rw-r--r-- 2 feyrer staff 1474560 Apr 20 00:56 g4u1.fs -rw-r--r-- 2 feyrer staff 1474560 Apr 20 00:56 g4u2.fs -rw-r--r-- 2 feyrer staff 1474560 Apr 20 00:56 g4u3.fs -rw-r--r-- 2 feyrer staff 1474560 Apr 20 00:56 g4u4.fs
I've also put an article about the g4u 2.6 release in my NetBSD blog - have a look! [20170608]
Here's a full list of changes:
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:
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]
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]
g4u is distributed under the standard BSD license:
/* * Copyright (c) 1999-2017 * Hubert Feyrer. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed for g4u by Hubert Feyrer * 4. Neither the name of the author nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */