Setting up the bootloader on a media
The bootloader of udpcast version uses busybox.
The udpcast boot loader can be started in 5 different ways:
Udpcast also has a boot image generator, which should make it easy to upgrade to new kernels, when new cards, drivers, etc. come out.
The bootloader has a menu system that guides you through the various choices, and finally launches udcpast.
The menu system may be preconfigured (default choices, automatic starting) using a file on the boot media.
Downloadable boot images
The CD image
Burn it on CD as follows:cdrecord dev=1,0,0 speed=4 udpcd.iso
PXE images
Make a /tftpboot/udpcast directory on your TFTP server, and place the following files in there (with the exception of the config file, which goes into a pxelinux.cfg subdirectory).
- Pxelinux.0, the first stage (you can also take it from your local syslinux installation)
- default, the PXE Linux configuration file. Store this into /tftpboot/udpcast/pxelinux.cfg/default. This file may contain, in the kernel's append line, config parameters as described below.
- linux the kernel (6.1.55)
- initrd the ramdisk
Then, add the following to your dhcp.conf:
filename "udpcast/pxelinux.0";
next-server 10.0.0.1;
The menu system
- You start with chosing your language (English, French, German, Danish or Luxembourgish).
- Then you chose your keyboard map (US, Swiss German, Belgian)
- Then the system proposes you one (or more) network modules that matches any PCI network cards that were autodetected. You can either chose that module, or select OTHER, in which case you will get a complete list of supported drivers. If no PCI cards were detected (for instance, because you have only ISA or PCMCIA cards), it skips directly to the complete list.
- Once you've chosen a network module, you may optionnally add parameters (mostly relevant for ISA cards...)
- Then you are asked whether you want to autoconfigure using Bootp/DHCP, or whether you want to manually enter an IP and netmask.
- After having entered the network configuration, you get to chose the port which Udpcast should use. Usually the default choice (9000) is ok. You only need to chose a different port if another application already uses UDP port 9000 or 9001.
- Then you get to chose the hard disk to clone. You may chose whole disks or partitions. You first get proposed a list of autodetected devices, but if you chose OTHER, you can manually enter a different path.
- Then you may enter additional parameters for udpcast. Usually none are needed. Udpcast's command line parameters are described here.
- Then, you get to chose the compression mode: no compression, gzip or lzop. Under normal circumstances, all participating machines should use the same compression mode. Two compressors are available: gzip (better compression ratio), and lzop (faster compression speed). As the whole point of using a compressed transfer is to speed it up, lzop is the recommended compressor (unless you have a processor fast enough that the difference in speed between gzip and lzop doesn't matter).
- Then, you get to chose the mode: receive data or send data. There may only be one sender, but many receivers.
- Finally, if running from USB media, you get the option to save the answers to your questions. If so, then the next time you boot from this media, no questions are asked, and everything happens fully automatically. This configuration is stored in a file named udpcfg.txt. You can copy this file on other floppies, or use it with the -C parameter of makeImage, to include it for the other boot methods (CD or network).
- If you chose to save the config, you get to chose whether you also want to save the send/receive choice. If you do not save that choice, you'll get asked a single question when booting your pre-configured disk: wether to send or to receive. This is useful for having a same preconfigured disk for senders and receivers.
During the whole process alert boxes may pop up. If they are grey, they contain informational messages only, if they are red, they mean an error or abnormal condition.
For expert users, it's possible to press Alt+F2, Alt+F3, Alt+F4 to get a shell.
The CD and netbootable versions are more fully featured, and include a shell with command line completion, a telnet client, wget, tftp, vi, as well as many common shell tools (cp, mv, ...). With these, the udpcast disk may double as a rescue disk.
The following virtual consoles are available:
- Alt+F6 shows you the kernel messages.
- Alt+F7 shows you the stderr of udpcdialog.
- Alt+F1 brings you back to the interactive dialog.
The configuration file
The easyest way to obtain a configuration file is to boot from USB media, save the config when asked for, and then just copy the config file (udpcfg.txt) over to the other media.
However, you can also make it manually.
parameter | explanation |
auto | If this is set to yes, everything happens automatically. The dialog only stops if an error occurs, or if a parameter is missing. If on the other hand auto is set to no, the user is prompted for all choice, but the choice from this file is pre-selected. |
lang | The language. Supported are US (English), DA (Danish), DE (German) and FR (France). |
kbmap | The keyboard map. Supported are US, SG (Swiss German), BE (Belgian), FR (French) and DE (German). Sorry for these "weird" choices, those are just the keyboard types that are popular here in Luxembourg (Luxembourg doesn't have an own mapping...) |
netmodule | The name of the network module chosen. If this is AUTO, use the first autodetected PCI module |
netmodparm | Network module parameters |
dhcp | If yes, configure IP with DHCP. If no, the config file should also contain an ip and netmask parameter |
ip | Ip address of client. Ignored if dhcp is yes |
netmask | Netmask. Ignored if dhcp is yes |
port | TCP port that udpcast should use |
enableDiskmodule | if yes, enable disk module (SCSI or SATA driver), if no disable it. If not set, prompt user |
diskmodule | The name of an optional disk module (for SCSI or SATA). |
diskmodparm | Disk module parameters |
disk | disk to be cloned |
compr | none for no compression, gz for compressed operation using gzip, lzop for compressed operation using lzop |
umode | rcv for receiver, and snd for sender |
udpcparam | any free-form command line parameters for udpcast |
Example:
auto=yes lang=US kbmap=US netmodule=pcnet32 netmodparm= dhcp=yes port=9000 disk=/dev/hda mode=0 udpcparam=
Editing the config file manually allows to do interesting things. For instance, if you just delete the mode parameter, and leave everything else, you get a disk which does everything automatic, except to ask whether to send or receive.
Note: you can also pass the parameters that would normally go into the config file as kernel parameters. This is especially handy in the case of a boot via PXE, where the kernel parameters are in an easily accessible text file.
The config file may be either:
- stored directly on the udpcast USB media:
mcopy udpcfg.txt d:/boot/udpcast/
- or, for other media, included using the --savefile option:
/usr/lib/udpcast/makeImage -k /usr/lib/udpcast/kernel/vmlinuz-6.1.55udpcast -c t.iso --savefile udpcfg.txt
You may of course also use cast-o-matic which does all of this automatically for you.