di-netboot-assistant-0.38a/0000755000000000000000000000000012170210117012536 5ustar di-netboot-assistant-0.38a/.gitattributes0000644000000000000000000000002111515466540015441 0ustar examples/* ident di-netboot-assistant-0.38a/README0000644000000000000000000003315411554151451013436 0ustar Debian-Installer NetBoot Assistant ------------------------------------ Overview: di-netboot-assistant is a tool simplify the preparation of files for TFTP Net Booting: Download and Extract the files in the right location. It also create a "top level" menu, to select among installed netboot images (i386, amd64 and ia64 only). QuickStart: 1. Install the programs "di-netboot-assistant" and a tftp server (like "tftpd-hpa"). if you netboot ia64 clients, also install elilo. if you netboot i386 or amd64 clients, also install syslinux. 2. Run "di-netboot-assistant install lenny" or similar. 3. Configure the DHCP server, as explained in [1]. Also read the "Architectures Notes" below, and see samples [2]. Architectures Notes: * i386 / amd64 DebianInstaller uses Syslinux's PXElinux[3] for BIOS platforms. Syslinux is a boot-loader that provide a menu system to select the kernel you want to boot. di-netboot-assistant creates a "top level" menu, to select among the DebianInstaller netboot menu you previously installed (etch, lenny, testing, daily...). Absolute filenames in PXELinux: Tftp filenames inside PXELinux configuration files (pxelinux.HEAD, "default"...) must be prefixed with "::/" so pxelinux treats them as absolute filenames. In PXELinux, path starting with a slash ("/") are RELATIVE to the folder of pxelinux.0 ! The double column ("::/") forces PXELinux to treat them as absolute. DHCP configuration: Most PC capable of netbooting use DHCP+PXE (as opposed to BOOTP). You can either configure the DHCP to tell the PC to start the "top level" pxelinux menu, or to directly start a given distribution's pxelinux menu. Case 1: Configure dhcp3 for a single distribution's menu. in /etc/dhcp3/dhcpd.conf, add: # Declare pxelinux specific options _names_, at the top of the file. # Those are compulsory (nothing to change). option space pxelinux; option pxelinux.magic code 208 = string; option pxelinux.configfile code 209 = text; option pxelinux.pathprefix code 210 = text; option pxelinux.reboottime code 211 = unsigned integer 32; # Configure PXE options for di-netboot-assistant # This is compulsory (nothing to change). site-option-space "pxelinux"; option pxelinux.magic f1:00:74:7e; if exists dhcp-parameter-request-list { # Always send the PXELINUX options (specified in hexadecimal) option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3); } # Those are compulsory (adjust the values): # Configure *your* TFTP server IP address here. next-server 192.168.0.10; # Provide netboot/pxelinux information, for example: filename "debian-installer/lenny/i386/pxelinux.0"; option pxelinux.configfile "debian-installer/lenny/i386/pxelinux.cfg/default"; Case 2: Configure dhcp3 for "top level" menu. If the package syslinux was installed before you "installed" the netboot image (with "di-netboot-assistant install ..."), then you can use the generated top menu. (The top menu is rebuilt each time you install a boot image) This is identical to the Case #1 above, except the options "filename" and "pxelinux.configfile": filename "debian-installer/pxelinux.0"; option pxelinux.configfile "debian-installer/pxelinux.cfg/default"; * ia64 IA64 uses EFI firmware instead of PC's BIOS. DebianInstaller uses the boot-loader elilo[4] (which supports boot-time menu). Case 1: Configure dhcp3 for a single distribution menu. This is identical to the i386, Case #1 above, except the options "filename" and "pxelinux.configfile" should look like: filename "debian-installer/lenny/ia64/elilo.efi" option pxelinux.configfile "debian-installer/lenny/ia64/elilo.conf" Case 2: Configure dhcp3 for "top level" menu. If the package elilo was installed before you "installed" the netboot image (with "di-netboot-assistant install ..."), then you can use the generated top menu. This is identical to the Case #1 above, except the options "filename" and "pxelinux.configfile" should look like: filename "debian-installer/elilo.efi" option pxelinux.configfile "debian-installer/elilo.conf" * alpha * hppa * sparc Those architectures netboot using BOOTP (some can use RARP or DHCP). They don't have a boot-loader that would present a menu at boot-time. This means that you must configure the dhcp to provide one given kernel. (of course, the DHCP can provide different kernel image, based on the MAC or IP address). In /etc/dhcpd3/dhcpd.conf you can declare a kernel filename for all hosts subnet 192.168.0.0 netmask 255.255.255.0 { filename "debian-installer/stable/sparc/boot.img" } Or You can declare a single host: host myhost1 { hardware ethernet 00:40:63:d8:02:2c; filename "debian-installer/stable/sparc/boot.img" } * arm,armel,armhf, * mips,mipsel Those architectures can do netbooting, but aren't supported by this tool at the moment (because there is no ".tar.gz" archive). * m68k * s390 Those architectures can't do netbooting. MIRRORS The file di-sources.list contains the canonical URLs for repositories of netboot image. You can set the variable MIRROR_REGEXPS to rewrite the URLs to your preferred mirror (you can specify multiple space-separated regexp) For example, you want to search "://ftp.debian.org/" and replace it with "://ftp.fr.debian.org/debian/", then you declare MIRROR_REGEXPS="s=://ftp.debian.org/=://ftp.fr.debian.org/debian/=" in /etc/di-netboot-assistant/di-netboot-assistant.conf TFTP SERVER (daemon) Any tftp server should work. However the packages tftpd-hpa and atftpd are convenient, as they use /var/lib/tftpboot by default. For other tftp servers, you will have to adjust TFTP_ROOT= in /etc/di-netboot-assistant/di-netboot-assistant.conf (There's also a "Using dnsmasq" section below). DHCP SERVER There are two typical scenarios: +--------+ ___ | Switch | +-------------------+ __/ \__ +--------+ | This host | / \ +--------------+ | | | | is the only | ( Internet )---| (DSL) Modem +----+ | +----| DHCP server | \__ __/ | or router | | +-------------------+ \___/ +--------------+ | +-------------------+ +----| A client computer | +-------------------+ First case: This host is already the DHCP server for the local network. This is the best and recommended configuration. You simply have to add some options to enable netbooting (typically, the "filename" to boot, and the tftp server's address). read [1] and example [2] and architectures specific notes. +--------+ ___ | Switch | __/ \__ +---------------+ +--------+ / \ | (DSL) Modem | | | | +-------------------+ ( Internet )---| with +----+ | +----| This host | \__ __/ | build-in DHCP | | +-------------------+ \___/ +---------------+ | +-------------------+ +----| A client computer | +-------------------+ Second case: A DHCP already exists, but you can't/don't want to use it for netbooting. This isn't the recommended configuration, but it was successfully tested for netbooting PXE clients (i386, amd64 and ia64) on network where the existing DHCP server didn't provide netboot informations. !!!! Do not setup rogue dhcp servers in your company !!!! In this situation, you have to divide your DHCP subnet in two ranges of IP address. The first range will still be served by the existing DHCP server. The second part will be served by "this host". It will only reply to DHCP request sent during PXE netboot step. This is possible because client computers (actually, their PXE agent in the NIC's ROM) sends an option like this during PXE boot: vendor-class-id= "PXEClient:Arch:00000:UNDI:002001" Both dhcpd and dnsmasq can be instructed to provide answer depending on such strings. Note: For easy _home_ setup, you can choose not to reduce the range of IP served by the existing DHCP server, and just declare a *small* range of addresses on *both* DHCP (some addresses that are unlikely to be used on the first one) That's ugly, but it can work ! (as long your existing DHCP don't allocate some of those IP ;-) Using dnsmasq dnsmasq is a simple all-in-one (dns, dhcp and tftp) server. QuickStart : Install the package dnsmasq apt-get install dnsmasq Create tftp directory (YMMV) mkdir /var/lib/tftpboot Configure /etc/dnsmasq.conf: #Simple/Tiny example: #Enable built-in tftp server enable-tftp tftp-root=/var/lib/tftpboot dhcp-range=vendor:PXEClient,192.168.0.81,192.168.0.91 #Force the address of the router (or DSL modem) #dhcp-option=option:router,192.168.0.1 dhcp-option-force=208,f1:00:74:7e #PXE signature dhcp-boot=debian-installer/pxelinux.0 dhcp-option-force=209,debian-installer/pxelinux.cfg/default Install the netboot images di-netboot-assistant install lenny RUNNING AS NON-ROOT It is possible to run di-netboot-assistant as non root. There is actually two ways to acheive that: * Delegate to a group (that manage the system wide netboot images) In this case, we want to delegate the management of netboot files to one or more people that don't have access to root account. Create a group and add those user to the group addgroup dina-admin adduser johndoe dina-admin Purge the package (and existing files that are owned by root !). # Note : you will loose existing configuration file! apt-get purge di-netboot-assistant Allow that group to modify the files # note: the four lines below are on single command. for dir in /var/cache/di-netboot-assistant \ /var/lib/di-netboot-assistant \ /var/lib/tftpboot/; do dpkg-statoverride --update --add root dina-admin 2775 $dir done # add the following line in di-netboot-assistant.conf, so # so new file are writable by other members of the group. umask 0002 # Do not grant write permission on di-netboot-assistant.conf to # anybody but root. This would lead to privilege escalation since # the configuration file are executed (sourced) by the script. Reinstall the package apt-get install di-netboot-assistant * Per-user tftpboot It is possible to have per user configuration files and repositories. The user just have to create a configuration file in ~/.di-netboot-assistant/di-netboot-assistant.conf and configure it. A sample file is provided in /usr/share/doc/di-netboot-assistant/examples/peruser.di-netboot-assistant.conf * Sudo Do *NOT* use di-netboot-assistant with sudo. Allowing sudo execution of di-netboot-assistant allows one to become root (because the sudoer can edit ~/.di-netboot-assistant/*) Testing: Qemu (and kvm) can a emulate tftp server, to it's easy to test netboot: cd /var/lib/tftpboot qemu -boot n -tftp . -bootp /debian-installer/pxelinux.0 TODO: - support non pxelinux platforms (yaboot powerpc, mips sb1-bcm91250a/sb1a-bcm91480b) - Default to 64bits on amd64 platform (syslinux DEFAULT64, bug 485656) - Use vesamenu rather than menu (for Lenny+1 images). See also: http://wiki.debian.org/DebianInstaller/NetbootAssistant and http://www.debian.org/releases/stable/debian-installer/ ---------------------------------------------------------------------- [1] "Installation Guide", especially the sections "4.6 Preparing Files for TFTP Net Booting" and "5.1.5 Booting with TFTP" http://www.debian.org/releases/stable/installmanual [2] Sample dhcp configuration files are located in: /usr/share/doc/di-netboot-assistant/examples/dhcpd.conf.simple /usr/share/doc/di-netboot-assistant/examples/dhcpd.conf.multiarch /usr/share/doc/di-netboot-assistant/examples/dnsmasq.conf.multiarch [3] PXElinux homepage. http://syslinux.zytor.com/wiki/index.php/PXELINUX [4] Elilo bootloader http://elilo.sourceforge.net/ [ ] Preboot Execution Environment (PXE) Specification http://www.intel.com/design/archives/wfm/downloads/pxespec.htm [ ] Extensible Firmware Interface (EFI) http://developer.intel.com/technology/efi/index.htm -- Franklin PIAT di-netboot-assistant-0.38a/examples/0000755000000000000000000000000011515466540014373 5ustar di-netboot-assistant-0.38a/examples/dnsmasq.conf.multiarch0000644000000000000000000000220011515466540020671 0ustar #Enable built-in tftp server enable-tftp tftp-root=/var/lib/tftpboot #Force the address of the router (or DSL modem) #dhcp-option=option:router,192.168.0.1 # This host is the only DHCP server (normal situation). #dhcp-range=192.168.0.81,192.168.0.91 # Second case : There is already a DHCP server on the LAN # we want to **take-over** some computers. dhcp-range=vendor:PXEClient,192.168.0.81,192.168.0.91 #or# dhcp-host=vendor:PXEClient,00:1a:6b:38:52:e4 #dhcp-authoritative dhcp-vendorclass=sun,SUNW. dhcp-vendorclass=pxe,PXEClient dhcp-vendorclass=x86,PXEClient:Arch:00000 dhcp-vendorclass=ia64,PXEClient:Arch:00002 #PXELinux' common options dhcp-option-force=208,f1:00:74:7e #PXE signature #PXELinux on x86 arthitectures (both 32 and 64bits, i.e. i386 and amd64) dhcp-boot=net:x86,debian-installer/pxelinux.0 dhcp-option-force=net:x86,209,::debian-installer/pxelinux.cfg/default #PXELinux on ia64 (i.e Itaniums architecture/processors) dhcp-boot=net:ia64,debian-installer/etch/ia64/elilo.efi dhcp-option-force=net:ia64,209,debian-installer/etch/ia64/elilo.conf log-dhcp #Sun netboot dhcp-boot=net:sun,debian-installer/stable/sparc/boot.img di-netboot-assistant-0.38a/examples/dhcpd.conf.upstream0000644000000000000000000000672511515466540020175 0ustar # # Sample configuration file for ISC dhcpd for Debian # # $Id: 05c9c2dce50f043eae9d8c6529b62004c1fa3ff1 $ # # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages ('none', since DHCP v2 didn't # have support for DDNS.) ddns-update-style none; # option definitions common to all supported networks... option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. #subnet 10.152.187.0 netmask 255.255.255.0 { #} # This is a very basic subnet declaration. #subnet 10.254.239.0 netmask 255.255.255.224 { # range 10.254.239.10 10.254.239.20; # option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; #} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. #subnet 10.254.239.32 netmask 255.255.255.224 { # range dynamic-bootp 10.254.239.40 10.254.239.60; # option broadcast-address 10.254.239.31; # option routers rtr-239-32-1.example.org; #} # A slightly different configuration for an internal subnet. #subnet 10.5.5.0 netmask 255.255.255.224 { # range 10.5.5.26 10.5.5.30; # option domain-name-servers ns1.internal.example.org; # option domain-name "internal.example.org"; # option routers 10.5.5.1; # option broadcast-address 10.5.5.31; # default-lease-time 600; # max-lease-time 7200; #} # Hosts which require special configuration options can be listed in # host statements. If no address is specified, the address will be # allocated dynamically (if possible), but the host-specific information # will still come from the host declaration. #host passacaglia { # hardware ethernet 0:0:c0:5d:bd:95; # filename "vmunix.passacaglia"; # server-name "toccata.fugue.com"; #} # Fixed IP addresses can also be specified for hosts. These addresses # should not also be listed as being available for dynamic assignment. # Hosts for which fixed IP addresses have been specified can boot using # BOOTP or DHCP. Hosts for which no fixed address is specified can only # be booted with DHCP, unless there is an address range on the subnet # to which a BOOTP client is connected which has the dynamic-bootp flag # set. #host fantasia { # hardware ethernet 08:00:07:26:c0:a5; # fixed-address fantasia.fugue.com; #} # You can declare a class of clients and then do address allocation # based on that. The example below shows a case where all clients # in a certain class get addresses on the 10.17.224/24 subnet, and all # other clients get addresses on the 10.0.29/24 subnet. #class "foo" { # match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; #} #shared-network 224-29 { # subnet 10.17.224.0 netmask 255.255.255.0 { # option routers rtr-224.example.org; # } # subnet 10.0.29.0 netmask 255.255.255.0 { # option routers rtr-29.example.org; # } # pool { # allow members of "foo"; # range 10.17.224.10 10.17.224.250; # } # pool { # deny members of "foo"; # range 10.0.29.10 10.0.29.230; # } #} di-netboot-assistant-0.38a/examples/dhcpd.conf.simple0000644000000000000000000001147511515466540017624 0ustar # # Sample configuration file for ISC dhcpd for Debian # with simple netbooting example, for di-netboot-assistant # # $Id: 6f304819153d2720edfbffc5efc25cc456002608 $ # # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages ('none', since DHCP v2 didn't # have support for DDNS.) ddns-update-style none; # option definitions common to all supported networks... option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # Declare pxelinux specific options _names_ (before we use them). option space pxelinux; option pxelinux.magic code 208 = string; # = 0xd0 option pxelinux.configfile code 209 = text; # = 0xd1 option pxelinux.pathprefix code 210 = text; # = 0xd2 option pxelinux.reboottime code 211 = unsigned integer 32; # = 0xd3 # (see syslinux's /usr/share/doc/syslinux/pxelinux.txt.gz) ## The tftpd server IP address, for all clients. #next-server <<>>; next-server 192.168.0.10; # Default netboot filename. # note: start for i386 or amd64 filename "debian-installer/pxelinux.0"; site-option-space "pxelinux"; option pxelinux.magic f1:00:74:7e; if exists dhcp-parameter-request-list { # Always send the PXELINUX options (specified in hexadecimal) option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3); } option pxelinux.configfile "::debian-installer/pxelinux.cfg/default"; # note: end for i386 or amd64 #Alternatively, for ia64, use a line like this: #filename "debian-installer/elilo.efi" #Alternatively, for sparc (hppa and alpha), use a line like: #filename "debian-installer/lenny/sparc/boot.img" subnet 192.168.0.0 netmask 255.255.255.0 { # Adjust your modem/router's IP address here. option routers 192.168.0.1; range 192.168.0.81 192.168.0.91 } # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. #subnet 10.152.187.0 netmask 255.255.255.0 { #} # This is a very basic subnet declaration. #subnet 10.254.239.0 netmask 255.255.255.224 { # range 10.254.239.10 10.254.239.20; # option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; #} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. #subnet 10.254.239.32 netmask 255.255.255.224 { # range dynamic-bootp 10.254.239.40 10.254.239.60; # option broadcast-address 10.254.239.31; # option routers rtr-239-32-1.example.org; #} # A slightly different configuration for an internal subnet. #subnet 10.5.5.0 netmask 255.255.255.224 { # range 10.5.5.26 10.5.5.30; # option domain-name-servers ns1.internal.example.org; # option domain-name "internal.example.org"; # option routers 10.5.5.1; # option broadcast-address 10.5.5.31; # default-lease-time 600; # max-lease-time 7200; #} # Hosts which require special configuration options can be listed in # host statements. If no address is specified, the address will be # allocated dynamically (if possible), but the host-specific information # will still come from the host declaration. #host passacaglia { # hardware ethernet 0:0:c0:5d:bd:95; # filename "vmunix.passacaglia"; # server-name "toccata.fugue.com"; #} # Fixed IP addresses can also be specified for hosts. These addresses # should not also be listed as being available for dynamic assignment. # Hosts for which fixed IP addresses have been specified can boot using # BOOTP or DHCP. Hosts for which no fixed address is specified can only # be booted with DHCP, unless there is an address range on the subnet # to which a BOOTP client is connected which has the dynamic-bootp flag # set. #host fantasia { # hardware ethernet 08:00:07:26:c0:a5; # fixed-address fantasia.fugue.com; #} # You can declare a class of clients and then do address allocation # based on that. The example below shows a case where all clients # in a certain class get addresses on the 10.17.224/24 subnet, and all # other clients get addresses on the 10.0.29/24 subnet. #class "foo" { # match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; #} #shared-network 224-29 { # subnet 10.17.224.0 netmask 255.255.255.0 { # option routers rtr-224.example.org; # } # subnet 10.0.29.0 netmask 255.255.255.0 { # option routers rtr-29.example.org; # } # pool { # allow members of "foo"; # range 10.17.224.10 10.17.224.250; # } # pool { # deny members of "foo"; # range 10.0.29.10 10.0.29.230; # } #} di-netboot-assistant-0.38a/examples/peruser.di-netboot-assistant.conf0000644000000000000000000000120111515466540022773 0ustar # Sample per-user configuration file for di-netboot-assistant to # be copied in ~/.di-netboot-assistant/di-netboot-assistant.conf # # Read the README file for more information. # Let's import the system-wide di-netboot-assistant.conf to use it as # default values. You can comment this out, if you want. . /etc/di-netboot-assistant/di-netboot-assistant.conf TFTP_ROOT=~/.di-netboot-assistant/tftpboot DL_CACHE=~/.di-netboot-assistant/cache STATUS_LIB=~/.di-netboot-assistant/lib #TEMPLATES=~/di-netboot-assistant #reminder: you must create those directory yourself. #DISOURCELIST=~/.di-netboot-assistant/di-sources.list # vim: set ft=sh di-netboot-assistant-0.38a/examples/dhcpd.conf.multiarch0000644000000000000000000001530411515466540020316 0ustar # # Sample configuration file for ISC dhcpd for Debian # with multi-architecture netbooting, for di-netboot-assistant # # $Id: 9e46dddfe05b126e2aec35b6c66d2a641ce94a01 $ # # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages ('none', since DHCP v2 didn't # have support for DDNS.) ddns-update-style none; # option definitions common to all supported networks... option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # ### Some options for Network boot (PXE) ### # Declare pxelinux specific options _names_ (before we use them). option space pxelinux; option pxelinux.magic code 208 = string; # = 0xd0 option pxelinux.configfile code 209 = text; # = 0xd1 option pxelinux.pathprefix code 210 = text; # = 0xd2 option pxelinux.reboottime code 211 = unsigned integer 32; # = 0xd3 # (see syslinux's /usr/share/doc/syslinux/pxelinux.txt.gz) ## The tftpd server IP address, for all clients. #next-server <<>>; next-server 192.168.0.11; # Default netboot filename for (bootp, and other non-PXE clients) filename "enter-your-default-di-netboot-imagename-here" class "pxeclient" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; ## Only PXE clients, will get those options ## (when they are _actually_ net-booting from their PXE agent). site-option-space "pxelinux"; option pxelinux.magic f1:00:74:7e; #option pxelinux.reboottime 0; ## x86 (i386, amd64, x86_64, IA32) architectures. if substring (option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000" { #filename "debian-installer/etch/i386/pxelinux.0"; #option pxelinux.configfile "debian-installer/etch/i386/pxelinux.cfg/default"; ## If you want to use the meta menu : filename "debian-installer/pxelinux.0"; option pxelinux.configfile "::debian-installer/pxelinux.cfg/default"; #or# option pxelinux.configfile "::debian-installer/pxelinux.cfg/default.serial-9600"; } ## IA64 (Itanium) if substring (option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002" { #filename "debian-installer/etch/ia64/elilo.efi"; #option pxelinux.configfile "debian-installer/etch/ia64/elilo.conf"; ## If you want to use the overview menu : filename "debian-installer/elilo.efi"; option pxelinux.configfile "debian-installer/elilo.conf"; } if exists dhcp-parameter-request-list { # We Always send the PXELINUX options (values are in hexadecimal: 0xd0=208) option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3); } } class "sun" { match if substring (option vendor-class-identifier, 0, 5) = "SUNW."; # Needs improvements: some Sun have x86 CPUs !! # uname -i : "SUNW.SPARCstation", "SUNW.Ultra", "SUNW.Sun-Blade", "SUNW.Sun-Fire"... # Replace "stable" with the actual boot image you want to boot. filename "debian-installer/stable/sparc/boot.img"; } subnet 192.168.0.0 netmask 255.255.255.0 { # Adjust your modem/router's IP address here. option routers 192.168.0.1; range 192.168.0.81 192.168.0.91 # If your dhcp server isn't configured with fixed IP address, # use this hack (replace with the DHCP server's MAC adress): #host mydhcpserver { # hardware ethernet 00:15:58:01:23:45; # fixed-address 192.168.0.10; #} } # The "deny unknown-clients;", the "host" declaration and "authoritative" # allow to have two dhcp server runing side by side (one for PXE agent # booting, and one for Debian/Linux boot) #deny unknown-clients; #group { # # a group for some hppa systems # filename "debian-installer/stable/hppa/boot.img"; # # host myhost1 { hardware ethernet 00:40:63:d8:02:2c; } # host myhost2 { hardware ethernet 00:40:63:d8:2c:02; } #} } # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. #subnet 10.152.187.0 netmask 255.255.255.0 { #} # This is a very basic subnet declaration. #subnet 10.254.239.0 netmask 255.255.255.224 { # range 10.254.239.10 10.254.239.20; # option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; #} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. #subnet 10.254.239.32 netmask 255.255.255.224 { # range dynamic-bootp 10.254.239.40 10.254.239.60; # option broadcast-address 10.254.239.31; # option routers rtr-239-32-1.example.org; #} # A slightly different configuration for an internal subnet. #subnet 10.5.5.0 netmask 255.255.255.224 { # range 10.5.5.26 10.5.5.30; # option domain-name-servers ns1.internal.example.org; # option domain-name "internal.example.org"; # option routers 10.5.5.1; # option broadcast-address 10.5.5.31; # default-lease-time 600; # max-lease-time 7200; #} # Hosts which require special configuration options can be listed in # host statements. If no address is specified, the address will be # allocated dynamically (if possible), but the host-specific information # will still come from the host declaration. #host passacaglia { # hardware ethernet 0:0:c0:5d:bd:95; # filename "vmunix.passacaglia"; # server-name "toccata.fugue.com"; #} # Fixed IP addresses can also be specified for hosts. These addresses # should not also be listed as being available for dynamic assignment. # Hosts for which fixed IP addresses have been specified can boot using # BOOTP or DHCP. Hosts for which no fixed address is specified can only # be booted with DHCP, unless there is an address range on the subnet # to which a BOOTP client is connected which has the dynamic-bootp flag # set. #host fantasia { # hardware ethernet 08:00:07:26:c0:a5; # fixed-address fantasia.fugue.com; #} # You can declare a class of clients and then do address allocation # based on that. The example below shows a case where all clients # in a certain class get addresses on the 10.17.224/24 subnet, and all # other clients get addresses on the 10.0.29/24 subnet. #class "foo" { # match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; #} #shared-network 224-29 { # subnet 10.17.224.0 netmask 255.255.255.0 { # option routers rtr-224.example.org; # } # subnet 10.0.29.0 netmask 255.255.255.0 { # option routers rtr-29.example.org; # } # pool { # allow members of "foo"; # range 10.17.224.10 10.17.224.250; # } # pool { # deny members of "foo"; # range 10.0.29.10 10.0.29.230; # } #} di-netboot-assistant-0.38a/disources.vim0000644000000000000000000000306111554151451015265 0ustar " Vim syntax file " Language: Debian di-netboot-assistant's di-sources.list " Maintainer: Frank Lin PIAT " Last Change: 2008/11/15 " URL: http://wiki.debian.org/DebianInstaller/NetbootAssistant " $Revision: 1.1 $ " this is a very simple syntax file, based on Matthijs Mohlmann's debsources.vim " Standard syntax initialization if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " case sensitive syn case match " Architectures that support netbooting "syn match diSourcesArchs /\(alpha\|amd64\|arm\|armel\|armhf\|hppa\|i386\|ia64\|lpia\|mips\|mipsel\|powerpc\|sparc\)/ syn match diSourcesArchs /\(alpha\|amd64\|hppa\|i386\|ia64\|sparc\(32\|64\)\)/ " Architectures that don't support netbooting, and other forbiden characters syn match diSourcesNoNetbootarch /\(m68k\|s390\)/ " Match comments syn match diSourcesComment /#.*/ " Match uri's syn match diSourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ syn match diSourcesDistrKeyword +\([[:alnum:]_./]*\)\(sarge\|etch\|lenny\|squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|daily\|sid\|experimental\|dapper\|hardy\|karmic\|lucid\|maverick\|natty\)\([-[:alnum:]_./]*\)+ " Associate our matches and regions with pretty colours hi def link diSourcesArchs Statement hi def link diSourcesNoNetbootarch Error hi def link diSourcesDistrKeyword Type hi def link diSourcesComment Comment hi def link diSourcesUri Constant let b:current_syntax = "disources" " vim: ts=8 di-netboot-assistant-0.38a/di-netboot-assistant0000755000000000000000000012055212170210117016544 0ustar #!/bin/bash # A simple tool to grab and extract debian-installer netboot images. # # Copyright (C) 2008 Frank Lin PIAT # latest version is available from: # http://wiki.debian.org/DebianInstaller/NetbootAssistant # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St - Suite 330, Boston, MA 02110, USA. # ------------------ Declare the constants ------------------- # TRUE="true" FALSE= #false# PACKAGE_NAME=di-netboot-assistant PACKAGE_VERSION=0.37 # -------------- Initialize the global variables ------------- # OFFLINE=$FALSE DEBUG=$FALSE DISOURCELIST=/etc/di-netboot-assistant/di-sources.list SYSLINUX=/usr/lib/syslinux/ ELILO=/usr/lib/elilo/ DL_CACHE=/var/cache/di-netboot-assistant STATUS_LIB=/var/lib/di-netboot-assistant TEMPLATES=/etc/di-netboot-assistant TFTP_ROOT=/var/lib/tftpboot REPO_ALIAS="" REWRITEPKGPATH='\(debian\|ubuntu\)-installer' EXTRA_DL_FILES="MD5SUMS" DI_ARGS= TARGET_ARGS= ARCH= DEFAULT_ARCH="" #MIRROR_REGEXPS=# Not defined on purpose, so user can pass the variable umask $(umask | sed -e 's/.$/2/') # files must be public. if [ -f "$HOME/.di-netboot-assistant/di-netboot-assistant.conf" ]; then . "$HOME/.di-netboot-assistant/di-netboot-assistant.conf" else if [ -f "/etc/di-netboot-assistant/di-netboot-assistant.conf" ]; then . "/etc/di-netboot-assistant/di-netboot-assistant.conf" fi fi VERBOSE=$FALSE WGET_VERBOSITY="--quiet" CURL_VERBOSITY="--silent" RM_VERBOSITY= MV_VERBOSITY= CP_VERBOSITY= TAR_VERBOSITY= # ------------------- Declare the functions ------------------ # # ------------------------------------------------------------ # # usage() # Print script usage help. # Parameters: release # Returns: (EXIT STATUS) 0=Success # ------------------------------------------------------------ # usage() { cat </dev/null 2>&1; then dpkg --print-architecture elif which rpm >/dev/null 2>&1; then s=$(rpm --eval "%{_arch}") s=$(tr -d " " < /usr/lib/rpm/rpmrc | grep "^buildarchtranslate:$a:") s=$(echo $s|cut -d: -f3) s=$(echo $s | sed -e 's/^x86_64$/amd64/' -e 's/^sparc[0-9]*$/sparc/' -e 's/ppc[0-9]*$/powerpc/' -e 's/^armv[3456]*$/armel/' -e 's/^armv7hl$/armhf/' -e 's/^m68kmint$/m68k/') echo $s else echo "i386" fi } # ------------------------------------------------------------ # # check_di_source_list() # Check the validity of di-source.list # Parameters: release # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # check_di_source_list() { local valid_regex='^(#.*|[[:blank:]]*|[[:alnum:]_\\.-]+[ ][[:alnum:]_\\.-]+[ ][^ ]+([ ][^" ]+)+)$' if [ ! -f "$DISOURCELIST" ]; then echo "E: Debian Installer source file missing ($DISOURCELIST)" 1>&2 return 1 fi if grep -qvEl "$valid_regex" "$DISOURCELIST" ; then echo -n "E: Syntax error lines #" 1>&2 grep -vnE "$valid_regex" "$DISOURCELIST" \ | cut -d ":" -f 1 | tr "\n" "," 1>&2 echo " in file '$DISOURCELIST'." 1>&2 return 1 fi } # ------------------------------------------------------------ # # list_declared_arch_for_repo() # List archs declared for the repository in di-sources.list # Parameters: repository # Returns: (STRING) List of architectures # ------------------------------------------------------------ # list_declared_arch_for_repo() { local release=$1 echo -n "I: Declared architecures for $1 are: " 1>&2 get_declared_arch_for_repo "$release" | tr '\n' ' ' 1>&2 echo "" 1>&2 } # ------------------------------------------------------------ # # get_declared_arch_for_repo() # List archs declared for the repository in di-sources.list # Parameters: repository # Returns: (STRING) List of architectures # ------------------------------------------------------------ # get_declared_arch_for_repo() { local release=$1 if [ "$1" ]; then grep -E "^$release\>" "$DISOURCELIST" | cut -f 2 | sort -u fi echo -n "" } # ------------------------------------------------------------ # # print_do_not_edit_header() # Print a "Do no edit this file" warning # Parameters: templatename # Returns: (STRING) file header comment # ------------------------------------------------------------ # print_do_not_edit_header() { local templatename=$1 # Template filename echo "##" echo "## DO NOT EDIT THIS FILE" echo "##" echo "## It is automatically generated by $PACKAGE_NAME using templates" echo "## from $templatename " echo "##" } # ------------------------------------------------------------ # # find_file() # Return the name of the first file matching criteria. # Parameters: dir name # Returns: (STRING) file # ------------------------------------------------------------ # find_file() { if [ "$1" -a "$2" ]; then find "$2" -type f -name $1 | head -n 1 else echo "" fi } # ------------------------------------------------------------ # # version_lte() # Compare two "software" version (like 1.2.1 and 1.3) # Parameters: V1 V2 # Returns: (EXIT STATUS) 0=v1 <= v2, 1= V1 > V2 # ------------------------------------------------------------ # version_lte() { if which dpkg > /dev/null 2>&1; then dpkg --compare-versions "$1" "<=" "$2" return $? else printf "$1\n$2\n" | sort -V | head -n 1 | grep -q "^$1\$" return $? fi } # ------------------------------------------------------------ # # copy_syslinux_bin() # Install pxelinux binaries in the target folder. # Parameters: src dst # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # copy_syslinux_bin() { local src=$1 # Source directory local dst=$2 # Target directory local c32_dir=$dst/pxelinux.cfg local f srcf oldbin newbin pxe_new_ver pxe_cur_ver [ ! "$src" -o ! "$dst" ] && return 1 newbin=$(find_file pxelinux.0 "$src" 2>/dev/null) [ ! -f "$dst/pxelinux.0" -a ! -f "$newbin" ] && return 1 pxe_new_ver="$(pxelinux_version "$newbin")" pxe_cur_ver="$(pxelinux_version "$dst/pxelinux.0")" if version_lte "$pxe_new_ver" "$pxe_cur_ver"; then return 0 fi echo "I: Upgrading PXELinux ($pxe_cur_ver to $pxe_new_ver)" for f in pxelinux.0 menu.c32 vesamenu.c32; do srcf="$(find_file $f "$src")" [ "${f#*c32}" ] || f="pxelinux.cfg/$f" [ -L "$dst/$f" ] && rm "$dst/$f" if [ -f "$srcf" ]; then cp "$srcf" "$dst/$f" else [ -f "$dst/$f" ] && rm "$dst/$f" fi done # Smooth transition to vesamenu [ ! -f "$c32_dir/menu.c32" ] && ln -s "vesamenu.c32" $c32_dir/menu.c32 return 0 } # ------------------------------------------------------------ # # copy_elilo_bin() # Install elilo binaries in the target folder. # Parameters: src dst # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # copy_elilo_bin() { local src=$1 # Source directory local dst=$2 # Target directory local f srcf newbin elilo_new_ver elilo_cur_ver [ ! "$src" -o ! "$dst" ] && return 1 newbin=$(find_file elilo.efi "$src" 2>/dev/null) [ ! -f "$dst/elilo.efi" -a ! -f "$newbin" ] && return 1 elilo_new_ver="$(elilo_version "$newbin")" elilo_cur_ver="$(elilo_version "$dst/elilo.efi")" if version_lte "$elilo_new_ver" "$elilo_cur_ver"; then return 0 fi echo "I: Upgrading elilo ($elilo_cur_ver to $elilo_new_ver)" for f in elilo.efi; do srcf="$(find_file $f "$src")" if [ -f "$srcf" ]; then cp -p "$srcf" "$dst/$f" else [ -f "$dst/$f" ] && rm "$dst/$f" fi done return 0 } # ------------------------------------------------------------ # # update_menu() # Create the bootloaders top menu. # Parameters: (NONE) # Returns: (NULL) # ------------------------------------------------------------ # update_menu() { if [ ! -d "$TFTP_ROOT/debian-installer" ]; then return fi cd "$TFTP_ROOT/debian-installer" update_pxelinux_menu update_elilo_menu if find "$TFTP_ROOT/debian-installer" -mindepth 1 -type d | grep -q "." ; then sed -e 's/^\s*//' > "$TFTP_ROOT/debian-installer/README.txt" < /dev/null 2>&1 || true fi rmdir --ignore-fail-on-non-empty "$TFTP_ROOT/debian-installer" } # ------------------------------------------------------------ # # update_pxelinux_menu() # Create PXElinux bootloader top menu. # Parameters: (NONE) # Returns: (NULL) # ------------------------------------------------------------ # update_pxelinux_menu() { local x i [ ! -d "pxelinux.cfg" ] && mkdir "pxelinux.cfg" [ "$VERBOSE" ] && echo "I: Building PXE-Linux' top-menu" print_do_not_edit_header "$TEMPLATES/pxelinux.HEAD" > pxelinux.cfg/default if [ -n "$(find "$TFTP_ROOT/debian-installer" -type d -name pxelinux.cfg.serial-9600 2>/dev/null)" ]; then cp pxelinux.cfg/default pxelinux.cfg/default.serial-9600 else [ -f "pxelinux.cfg/default.serial-9600" ] && rm pxelinux.cfg/default.serial-9600 fi [ -f $TEMPLATES/pxelinux.HEAD ] && grep -Ev "^##" $TEMPLATES/pxelinux.HEAD >> pxelinux.cfg/default i=0 for x in $(ls "$STATUS_LIB/"*.pxelinux.menu.fragment 2>/dev/null ); do i=$(($i + 1)) grep -Ev "^##" $x >> pxelinux.cfg/default echo "" >> pxelinux.cfg/default done [ $i -eq 0 ] && rm pxelinux.cfg/default rm pxelinux.cfg/default.mig-bak 2>/dev/null || true i=0 if [ -f "pxelinux.cfg/default.serial-9600" ]; then i=$(($i + 1)) [ -f $TEMPLATES/pxelinux.HEAD ] && cat $TEMPLATES/pxelinux.HEAD >> pxelinux.cfg/default.serial-9600 for x in "$STATUS_LIB/"*pxelinux.menu.serial-9600.fragment ; do grep -Ev "^##" "$x" >> pxelinux.cfg/default.serial-9600 echo "" >> pxelinux.cfg/default.serial-9600 done [ $i -eq 0 ] && rm pxelinux.cfg/default.serial-9600 fi if [ -f pxelinux.cfg/default ]; then for x in $(sed -n -e "s,^\s*KERNEL\s[\s:/]*\(.*menu.c32\).*,\1,p " pxelinux.cfg/default | sort -u ); do [ ! -f ../$x ] && echo "W: Some menu binaries are missing. Install the package syslinux" done else find pxelinux.cfg/ -iregex '.*\(\.c32\|\.bak.*\|~\)$' \ | xargs -r rm [ -d pxelinux.cfg ] && rmdir --ignore-fail-on-non-empty pxelinux.cfg [ ! -d pxelinux.cfg -a -e pxelinux.0 ] && rm pxelinux.0 fi } # ------------------------------------------------------------ # # update_elilo_menu() # Create Elilo bootloader top menu. # Parameters: (NONE) # Returns: (NULL) # ------------------------------------------------------------ # update_elilo_menu() { local x i [ "$VERBOSE" ] && echo "I: Building Elilo's top-menu" print_do_not_edit_header "$TEMPLATES/elilo.HEAD" > elilo.conf [ -f $TEMPLATES/elilo.HEAD ] && grep -Ev "^##" "$TEMPLATES/elilo.HEAD" >> elilo.conf i=0 for x in $(ls "$STATUS_LIB/"*.elilo.conf.fragment 2>/dev/null ); do i=$(($i + 1)) grep -Ev "^##" $x >> elilo.conf echo "" >> elilo.conf done if [ $i -eq 0 ]; then rm elilo.conf [ -f elilo.efi ] && rm elilo.efi fi } # ------------------------------------------------------------ # # check_tftp_root() # Check that declared TFTP root directory is valid. # Parameters: (NONE) # Returns: (NULL) # ------------------------------------------------------------ # check_tftp_root() { if [ -z "$TFTP_ROOT" -o "$TFTP_ROOT" = "." -o "$TFTP_ROOT" = "/" ]; then echo "E: Invalid TFTP root specified ($TFTP_ROOT)" 1>&2 exit 1 fi if [ ! -d "$TFTP_ROOT" ]; then echo "E: TFTP root directory doesn't exists ($TFTP_ROOT)" 1>&2 echo "I: Make sure you installed a tftp server like tftpd-hpa or atftpd." exit 1 fi [ ! -d "$TFTP_ROOT/debian-installer" ] && mkdir "$TFTP_ROOT/debian-installer" if [ ! -w "$TFTP_ROOT/debian-installer" ]; then echo "E: Can't write to DI directory ($TFTP_ROOT/debian-installer)" 1>&2 exit 1 fi } #This function should be kept in sync with function "uninstall_repo" in debian/postrm # ------------------------------------------------------------ # # uninstall_repo() # Remove the specfied repository # Parameters: dist_conf # Returns: (EXIT STATUS) 0 # ------------------------------------------------------------ # uninstall_repo() { dist_conf="$1" # Repository's .conf file local s metadatabasename tarfile expand_dir dist_dir metadatabasename="$(echo $dist_conf | sed -e 's/\.conf$//' )" #remove di-netboot-assistant < 0.37 cached files. tarfile="$(grep -E "^[[:blank:]]*dl_file=" "$dist_conf" | sed -e 's/^[[:blank:]]*dl_file=//')" if [ "$(echo $tarfile | sed -n -e 's/^\(.\).*/\1/p')" = "/" ]; then [ -f "$tarfile" ] && rm "$tarfile" fi expand_dir="$(grep -E "^[[:blank:]]*expand_dir=" "$dist_conf" | sed -e 's/^[[:blank:]]*expand_dir=//')" [ "$expand_dir" != "/" -a -d "$expand_dir" ] && rm -Rf "$expand_dir" dist_dir="$(echo "$expand_dir" | sed -e 's,/[^/]\+$,,')" rmdir --ignore-fail-on-non-empty "$dist_dir" s="$metadatabasename.pxelinux.menu.fragment" [ -f "$s" ] && rm "$s" s="$metadatabasename.pxelinux.menu.serial-9600.fragment" [ -f "$s" ] && rm "$s" s="$metadatabasename.elilo.conf.fragment" [ -f "$s" ] && rm "$s" rm "$dist_conf" } # ------------------------------------------------------------ # # get_installed_repos() # List the installed repositories # Parameters: none # Returns: (STRINGS) Installed repos # ------------------------------------------------------------ # get_installed_repos() { find "$STATUS_LIB/" -name \*--\*.conf \ | sed -e 's,^.*/,,' -e 's/--.*\.conf//' \ | tr '\n' ' ' } # ------------------------------------------------------------ # # uninstall_repos() # Remove the specfied repository for all specified archs. # Parameters: repo ignore_missing # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # uninstall_repos() { local repo="$1" # Name of the repository local ignore_missing="$2" # Don't repo. local a archs installed_archs installed_repos [ "$DEBUG" ] && set -x if [ ! -d "$STATUS_LIB" ]; then echo "E: Failed to uninstall repository, lib folder not found." 1>&2 exit 1 fi installed_archs="$(find "$STATUS_LIB/" -name \*$repo--\*.conf | sed -e 's/^.*--//' -e 's/\.conf//' | tr '\n' ' ')" if [ ! "$installed_archs" -a "$ignore_missing" != "ignore_missing" ]; then installed_repos="$(get_installed_repos)" echo "E: Repository '$repo' not installed." 1>&2 echo "I: (installed repositories are: $installed_repos)" 1>&2 exit 1 fi [ ! "$ARCH" ] && ARCH=$DEFAULT_ARCH if [ "$(echo $ARCH | grep -E "\")" ]; then archs="$installed_archs" else archs="$(echo $ARCH | tr ',' ' ')" fi for a in $archs ; do if [ -f "$STATUS_LIB/$repo--$a.conf" ]; then uninstall_repo "$STATUS_LIB/$repo--$a.conf" else if [ "$ignore_missing" != "ignore_missing" ]; then echo "E: Repository '$repo' for architecture '$a' doesn't exists." 1>&2 echo "I: (installed arch are: $(echo $installed_archs | tr "\n" " "))" return 1 fi fi done [ "$DEBUG" ] && set +x } #This function should be kept in sync with function "url2filename" in debian/postrm # ------------------------------------------------------------ # # url2filename() # Convert an URL into a valid filename. # Parameters: (PIPE) url # Returns: (STRING) filename # ------------------------------------------------------------ # url2filename() { sed -e 's#//\+#/#g' -e 's#[^[:alnum:]@+_~\.-]#_#g' } #This function should be kept in sync with function "remove_repocache" in debian/postrm # ------------------------------------------------------------ # # remove_repocache() # Remove the cached file. # Parameters: metadatafile # Returns: (EXIT STATUS) 0 # ------------------------------------------------------------ # remove_repocache() { local metadatafile="$1" # repository to uncache local base file base=$(echo $metadatafile | sed -e 's/~~.*$//' ) for file in $(sed -n -e 's/^[[:blank:]]*dl_file=[[:blank:]]*//p' $metadatafile); do rm $rm_verbosity ${base}_"$(echo $file| url2filename)" done #Purge remaing files (MD5SUMs...) if there are no more cached #distribution from the same repository. if [ ! "$(ls -1 ${base}~~*.meta | grep -v "$metadatafile")" ]; then rm $rm_verbosity ${base}_* fi [ -f $metadatafile ] && rm $metadatafile } # ------------------------------------------------------------ # # remove_repocacheq() # Remove the cached file. # Parameters: metadatafile # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # remove_repocaches() { local del_repo="$1" local ignore_missing="$2" local count cached_archs archs metadatafile a [ "$DEBUG" ] && set -x if [ ! -d "$DL_CACHE" ]; then echo "E: Failed to clean the cache, cache folder not found." 1>&2 exit 1 fi cached_archs="$(find $DL_CACHE -name "*~~$del_repo--*.meta" | sed -e 's/^.*--//' -e 's/\.meta//' | tr '\n' ' ')" if [ ! "$cached_archs" -a "$ignore_missing" != "ignore_missing" ]; then cached_repos="$(find $DL_CACHE -name \*~~\*--\*.meta | sed -e 's/^.*~~//' -e 's/--.*//' | tr '\n' ' ')" echo "E: Repository '$del_repo' not cached." 1>&2 echo "I: (cached repositories are: $cached_repos)" 1>&2 exit 1 fi [ ! "$ARCH" ] && ARCH=$DEFAULT_ARCH if [ "$(echo $ARCH | grep -E "\")" ]; then archs="$cached_archs" else archs="$(echo $ARCH | tr ',' ' ')" fi for a in $archs ; do count=0 for metadatafile in $(find $DL_CACHE/ -name "*~~${del_repo}--${a}.meta"); do remove_repocache "$metadatafile" count=$(( $count + 1 )) done if [ $count -eq 0 -a "$ignore_missing" != "ignore_missing" ]; then echo "E: Repository '$del_repo' for architecture '$a' doesn't exists." 1>&2 echo "I: (cached archs are: $cached_archs)" 1>&2 exit 1 fi done [ "$DEBUG" ] && set +x } # ------------------------------------------------------------ # # check_sum() # Validate a file's checksum # Parameters: csum_bin csum_file fname actual_file # Returns: (EXIT STATUS) 0=checksum is ok, 1=checksum mismatch # ------------------------------------------------------------ # check_sum() { local csum_bin=$1 # checksum program local csum_file=$2 # file containing checksum local fname=$3 # file to check local actual_file=$4 # original filename local sum if [ ! -f "$actual_file" -o ! -f "$csum_file" ]; then return 1 fi sum=$($csum_bin $actual_file | cut -d " " -f 1) if ! grep -qiE "^$sum[[:blank:]]+(\./|)$fname[[:blank:]]*$" $csum_file ; then return 1 fi return 0 } # ------------------------------------------------------------ # # fetch_files() # Download netboot image, and save them in the cache # Parameters: relase arch baseurl repo_loc tarfile # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # fetch_files() { local release="$1" # Release (or variant) local arch="$2" # Architecture local baseurl="$3" # Download base URL local repo_loc="$4" # Destination dir local tarfile="$5" # File to download local file givenfile metadatafile succeed getter local f csum_bin csum_file skip_csum url cached local fetch_date [ "$DEBUG" ] && set -x if [ ! "$OFFLINE" ]; then if which wget > /dev/null ; then getter="wget -c -x $WGET_VERBOSITY -O" elif which curl > /dev/null ; then getter="curl --fail $CURL_VERBOSITY -o" else echo "E: Can't download file. no download tool detected (wget or curl)." 1>&2 return 1 fi fi metadatafile="$DL_CACHE/$(echo ${repo_loc}~~${release}--${arch}.meta | url2filename)" succeed=$TRUE csum_bin= csum_file=/dev/null for givenfile in $EXTRA_DL_FILES $tarfile ; do f=$(echo $givenfile | sed -e 's#^\./##' -e 's#^/##' -e 's#//#/#g') url="$baseurl/$f" file="$DL_CACHE/$(echo $repo_loc/$f | url2filename)" [ -e $file.tmp ] && rm $file.tmp # Does the checksum of the previous file match the new one? cached=$FALSE skip_csum=$FALSE if [ "$givenfile" = "MD5SUMS" ]; then csum_bin=md5sum csum_file="$file.tmp" [ "$OFFLINE" ] && cp "$file" "$file.tmp" skip_csum=true elif [ "$csum_bin" ]; then if check_sum $csum_bin $csum_file $givenfile $file; then cached=true cp "$file" "$file.tmp" [ "$VERBOSE" ] && echo "I: File $givenfile is already cached" else [ -f "$file.tmp" ] && rm "$file.tmp" [ "$VERBOSE" -a "$OFFLINE" ] && echo "I: $givenfile not cached, or obsolete." [ "$OFFLINE" ] && succeed=$FALSE fi fi # Download the file, if needed. if [ ! "$OFFLINE" -a ! "$cached" ]; then [ 0$VERBOSE -eq 1 ] && echo "I: Downloading $givenfile" if $getter "$file.tmp" -- "$url" ; then if check_sum $csum_bin $csum_file $givenfile $file.tmp || [ "$skip_csum" ] ; then fetch_date="$(date -R)" else echo "E: Checksum verification failed (file $givenfile)." 1>&2 break fi else echo "$EXTRA_DL_FILES" | tr " " "\n" | grep -qx $f || succeed=$FALSE echo "E: Can't download '$release' for '$arch' ($url)." 1>&2 [ -f "$file.tmp" ] && rm $RM_VERBOSITY "$file.tmp" if [ -f "$file" ]; then echo "I: You have a previous version in your cache (see --offline option)." fi fi else if [ ! -f "$file.tmp" ]; then succeed=$FALSE echo "E: Can't process '$release' in offline mode, the file is missing:" 1>&2 echo "E: (expecting '$file' from '$url')" 1>&2 break else fetch_date="$( grep "^fetch_date=" "$metadatafile" | cut -d "=" -f 2- 2>/dev/null )" # Fall back, in case the file is manually added to the cache. [ -z "$fetch_date" ] && fetch_date="$(date -R --reference="$file.tmp" )" fi fi done if [ ! "$csum_bin" ]; then echo "W: No checksum found." fi [ "$VERBOSE" ] && echo "I: Moving/Removing temporary file(s)." for givenfile in $EXTRA_DL_FILES $tarfile ; do f=$(echo $givenfile | sed -e 's#^\./##' -e 's#^/##' -e 's#//#/#g') file="$DL_CACHE/$(echo $repo_loc/$f | url2filename)" if [ "$succeed" ]; then [ -f "$file.tmp" -a -f "$file" ] && rm $RM_VERBOSITY "$file" [ -f "$file.tmp" ] && mv $MV_VERBOSITY "$file.tmp" "$file" else [ -f "$file.tmp" ] && rm $RM_VERBOSITY "$file.tmp" fi done # Save metadata if [ "$succeed" ]; then if [ ! "$OFFLINE" ]; then echo "#$PACKAGE_NAME for '$release' ($arch)" > $metadatafile echo "format=1.0" >> $metadatafile echo "fetch_date=$fetch_date" >> $metadatafile echo "repo=$baseurl" >> $metadatafile echo "dl_file=$tarfile" >> $metadatafile echo "dist=$release" >> $metadatafile fi return 0 else return 1 fi [ "$DEBUG" ] && set +x } # ------------------------------------------------------------ # # extract_files() # Extract (or copy) netboot image. # Parameters: repo_loc file expand_dir # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # extract_files() { local repo_loc=$1 # Repository URL local file=$2 # Downloaded (tar) file local expand_dir=$3 # Target location fo extracted files local dl_file tar_opts file=$(echo $file | sed -e 's#^\./##' -e 's#^/##' -e 's#//#/#g') dl_file="$DL_CACHE/$(echo $repo_loc/$file | url2filename)" [ "$VERBOSE" ] && echo "I: Extracting... " if [ -d "$expand_dir" ]; then rm -Rf "$expand_dir/*" # get existing metadata from the downloaded repository else mkdir -p "$expand_dir" fi : tar_opts="$dl_file --directory $expand_dir --no-same-permissions" case "$(echo "$dl_file" | sed -e 's#^.*/##' )" in *.tar.gz) tar $TAR_VERBOSITY -zxf $tar_opts --strip-components 3 --exclude "./pxelinux.0" --exclude "./pxelinux.cfg" tar $TAR_VERBOSITY -zxf $tar_opts ./version.info 2>/dev/null || true ;; *.tar.bz2) tar $TAR_VERBOSITY -jxf $tar_opts --strip-components 3 --exclude "./pxelinux.0" --exclude "./pxelinux.cfg" tar $TAR_VERBOSITY -jxf $tar_opts ./version.info 2>/dev/null || true ;; *.img) cp $CP_VERBOSITY "$dl_file" "$expand_dir/$(basename "$file")" ;; *) echo "E: Don't know how to handle (unpack...) the file: $dl_file" 1>&2 return 1 ;; esac return 0 } # ------------------------------------------------------------ # # pxelinux_version() # Retrieve PXElinux version # Parameters: bin # Returns: (STRING) PXElinux version # ------------------------------------------------------------ # pxelinux_version() { local bin="$1" # pxelinux.0 file if [ -f "$bin" ]; then tr -c '[:print:] ' '\n' < $1 | sed -n -r "/PXELINUX [.0-9]+/ s/^[^ ]* ([0-9^.]+).*/\1/ p" | sort -r | head -n 1 else echo "" fi } # ------------------------------------------------------------ # # elilo_version() # Retrieve Elilo version (or use timestamp as version) # Parameters: bin # Returns: (STRING) elilo version # ------------------------------------------------------------ # elilo_version() { local bin="$1" # elilo.efi file if [ -f "$bin" ]; then date --reference=$bin +0.%Y-%m-%d.%H-%M-%S else echo "" fi } # ------------------------------------------------------------ # # tweak_syslinux_arguments() # Tweak the kernel arguments in pxelinux configuration # files. # Parameters: (PIPE) pristine configuration file # Returns: (STRING) tweaked configuration file # ------------------------------------------------------------ # tweak_syslinux_arguments() { sed -e "/^[[:blank:]]*label[[:blank:]]\+install\$/I,/^\([[:blank:]]*label[[:blank:]]^+[^\(install\)]\|[[:blank:]]*\)\$/I{s!append \(.*\)--\(.*\)!append \1 $DI_ARGS -- \2 $TARGET_ARGS!}" } # ------------------------------------------------------------ # # tweak_elilo_arguments() # Tweak the kernel arguments in pxelinux configuration # files. # Parameters: (PIPE) pristine configuration file # Returns: (STRING) tweaked configuration file # ------------------------------------------------------------ # tweak_elilo_arguments() { sed -e "/^[[:blank:]]*label=install\$/,/^\([[:blank:]]*label=[^\(install\)]\|[[:blank:]]*\)\$/{s!append=\"\([^\"]*\)--\([^\"]*\)*\"!append=\"\1 $DI_ARGS -- \2 $TARGET_ARGS\"!}" } # ------------------------------------------------------------ # # setup_syslinux() # Install and configure syslinux menu. # Parameters: (PIPE) release arch metadatabasename expand_dir # Returns: (EXIT STATUS) 0 # ------------------------------------------------------------ # setup_syslinux() { local release=$1 # D-I image release name local arch=$2 # Architecture local metadatabasename=$3 # metadata location local expand_dir=$4 # Target installation dir. local pxelinuxbin pxelinuxcfg ver f local menufragment menufragment_serial9600 pxelinuxbin="$(find "$expand_dir" -type f -name "pxelinux.0" 2>/dev/null )" if [ ! "$pxelinuxbin" ]; then return fi pxelinuxcfg="${pxelinuxbin%%.0}.cfg/default" ver="$(sed -ne 's/# D-I config version \(.*\)/\1/p' "$pxelinuxcfg" 2>/dev/null)" if [ ! -f "$pxelinuxcfg" ] || echo "${ver:-1.0}" | grep -q -v "^[12]\.0" ; then echo "W: The format of this image may not be supported." 1>&2 fi [ ! -d "$TFTP_ROOT/debian-installer/pxelinux.cfg" ] && mkdir "$TFTP_ROOT/debian-installer/pxelinux.cfg" copy_syslinux_bin "$SYSLINUX" "$TFTP_ROOT/debian-installer/" || false if ! copy_syslinux_bin "$expand_dir" "$TFTP_ROOT/debian-installer/" ; then echo "E: No PXELinux menu installed. Please file a bug." 1>&2 fi for f in $(find "$expand_dir" -type f -a \( -name "default" -o -name "boot.txt" -o -name '*.cfg' \) ); do mv "$f" "$f.ORIG" print_do_not_edit_header "$release netboot image" > "$f" sed -e "s#$REWRITEPKGPATH/$arch/#::/debian-installer/$REPO_ALIAS/$arch/#" "$f.ORIG" \ | tweak_syslinux_arguments >> "$f" done menufragment="$metadatabasename.pxelinux.menu.fragment" menufragment_serial9600="$metadatabasename.pxelinux.menu.serial-9600.fragment" echo "## This is a fragment of syslinux/pxelinux menu file." > $menufragment echo "##" >> $menufragment echo "## DO NOT EDIT THIS FILE" >> $menufragment echo "##" >> $menufragment echo "## It is automatically generated by $PACKAGE_NAME" >> $menufragment echo "##" >> $menufragment if [ "$(find $expand_dir -type d -name pxelinux.cfg.serial-9600 2>/dev/null)" ]; then cp $menufragment $menufragment_serial9600 else [ -f "$menufragment_serial9600" ] && rm "$menufragment_serial9600" fi # Create top-menu fragment (use the most appropriate **menu.c32) echo "LABEL ${REPO_ALIAS}-$arch" >> $menufragment printf " MENU LABEL Debian Installer %-26s [SUB-MENU]\n" "($REPO_ALIAS, $arch)" >> $menufragment if [ "$(grep -Eiq "^[[:blank:]]*prompt[[:blank:]]+0" "$expand_dir/pxelinux.cfg/default" && grep -Eiq "^[[:blank:]]*default[[:blank:]].*/vesamenu.c32" "$expand_dir/pxelinux.cfg/default" && echo ok)" ]; then echo -n " KERNEL " >> $menufragment grep -Ei "^[[:blank:]]*default[[:blank:]].*/vesamenu.c32" \ $expand_dir/pxelinux.cfg/default \ | sed -e 's/^[[:blank:]]*default[[:blank:]]//' \ >> $menufragment echo -n " APPEND " >> $menufragment if grep -qEi "^[[:blank:]]*include[[:blank:]]" $expand_dir/pxelinux.cfg/default ; then grep -Ei "^[[:blank:]]*include[[:blank:]]" \ $expand_dir/pxelinux.cfg/default \ | sed -e 's/^[[:blank:]]*include[[:blank:]]//' \ >> $menufragment else echo " APPEND debian-installer/$REPO_ALIAS/$arch/pxelinux.cfg/default" >> $menufragment fi else echo " KERNEL ::/debian-installer/pxelinux.cfg/menu.c32" >> $menufragment echo " APPEND ::/debian-installer/$REPO_ALIAS/$arch/pxelinux.cfg/default" >> $menufragment fi if [ -f "$menufragment_serial9600" ]; then ( echo "LABEL ${REPO_ALIAS}-$arch" printf " MENU LABEL Debian Installer %-26s [SUB-MENU]\n" "($REPO_ALIAS, $arch)" echo " KERNEL ::/debian-installer/pxelinux.cfg/menu.c32" echo " APPEND ::/debian-installer/$REPO_ALIAS/$arch/pxelinux.cfg.serial-9600/default" ) >> $menufragment_serial9600 fi } # ------------------------------------------------------------ # # setup_elilo() # Install and configure elilo menu. # Parameters: (PIPE) release arch metadatabasename expand_dir # Returns: (EXIT STATUS) 0 # ------------------------------------------------------------ # setup_elilo() { local release=$1 # D-I image release name local arch=$2 # Architecture local metadatabasename=$3 # metadata location local expand_dir=$4 # Target installation dir. local f menufragment if [ ! "$(find "$expand_dir" -type f -name 'elilo.conf' )" ]; then return fi #Install elilo from locally installed package (if any) copy_elilo_bin "$ELILO" "$TFTP_ROOT/debian-installer/" || false #Install/Upgrade elilo with package version included in the tarball. if ! copy_elilo_bin "$expand_dir" "$TFTP_ROOT/debian-installer/" ; then echo "E: No Elilo menu installed. Please file a bug." 1>&2 fi #Rewrite existing menus for f in $(find "$expand_dir" -type f -name 'elilo.conf' ); do mv "$f" "$f.ORIG" print_do_not_edit_header "release" > "$f" sed -e "s#^\([[:blank:]]*\(image\|initrd\|message\|f[0-9]\+\)=\)#\1debian-installer/$REPO_ALIAS/$arch/#" < "$f.ORIG" >> "$f" done #Create overview menu. menufragment="$metadatabasename.elilo.conf.fragment" echo "## This is a fragment of elilo menu file." > $menufragment echo "##" >> $menufragment echo "## DO NOT EDIT THIS FILE" >> $menufragment echo "##" >> $menufragment echo "## It is automatically generated by $PACKAGE_NAME" >> $menufragment echo "##" >> $menufragment echo "# ### $release ($REPO_ALIAS) $arch ### " >> $menufragment awk '/^image=/,/^$/' "$expand_dir/elilo.conf" \ | tweak_elilo_arguments \ | sed -e "s/^[[:blank:]]*label=.*$/\0-${REPO_ALIAS}-$arch/" \ | sed -e "s/^\([[:blank:]]*description\)=\"\([^\"]\+\)\"/\1=\"\2 ($release $arch)\"/" \ >> $menufragment echo "" >> $menufragment } # ------------------------------------------------------------ # # install_repo_for_arch() # Extract/Copy the downloaded file a given arch. # Parameters: arch release # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # install_repo_for_arch() { local arch=$1 # Architecture local release=$2 # D-I image release name local reg metadatabasename file fetch_date local metadatafile repo_orig repo_mirror expand_dir echo "I: Processing $release/$arch." [ "$DEBUG" ] && set -x metadatabasename="$STATUS_LIB/${REPO_ALIAS}--${arch}" metadatafile="$metadatabasename.conf" repo_orig="$(grep -E "^$release[[:blank:]]$arch\>" "$DISOURCELIST")" repo_mirror="$repo_orig" for reg in $MIRROR_REGEXPS "s=/$==" ; do repo_mirror="$(echo "$repo_mirror" | sed -e "$reg")" done repo="$(echo "$repo_orig" | cut -f 3 | sed -e 's#\([^:]/\)/#\1#g' -e 's#/$##' )" repo_mirror="$(echo "$repo_mirror" | cut -f 3 | sed -e 's#\([^:]/\)/#\1#g' -e 's#/$##' )" if [ -z "$repo" ]; then echo "E: There is no entry declared for architecture '$arch' for " 1>&2 echo "E: repository '$release' in $DISOURCELIST" 1>&2 list_declared_arch_for_repo "$release" return 1 fi if [ "$release" != "$REPO_ALIAS" -a "$VERBOSE" ]; then echo "I: Repository '$release' filed as '$REPO_ALIAS'." fi repo_loc="$(echo $repo | sed -e 's#^[^:]\+://##')" expand_dir="$TFTP_ROOT/debian-installer/$REPO_ALIAS/$arch" file=$(grep -E "^$release[[:blank:]]$arch" "$DISOURCELIST" | cut -f 4- ) fetch_date="" if ! fetch_files "$release" "$arch" "$repo_mirror" "$repo_loc" $file; then return 1 fi if ! extract_files "$repo_loc" "$file" "$expand_dir"; then return 1 fi # save metadata of this repository grep -v -E "^format=.*" \ "$DL_CACHE/$(echo ${repo_loc}~~${release}--${arch}.meta | url2filename)" \ | sed -e "s/^fetch_date=/format=1.0\n\0/" \ > $metadatafile echo "expand_dir=$expand_dir" >> $metadatafile echo "di_args=$DI_ARGS" >> $metadatafile echo "target_args=$TARGET_ARGS" >> $metadatafile # PXELINUX MENUs (i386, amd64) setup_syslinux "$release" "$arch" "$metadatabasename" "$expand_dir" # ELILO MENU (ia64, and some ia32) setup_elilo "$release" "$arch" "$metadatabasename" "$expand_dir" return 0 [ "$DEBUG" ] && set +x } # ------------------------------------------------------------ # # install_repo_for_archs() # Extract/Copy the downloaded file for specified archs. # Parameters: release # Returns: (EXIT STATUS) 0=Success, 1=Error # ------------------------------------------------------------ # install_repo_for_archs() { local release="$1" # release name to install local archs if [ -z "$release" ]; then echo "E: No repository specified (valid repositories are: $releases)" 1>&2 return 1 fi if ! grep -Eq "^$release\>" "$DISOURCELIST" ; then echo "E: Invalid repository name specified ($release)" 1>&2 echo "I: Declared repositories are: $releases" return 1 fi [ ! "$ARCH" ] && ARCH=$DEFAULT_ARCH if [ "$(echo $ARCH | grep -E "\")" ]; then archs="$(get_declared_arch_for_repo $release)" else archs="$(echo $ARCH | tr ',' ' ')" fi if [ -z "$( echo "$archs" | sed -e 's/[[:blank:]\?]*//g' )" ]; then echo "E: No architecture specified." 1>&2 list_declared_arch_for_repo "$release" return 1 fi for arch in $archs ; do if ! install_repo_for_arch $arch $release; then return $? fi done return 0 } # --------------------------- Main ------------------------- # ACTION= COUNT=0 for option in "$@"; do case "$option" in -h | --help) usage exit 0 ;; -V | --version) echo "$PACKAGE_NAME $PACKAGE_VERSION" exit 0 ;; --arch| --arch=*) ARCH="$(echo $option | sed -e 's/--arch[=]\?//' -e 's/,,/,/' -e 's/^,\+//' -e 's/,\+$//' )" #Note: if [ "$(echo $ARCH | grep -E '^[[:alnum:]_,]\+$')" ]; then echo "E: Invalid architecture specified ($ARCH)" 1>&2 exit 1 fi ;; --alias| --alias=*) REPO_ALIAS="$(echo $option | sed -e 's/--alias[=]\?//' | grep -E "^[[:alnum:]_-]+$" )" #Note: if [ "$(echo $REPO_ALIAS | grep -E '^[[:alnum:]_,]\+$')" ]; then echo "E: Invalid alias name ($option)" 1>&2 exit 1 fi ;; --di-args=*) DI_ARGS="$DI_ARGS ${option#--di-args=}" ;; --target-args=*) TARGET_ARGS="$TARGET_ARGS ${option#--target-args=}" ;; --offline) OFFLINE=$TRUE ;; -v | --verbose) VERBOSE=$(( 0$VERBOSE + 1 )) if [ $VERBOSE -gt 1 ]; then WGET_VERBOSITY="" CURL_VERBOSITY="" RM_VERBOSITY="-v" MV_VERBOSITY="-v" CP_VERBOSITY="-v" TAR_VERBOSITY="-v" fi ;; --debug) # This is an undocumented feature... DEBUG=$TRUE ;; --di-args| --target-args) echo "E: Option $option requires a value after equal sign." 1>&2 exit 1 ;; -*) echo "E: Unrecognized option ($option)" 1>&2 exit 1 ;; rebuild-menu|install|uninstall|uncache|purge) #Actions are processed in the loop below if [ "$ACTION" ]; then echo "E: Unexpected command '$option'. '$ACTION' was already specified." 1>&2 exit 1 fi ACTION=$option ;; *) COUNT=$(( $COUNT + 1 )) ;; esac done DEFAULT_ARCH="$(detect_current_arch)" if ! check_di_source_list; then exit $? fi releases="$(grep -vE '^#' "$DISOURCELIST" | cut -f 1 | sort -u | tr "\n" " " | sed -e 's/^[[:blank:]]\+//' )" if [ "$REPO_ALIAS" ]; then if [ "$ACTION" = "install" -a $COUNT -gt 1 ]; then echo "E: Option --alias can't be used with multiple repositories." 1>&2 exit 1 fi fi case "$ACTION" in '') #Skip, if no action specified ;; rebuild-menu) if [ $COUNT -ne 0 ]; then echo "E: Unexpected argument after command '$ACTION'." 1>&2 exit 1 fi ;; *) if [ $COUNT -eq 0 ]; then echo "E: No repository name was passed for '$ACTION'." 1>&2 [ ! "$OFFLINE" -a "$ACTION" = "install" ] && echo "I: Declared repositories are: $releases" cached_repos="$( find $DL_CACHE -name "*~~*--*.meta" | sed -e 's/^.*~~//' -e 's/--.*\.meta//' | sort -u | tr "\n" " " )" installed_repos="$(get_installed_repos)" purgabled_repos="$(echo $cached_repos $installed_repos | tr " " "\n" | sort -u | tr "\n" " ")" [ "$ACTION" = "uncache" ] && echo "I: Cached repositories are: $cached_repos" [ "$ACTION" = "uninstall" ] && echo "I: Installed repositories are: $installed_repos" [ "$ACTION" = "purge" ] && echo "I: Purgable repositories are: $purgabled_repos" exit 1 fi ;; esac ACTION= COUNT=0 for option in "$@"; do case "$option" in -*) # Ignore options on this pass ;; install|uninstall|uncache|purge) ACTION=$option ;; rebuild-menu) ACTION=$option update_menu ;; *) [ ! "$REPO_ALIAS" ] && REPO_ALIAS=$option case "$ACTION" in install) check_tftp_root cd "$TFTP_ROOT/debian-installer" if install_repo_for_archs "$option" ; then update_menu else rmdir --ignore-fail-on-non-empty "$TFTP_ROOT/debian-installer" fi ;; uninstall) uninstall_repos "$option" update_menu ;; uncache) remove_repocaches "$option" ;; purge) uninstall_repos "$option" ignore_missing update_menu remove_repocaches "$option" ignore_missing ;; rebuild-menu) echo "W: Argument '$option' ignored ($ACTION expects no argument)." 1>&2 ;; *) echo "E: Unexpected keyword: '$option'. No action were specified." 1>&2 exit 1 ;; esac COUNT=$(( $COUNT + 1 )) esac done if [ ! "$ACTION" ]; then usage 1>&2 exit 1 fi di-netboot-assistant-0.38a/di-netboot-assistant.10000644000000000000000000001354512170210117016703 0ustar .\" Hey, EMACS: -*- nroff -*- .TH DI-NETBOOT-ASSISTANT "1" "August 2009" "Frank Lin Piat" "User Commands" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .SH NAME di\-netboot\-assistant - Debian-Installer netboot assistant .SH SYNOPSIS \fBdi\-netboot\-assistant\fR [\fB\-h\fR] [\fB\-\-version\fR] [\fB\-\-verbose\fR] [\fB\-\-offline\fR] {[install\ \fIimage\fR...] | [uninstall\ \fIimage\fR...] | [uncache\ \fIimage\fR...] | [purge\ \fIimage\fR...] | [rebuild\-menu] } [\fB\-\-arch=\fR\fB\fIarch\fR\fR] [\fB\-\-di\-args=\fR\fB\fIARGS\fR\fR] [\fB\-\-target\-args=\fR\fB\fIARGS\fR\fR] [\fB\-\-alias=\fR\fB\fIalias\fR\fR] .SH DESCRIPTION .PP \fBdi\-netboot\-assistant\fR is a simple tool to download and extract latest debian installer netboot images. .PP Unless the \fB\-h\fR, \fB\-\-help\fR, \fB\-V\fR, or \fB\-\-version\fR option is given, one of the commands below must be present\&. .PP install .RS 4 install is followed by a repository name desired for installation\&. The repository name has to be one of those declared in \fI/etc/di\-netboot\-assistant/di\-sources\&.list\fR. The image will be installed/extracted in the default location (declared in \fI/etc/di\-netboot\-assistant/di\-netboot\-assistant.conf\fR). .RE .PP uninstall .RS 4 uninstall is followed by the name of the repository to be uninstalled (or the repository's alias if you used \fB--alias=\fR)\&. The netboot files related to that distribution will be removed from the TFTP server. .RE .PP uncache .RS 4 uncache will clean the cached files for the given netboot image. You must specify a repository name (not an \fB--alias=\fR name). .RE .PP purge .RS 4 purge is followed by a repository name desired for installation\&. \fIpurge\fR is identical to running \fIuninstall\fR then \fIuncache\fR for a given repository. .RE .PP rebuild\-menu .RS 4 rebuild\-menu will rebuild the top level menu. It's only useful if you have modified \fIdi\-netboot\-assistant.conf\fR and you are using some client images that have top level menu (like i386, amd64 and ia64). This command takes no argument. .RE .SH "OPTIONS" .PP \fB\-h\fR, \fB\-\-help\fR Print this message and exit .TP \fB\-v\fR, \fB\-\-version\fR Print script version and exit .TP \fB\-\-alias=\fR\fB\fIalias\fR\fR Specify the alias name under wich this repository will be saved. Alias names can only contain alphanumeric, "_" and "-" characters. This is especially useful for daily images. By default, the alias name is the same as the repository name. .TP \fB\-\-arch=\fR\fB\fIarch\fR\fR Specify the architecture you want to install or purge. The architecture you can use for the install action must be declared in \fI/etc/di\-netboot\-assistant/di\-sources\&.list\fR. The architecture you can use for purge action in one of those you previously installed ! The usable architectures can be listed by leaving \fB\-\-arch=\fR empty. The default architecture is the current one (as reported by \fBdpkg \-\-print\-architecture). .TP \fB\-\-verbose\fR Verbose messages .TP \fB\-\-di\-args=\fR"\fB\fIARGS\fR\fR" Debian-Installer boot arguments. The specified arguments will be *appended* to the one provided in the downloaded image, before the "\-\-". (You can also define \fBDI_ARGS=\fR in \fBdi\-netboot\-assistant.conf\fR). .TP \fB\-\-target\-args=\fR"\fB\fIARGS\fR\fR" Boot arguments for the target (installed) system. The specified arguments will be *appended* to the one provided in the downloaded image, at the very end of the line. (You can also define \fBTARGET_ARGS=\fR in \fBdi\-netboot\-assistant.conf\fR). .TP \fB\-\-offline\fR Don't download the files (use the files cached previously). .RE .SH EXAMPLES To install a netboot image for the \fIstable\fR repository, for the default architecture. .br \fB di\-netboot\-assistant install stable\fP .br To list the installed netboot image that can removed. .br \fB di\-netboot\-assistant purge\fP .br To remove a netboot image for the \fIstable\fR repository, for the default architecture. .br \fB di\-netboot\-assistant purge stable\fP .br .RE .SH "EXIT CODE" .TP \fB0\fR Successful program execution. .TP \fB1\fR An error occured. (note that \fIpurge\fR doesn't fail if the specified repository doesn't exists). . .SH FILES .PP \fB/etc/di\-netboot\-assistant/di\-netboot\-assistant.conf\fR .RS 4 The default system-wide configuration file. The file syntax must be bash(1) compatible. .RE .PP \fB~/.di\-netboot\-assistant/di\-netboot\-assistant.conf\fR .RS 4 User's own configuration file. The file syntax must be bash(1) compatible. (see file peruser.di\-netboot\-assistant.conf, in /usr/share/doc/di\-netboot\-assistant/examples/) .RE .PP \fB/etc/di\-netboot\-assistant/di\-sources.list\fR .RS 4 This file contains the list of downloadable netboot images. .RE .PP \fB/etc/di\-netboot\-assistant/pxelinux.HEAD\fR .RS 4 The content of this file is prepended to the generated PXELinux config file (i.e boot menu). PXELinux bootloader is used on BIOS based i386 and amd64 systems. .RE .PP \fB/etc/di\-netboot\-assistant/elilo.HEAD\fR .RS 4 The content of this file is prepended to the generated Elilo config file (i.e boot menu). Elilo bootloader is used on EFI based systems like ia64 and a few i386 systems. .RE .PP \fB/var/lib/di\-netboot\-assistant/\fR .RS 4 The folder where hints about installed netboot images are stored. Do not edit those files, re-use \fBinstall\fR to modify the settings of installed image. .RE .PP \fB/var/cache/di\-netboot\-assistant/\fR .RS 4 The folder where downloaded files are stored (cached) before "installing" them. Use the action \fBuncache\fR to remove cached files. .RE .SH SECURITY Do not use sudo to grant execution right to di\-netboot\-assistant (see the README file). .SH PROXY di\-netboot\-assistant uses wget or curl to actually download the files. You can set the environnement variables accordingly. .SH AUTHOR di\-netboot\-assistant was written by Frank Lin PIAT . di-netboot-assistant-0.38a/COPYING0000644000000000000000000004310311515466540013611 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. di-netboot-assistant-0.38a/debian/0000755000000000000000000000000012171153544013773 5ustar di-netboot-assistant-0.38a/debian/disources.yaml0000644000000000000000000000015712170210117016647 0ustar addon: disources description: "allow syntax highlighting for disources files" files: - syntax/disources.vim di-netboot-assistant-0.38a/debian/NEWS0000644000000000000000000000121412170210117014455 0ustar di-netboot-assistant (0.37) unstable; urgency=low PXELinux tftp filenames handling changed: DHCP configuration should be changed: PXELinux option 210 (pathprefix) isn't needed anymore. Previously, one had to configure the DHCP to send option 210="/". This isn't required anymore (and it is deprecated). PXELinux configuration file should be modified: All tftp filenames in pxelinux.HEAD should be prefixed with "::/" so PXELinux treats them as absolute location, this also applies to "append initrd=::/pathto/initrd". Then run "di-netboot-assistant rebuild-menu". -- Frank Lin PIAT Thu, 15 Oct 2009 09:23:35 +0200 di-netboot-assistant-0.38a/debian/manpages0000644000000000000000000000002712170210117015475 0ustar di-netboot-assistant.1 di-netboot-assistant-0.38a/debian/control0000644000000000000000000000215212170210117015363 0ustar Source: di-netboot-assistant Section: utils Priority: extra Maintainer: Debian Install System Team Uploaders: Christian Perrier , Frank Lin PIAT Build-Depends: debhelper (>= 9) Homepage: http://wiki.debian.org/DebianInstaller/NetbootAssistant Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=d-i/netboot-assistant.git Vcs-Git: git://anonscm.debian.org/d-i/netboot-assistant.git Package: di-netboot-assistant Architecture: all Depends: wget | curl, ${misc:Depends} Recommends: tftpd-hpa | atftpd | dnsmasq Suggests: dhcp3-server | udhcpd | dnsmasq, syslinux, elilo, vim-addon-manager Description: Debian-Installer netboot assistant di-netboot-assistant is a tool to download and extract Debian-Installer netboot images. It's especially useful if you want to download multiple netboot image, since it builds a top menu, so you can select the image at boot time (on amd64, i386 and ia64). . Currently, it supports amd64, i386, ia64, alpha, hppa and sparc clients. . syslinux and elilo are needed if you plan to use the "top menu". di-netboot-assistant-0.38a/debian/postinst0000644000000000000000000000262411515466540015611 0ustar #!/bin/sh set -e STATUS_LIB=/var/lib/di-netboot-assistant TFTP_ROOT=/var/lib/tftpboot if [ -e /etc/di-netboot-assistant/di-netboot-assistant.conf ]; then . /etc/di-netboot-assistant/di-netboot-assistant.conf fi migrate_pxelinux_prefix() { echo 'Migrating current setup to use PXELinux "::/" (absolute TFTP path).' SEDCMD1='s,^\(\s*\(KERNEL\|APPEND\|include\|config\|menu background\|f[0-9]\)\s\+\)\(debian-installer\),\1::/\3,i' SEDCMD2='s,^\(\s*APPEND\s\+.*initrd=\)\([^:]\),\1::/\2,i' SEDCMD3='s,^\(\s*\(default\|display\)\s\+\)\([^:].*/\),\1::/\3,i' if [ -d "$STATUS_LIB" ]; then find $STATUS_LIB -name '*.pxelinux.menu.fragment' \ | xargs -r -n 1 \ sed -i -e "$SEDCMD1" fi if [ -d "$TFTP_ROOT/debian-installer" ]; then find $TFTP_ROOT/debian-installer -type f -a \( -name "default" -o -name "boot.txt" -o -name '*.cfg' \) \ | xargs -r -n 1 \ sed --in-place=.mig-bak -e "$SEDCMD1" -e "$SEDCMD2" -e "$SEDCMD3" fi } case "$1" in configure) oldver=$2 if [ "$oldver" ] && dpkg --compare-versions "$2" lt 0.37; then migrate_pxelinux_prefix fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 di-netboot-assistant-0.38a/debian/copyright0000644000000000000000000000240112170210117015710 0ustar This package was debianized by Frank Lin PIAT on Sun, 04 May 2008 12:42:15 +0200. Upstream Author: Frank Lin PIAT Copyright: Copyright (C) 2008 Franklin Piat License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is Copyright 2008, Frank Lin PIAT and is licensed under the GPL v2, see above. Other files: Files: debian/README.vim 2009-2012 Stig Sandbeck Mathisen , di-netboot-assistant-0.38a/debian/dirs0000644000000000000000000000012312170210117014640 0ustar var/cache/di-netboot-assistant var/lib/di-netboot-assistant usr/share/vim/registry di-netboot-assistant-0.38a/debian/examples0000644000000000000000000000001312170210117015513 0ustar examples/* di-netboot-assistant-0.38a/debian/postrm0000644000000000000000000000736011515466540015254 0ustar #!/bin/sh # postrm script for di-netboot-assistant set -e DL_CACHE=/var/cache/di-netboot-assistant/ STATUS_LIB=/var/lib/di-netboot-assistant TFTP_ROOT=/var/lib/tftpboot if [ -f $STATUS_LIB/.old-conf-for-purge ]; then . $STATUS_LIB/.old-conf-for-purge fi #This function should be kept in sync with function "uninstall_repo" in di-netboot-assistant uninstall_repo() { dist_conf="$1" # Repository's .conf file local s metadatabasename tarfile expand_dir dist_dir metadatabasename="$(echo $dist_conf | sed -e 's/\.conf$//' )" #remove di-netboot-assistant < 0.37 cached files. tarfile="$(grep -E "^[[:blank:]]*dl_file=" "$dist_conf" | sed -e 's/^[[:blank:]]*dl_file=//')" if [ "$(echo $tarfile | sed -n -e 's/^\(.\).*/\1/p')" = "/" ]; then [ -f "$tarfile" ] && rm "$tarfile" fi expand_dir="$(grep -E "^[[:blank:]]*expand_dir=" "$dist_conf" | sed -e 's/^[[:blank:]]*expand_dir=//')" [ "$expand_dir" != "/" -a -d "$expand_dir" ] && rm -Rf "$expand_dir" dist_dir="$(echo "$expand_dir" | sed -e 's,/[^/]\+$,,')" rmdir --ignore-fail-on-non-empty "$dist_dir" s="$metadatabasename.pxelinux.menu.fragment" [ -f "$s" ] && rm "$s" s="$metadatabasename.pxelinux.menu.serial-9600.fragment" [ -f "$s" ] && rm "$s" s="$metadatabasename.elilo.conf.fragment" [ -f "$s" ] && rm "$s" rm "$dist_conf" } #This function should be kept in sync with function "url2filename" in di-netboot-assistant url2filename() { sed -e 's#//\+#/#g' -e 's#[^[:alnum:]@+_~\.-]#_#g' } #This function should be kept in sync with function "remove_repocache" in di-netboot-assistant remove_repocache() { local metadatafile="$1" # repository to uncache local base file base=$(echo $metadatafile | sed -e 's/~~.*$//' ) for file in $(sed -n -e 's/^[[:blank:]]*dl_file=[[:blank:]]*//p' $metadatafile); do rm $rm_verbosity ${base}_"$(echo $file| url2filename)" done #Purge remaing files (MD5SUMs...) if there are no more cached #distribution from the same repository. if [ ! "$(ls -1 ${base}~~*.meta | grep -v "$metadatafile")" ]; then rm $rm_verbosity ${base}_* fi [ -f $metadatafile ] && rm $metadatafile } remove_pre037_md5sums() { #remove di-netboot-assistant < 0.37 checksum files. find "$DL_CACHE" -type f ! -name '*_MD5SUMS' \ | grep -q "" \ || find "$DL_CACHE" -type f -name '*_MD5SUMS' \ | xargs -r rm } case "$1" in purge) if [ -d $STATUS_LIB ]; then for x in $( find $STATUS_LIB -type f -name '*.conf' ) ; do uninstall_repo "$x" done if [ -d "$DL_CACHE" ]; then for metadatafile in $(find $DL_CACHE -name "*~~*--*.meta"); do remove_repocache "$metadatafile" done remove_pre037_md5sums fi for x in pxelinux.0 elilo.conf elilo.efi README.txt \ pxelinux.cfg/default pxelinux.cfg/default.mig-bak \ pxelinux.cfg/menu.c32 pxelinux.cfg/vesamenu.c32 \ ; do f="$TFTP_ROOT/debian-installer/$x" if [ -f "$f" -o -L "$f" ]; then rm "$f" || true fi done for x in debian-installer/pxelinux.cfg debian-installer; do f="$TFTP_ROOT/$x" [ -d "$f" ] && rmdir --ignore-fail-on-non-empty "$f" || true done if [ -f $STATUS_LIB/.old-conf-for-purge ]; then rm $STATUS_LIB/.old-conf-for-purge || true fi rmdir --ignore-fail-on-non-empty $STATUS_LIB fi ;; remove) if [ -f /etc/di-netboot-assistant/di-netboot-assistant.conf ]; then [ ! -d $STATUS_LIB ] && mkdir $STATUS_LIB sed -e "1s/^/#BACKUP, to purge our TFT stuff when purged\n/" \ < /etc/di-netboot-assistant/di-netboot-assistant.conf \ > $STATUS_LIB/.old-conf-for-purge fi ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 di-netboot-assistant-0.38a/debian/docs0000644000000000000000000000003112170210117014625 0ustar README debian/README.vim di-netboot-assistant-0.38a/debian/README.vim0000644000000000000000000000062512170210117015435 0ustar Dear user, this package provides the vim addon disources, but it is not enabled per default. If you want to enable it for your user account just execute vim-addons install disources Similarly, to enable it for all users of this system just execute (as root): vim-addons -w install disources vim-addons is provided by the vim-addon-manager package, have a look at its manpage for more information. di-netboot-assistant-0.38a/debian/source/0000755000000000000000000000000012170210117015260 5ustar di-netboot-assistant-0.38a/debian/source/format0000644000000000000000000000001512170210117016467 0ustar 3.0 (native) di-netboot-assistant-0.38a/debian/changelog0000644000000000000000000002165012171153544015651 0ustar di-netboot-assistant (0.38a) unstable; urgency=low [ Frank Lin PIAT ] * This minor release merely update the changelog of 0.38 -- Christian Perrier Tue, 16 Jul 2013 07:17:24 +0200 di-netboot-assistant (0.38) unstable; urgency=low [ Dmitrijs Ledkovs ] * Set debian source format to '3.0 (native)'. * Bump debhelper compat level to 9. * Set Vcs-* to canonical format. [ Frank Lin PIAT ] * Update di-sources.list for current Debian and Ubuntu distributions (Closes:#714397, also Closes:#505738, Thanks to Matt Taggart) * Use vim-addon-manager for di-sources.list syntax highlighting (thanks Stig Sandbeck Mathisen) * Early support running on non .DEB distributions (i.e distro that don't have "dpkg --compare-versions"). * Detect current architecture on rpm based distributions. * Convert Debian packaging to dh (debhelper 7) * Bump standards to 3.9.4 * fix copyright-with-old-dh-make-debian-copyright * fix binary-control-field-duplicates-source * fix debian-news-entry-uses-asterisk * fix hyphen-used-as-minus-sign * fix spelling-error-in-manpage * fix vim-addon-within-vim-runtime-path * Fix hardcoded path used by uninstall (Closes:#700186) * fix bug validating --alias parameter * Rewrite default arch handling. * Simplify debug output of install_repo_for_arch * Factorise code to function install_repo_for_arch * Factorise code for declared_arch_for_repo -- Christian Perrier Sat, 13 Jul 2013 13:23:13 +0200 di-netboot-assistant (0.37) unstable; urgency=low [ Frank Lin PIAT ] * DHCP option 210 (pathprefix="/") isn't needed anymore. (Closes:#498206) * add options di-args and target-args for boot parameters. * Improve command line argument parsing. * Implement "--alias" option. * Improve comments in di-sources.list * Improve di-netboot-assistant manpage. * allow running by a non-privileged user (Closes:#503359, Thanks to Daniel Kahn Gillmor for the patch) * Change umask to allow group writables files. * Use dpkg --print-architecture to query arch. * Display failed URL without requiring --verbose (Closes:#493418, Thanks to Chris Lamb) * Don't re-download files if checksum match (Closes:#493666, Thanks to Chris Lamb) * Output status messages to STDOUT, not STDERR (Closes:#493426, Thanks to Chris Lamb) * Default PROMPT to 0 in pxelinux.HEAD (Closes:#493548, Thanks to Chris Lamb) * TFTP: recommend tftpd-hpa|atftpd, since package tftpd isn't suitable for netboot (Closes:#537649, Thanks to Daniel Baumann). * Downgrade elilo, syslinux dependency to suggest: fetch bootloader installed images. * Fetch daily images from d-i.debian.org. Closes: #576856 [ Colin Watson ] * Add wheezy to diSourcesDistrKeyword. * Update Ubuntu distributions in diSourcesDistrKeyword: remove EOLed edgy, feisty, gutsy, intrepid, and jaunty, and add karmic, lucid, maverick, and natty. [ Hector Oron ] * disources.vim: add armhf architecture support * README: add armhf architecture support [ Joey Hess ] * Update i386 daily build location. [ Christian Perrier ] * Add myself to Uplaoders and make the package team-maintained * Bump standards to 3.9.3 -- Christian Perrier Sun, 05 Aug 2012 12:24:41 +0200 di-netboot-assistant (0.36d) unstable; urgency=low * Simplify the file structure in the source and let debhelper do the heavy lifting to move things into place. No functional changes. -- Frans Pop Fri, 05 Jun 2009 13:36:01 +0200 di-netboot-assistant (0.36c) unstable; urgency=low * Add Ubuntu Intrepid in di-sources.list (Thanks to Asheesh Laroia, Closes:#505738) * Warn if configuration file version number is incorrect. * New homepage * Fix typo in di-source.list. Closes: #493451, Thanks to Chris Lamb * Avoid garbage error message on 1st run. * Avoid "Upgrading pxelinux.0" false positive messages. -- Frank Lin PIAT Sat, 01 Nov 2008 17:07:11 +0100 di-netboot-assistant (0.36b) unstable; urgency=low * New SVN repository. -- Frank Lin PIAT Sat, 01 Nov 2008 15:07:11 +0100 di-netboot-assistant (0.36a) unstable; urgency=low * fix incorrect location of elilo.conf top menu, when an alternate extract location is specified. * Invoke curl with "--fail" to actually detect errors. Closes: #493664, Thanks to Chris Lamb for the patch. * Upgrade pxelinux.0 when the installed image has a newer one (Fix bug reported by Frans Pop). * fix lintian errors (debian-watch-file-in-native-package and debian-copyright-line-too-long). * Remove duplicate "MENU TITLE" in pxelinux.HEAD. Closes: #493549, Thanks to Chris Lamb for the patch. * Correct strange "( release , arch )" spacing in menu. Closes: #493544, Thanks to Chris Lamb for the patch. * Correct typo in "missing checksum" output message. Closes: #493428, Thanks to Chris Lamb. * Correct title of manpage. Closes: #493412, Thanks to Chris Lamb. * Document --rebuild-menu option, implemented in 0.36. * Change maintainer email fpiat@bigfoot.com -> fpiat@klabs.be -- Frank Lin PIAT Wed, 23 Jul 2008 08:20:13 +0200 di-netboot-assistant (0.36) unstable; urgency=low * Implement the command rebuild-menu. * Add dnsmasq as alternate dhcp and tftpd dependency (as suggested by Pietro Abate). * Document how to use dnsmasq. * Document that pxelinux.pathprefix="/" and that passing some DHCP options are mandatory (bug reported by Frans Pop). * Clarify error message when syslinux/elilo aren't installed. * Add IA64 overview menu in examples/dhcpd.conf.multiarch * Add example dhcpd.conf.simple. * Upload sponsored by Petter Reinholdtsen. -- Franklin Piat Sun, 13 Jul 2008 19:32:50 +0200 di-netboot-assistant (0.35) unstable; urgency=low * Implement MD5SUMS checkum checking (requested by Joey Hess). * Change the way unreachable mirrors are handled. * Fix path in pxelinux.HEAD * Upload sponsored by Petter Reinholdtsen. -- Franklin Piat Fri, 11 Jul 2008 00:26:10 +0200 di-netboot-assistant (0.34) unstable; urgency=low * Add an option to choose the mirror (actually, rewrite canonical URL). * Add etch-gtk, lenny-gtk entries, etc.. * Use the mirror ftp.de.debian.org by default (it has all archs !). * Fix location of images in di-sources.list (drop /debian prefix) * Re-add curl as alternate dependency to wget (was removed by mistake) * Add elilo as recommend dependency. -- Franklin Piat Tue, 08 Jul 2008 09:51:35 +0200 di-netboot-assistant (0.33) unstable; urgency=low * Fix location of sparc images in di-sources.list * Multiple improvements in the documenations, manpage, examples (thanks to Joey Hess). * Don't load french keymap (thanks to Joey Hess). * Don't use french mirrors in di-sources.list by default. * Add some wishlist from Joey Hess to the TODO list. -- Franklin Piat Tue, 08 Jul 2008 08:10:42 +0200 di-netboot-assistant (0.32) unstable; urgency=low * Policy version 3.8.0 (bumped in previous release): no changes required. * ITP (closes: #489812). -- Franklin Piat Tue, 08 Jul 2008 00:22:45 +0200 di-netboot-assistant (0.31) unstable; urgency=low * Policy version 3.7.3: no changes required. * Add Homepage: header to source package. * Update manpage and README.Debian. -- Franklin Piat Mon, 09 Jun 2008 23:47:59 +0200 di-netboot-assistant (0.30) unstable; urgency=low * No upgrade from pre 0.30 : purge, then install. * Support downloading/unpacking alpha, ia64, hppa and sparc. * Support IA64's elilo (update file path in elilo.conf). * Improve dhcpd.conf example file. * Add vim syntax file for di-sources.list (disources.vim). * Dependency changed to [wget|curl]. * Invoking "purge" without repository lists currently installed. * Don't build empty pxelinux.menu file (for ia64...) * Renamed pxelinux.cfg files renamed pxelinux.cfg/default * Renamed configuration file pxelinux.cfg.HEAD as pxelinux.HEAD -- Franklin Piat Tue, 03 Jun 2008 01:18:00 +0200 di-netboot-assistant (0.21) unstable; urgency=low * Add package description. * Remove dummy prerm. * Fix debian/control's Maintainer name case. * Improve README. * cleanup /etc/di-netboot-assistant/pxelinux.cfg.HEAD -- Franklin Piat Mon, 02 Jun 2008 23:51:56 +0200 di-netboot-assistant (0.20) unstable; urgency=low * Save information about downloaded repositories. -- Franklin Piat Fri, 16 May 2008 08:04:22 +0200 di-netboot-assistant (0.19) unstable; urgency=low * Package rename. * Print warning if no argument is passed. * Add dhcpd.conf example (untested!) -- Franklin PIAT Mon, 05 May 2008 02:14:20 +0200 dibas (0.18) unstable; urgency=low * Initial Public Release. -- Franklin PIAT Sun, 04 May 2008 12:42:15 +0200 di-netboot-assistant-0.38a/debian/compat0000644000000000000000000000000212170210117015156 0ustar 9 di-netboot-assistant-0.38a/debian/install0000644000000000000000000000023412170210117015350 0ustar di-netboot-assistant usr/bin/ config/* etc/di-netboot-assistant/ disources.vim usr/share/vim/addons/syntax/ debian/disources.yaml usr/share/vim/registry/ di-netboot-assistant-0.38a/debian/rules0000755000000000000000000000016112170210117015036 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ di-netboot-assistant-0.38a/config/0000755000000000000000000000000012170210117014003 5ustar di-netboot-assistant-0.38a/config/di-netboot-assistant.conf0000644000000000000000000000175511515466540020754 0ustar #Configuration file for di-netboot-assistant #TFTP root directory (for netboot). # You will have to adjust the directory according to the tftp server setting. TFTP_ROOT=/var/lib/tftpboot #Download Mirror # The variable MIRROR_REGEXPS contain a list of space separated sed # regular expression, to rewrite di-sources.list URLs, to match your # prefered mirror. for example : MIRROR_REGEXPS="s=://ftp.debian.org/=://ftp.de.debian.org/debian/=" # Debian-installer arguments. # The arguments listed here will be appended to the one provided by # in debian-installer pristine images (see di-netboot-assistant manpage). #DI_ARGS="locale=en_US console-keymaps-at/keymap=fr-latin1 mirror/country=manual mirror/http/hostname=http.de.debian.org mirror/http/directory=/debian mirror/http/proxy=" # Boot arguments for installed (target) system. # The arguments listed here will be appended to the one provided by # in debian-installer pristine images (see di-netboot-assistant manpage). #TARGET_ARGS="vga=791" di-netboot-assistant-0.38a/config/pxelinux.HEAD0000644000000000000000000000202011515466540016313 0ustar ## Run "di-netboot-assistant rebuild-menu" when you modify ## this file. ## # # Note: All TFTP filenames must be prefixed with "::/". see README file. #KBDMAP ::/debian-installer/pxelinux.cfg/french.kbd SAY (Press enter to display Debian-Installer overview menu) DEFAULT menu PROMPT 0 MENU TITLE Debian-Installer netboot overview menu #A sample entry, with your prefered settings #LABEL quick # MENU LABEL Debian Installer (Lenny ; i386 + Preseed) # kernel ::/debian-installer/lenny/i386/linux # append initrd=::/debian-installer/lenny/i386/initrd.gz ethdetect/use_firewire_ethernet=no locale=en_US console-keymaps-at/keymap=fr-latin1 vga=normal -- # #or# # #append initrd=::/debian-installer/lenny-gtk/i386/initrd.gz ethdetect/use_firewire_ethernet=no locale=en_US console-keymaps-at/keymap=fr-latin1 video=vesa:ywrap,mtrr vga=788 -- # # url=192.168.0.10 auto-install/enable=true # ######################################################################## LABEL menu MENU HIDE KERNEL ::/debian-installer/pxelinux.cfg/menu.c32 di-netboot-assistant-0.38a/config/di-sources.list0000644000000000000000000002157512170210117016767 0ustar #di-netboot-assistant v0.3 sources file # #Format: Each must contain four fields, separated by single tabulation. # 1st field: An arbitrary repository name (must match "[[:alnum:]_\.-]+") # 2nd field: The architecture (debian's architecture name) # 3rd field: The base URL to download files from (it should contain # a debian-installer folder) # (If you want to use a mirror, have a look at MIRROR_REGEXPS in # the file di-netboot-assistant.conf to rewrite the URL) # 4th field: That path to the actual netboot archive (or .img) file. # (relative to the "base URL" above). # Lines _starting_ with a "#" are considered as comments and are ignored. # Empty lines are ignored too. #Debian/Stable (( http://www.debian.org/distrib/netinst#netboot )) stable amd64 http://ftp.debian.org/dists/stable/main/installer-amd64/current/images/ netboot/netboot.tar.gz stable i386 http://ftp.debian.org/dists/stable/main/installer-i386/current/images/ netboot/netboot.tar.gz stable ia64 http://ftp.debian.org/dists/stable/main/installer-ia64/current/images/ netboot/netboot.tar.gz stable sparc http://ftp.debian.org/dists/stable/main/installer-sparc/current/images/ netboot/boot.img #Graphical Installer (GTK) stable-gtk amd64 http://ftp.debian.org/dists/stable/main/installer-amd64/current/images/ netboot/gtk/netboot.tar.gz stable-gtk i386 http://ftp.debian.org/dists/stable/main/installer-i386/current/images/ netboot/gtk/netboot.tar.gz #Debian/wheezy wheezy amd64 http://ftp.debian.org/dists/wheezy/main/installer-amd64/current/images/ netboot/netboot.tar.gz wheezy i386 http://ftp.debian.org/dists/wheezy/main/installer-i386/current/images/ netboot/netboot.tar.gz wheezy ia64 http://ftp.debian.org/dists/wheezy/main/installer-ia64/current/images/ netboot/netboot.tar.gz wheezy sparc http://ftp.debian.org/dists/wheezy/main/installer-sparc/current/images/ netboot/boot.img #Graphical Installer (GTK) wheezy-gtk amd64 http://ftp.debian.org/dists/wheezy/main/installer-amd64/current/images/ netboot/gtk/netboot.tar.gz wheezy-gtk i386 http://ftp.debian.org/dists/wheezy/main/installer-i386/current/images/ netboot/gtk/netboot.tar.gz #Debian/OldStable (( http://www.debian.org/distrib/netinst#netboot )) oldstable amd64 http://ftp.debian.org/dists/oldstable/main/installer-amd64/current/images/ netboot/netboot.tar.gz oldstable i386 http://ftp.debian.org/dists/oldstable/main/installer-i386/current/images/ netboot/netboot.tar.gz oldstable ia64 http://ftp.debian.org/dists/oldstable/main/installer-ia64/current/images/ netboot/netboot.tar.gz oldstable sparc http://ftp.debian.org/dists/oldstable/main/installer-sparc/current/images/ netboot/boot.img #Graphical Installer (GTK) oldstable-gtk amd64 http://ftp.debian.org/dists/oldstable/main/installer-amd64/current/images/ netboot/gtk/netboot.tar.gz oldstable-gtk i386 http://ftp.debian.org/dists/oldstable/main/installer-i386/current/images/ netboot/gtk/netboot.tar.gz #Debian/squeeze squeeze amd64 http://ftp.debian.org/dists/squeeze/main/installer-amd64/current/images/ netboot/netboot.tar.gz squeeze i386 http://ftp.debian.org/dists/squeeze/main/installer-i386/current/images/ netboot/netboot.tar.gz squeeze ia64 http://ftp.debian.org/dists/squeeze/main/installer-ia64/current/images/ netboot/netboot.tar.gz squeeze sparc http://ftp.debian.org/dists/squeeze/main/installer-sparc/current/images/ netboot/boot.img #Graphical Installer (GTK) squeeze-gtk amd64 http://ftp.debian.org/dists/squeeze/main/installer-amd64/current/images/ netboot/gtk/netboot.tar.gz squeeze-gtk i386 http://ftp.debian.org/dists/squeeze/main/installer-i386/current/images/ netboot/gtk/netboot.tar.gz #Debian/Jessie (not released yet, As of writing this file) #jessie amd64 http://ftp.debian.org/dists/jessie/main/installer-amd64/current/images/ netboot/netboot.tar.gz #jessie i386 http://ftp.debian.org/dists/jessie/main/installer-i386/current/images/ netboot/netboot.tar.gz #jessie ia64 http://ftp.debian.org/dists/jessie/main/installer-ia64/current/images/ netboot/netboot.tar.gz #jessie sparc http://ftp.debian.org/dists/jessie/main/installer-sparc/current/images/ netboot/boot.img ##Graphical Installer (GTK) #jessie-gtk amd64 http://ftp.debian.org/dists/jessie/main/installer-amd64/current/images/ netboot/gtk/netboot.tar.gz #jessie-gtk i386 http://ftp.debian.org/dists/jessie/main/installer-i386/current/images/ netboot/gtk/netboot.tar.gz # DEVELOPMENT (( http://www.debian.org/devel/debian-installer/ )) #beta1 or beta2 or beta3 or rc1 or rc2 testing amd64 http://ftp.debian.org/dists/testing/main/installer-amd64/current/images/ netboot/netboot.tar.gz testing i386 http://ftp.debian.org/dists/testing/main/installer-i386/current/images/ netboot/netboot.tar.gz testing ia64 http://ftp.debian.org/dists/testing/main/installer-ia64/current/images/ netboot/netboot.tar.gz testing sparc http://ftp.debian.org/dists/testing/main/installer-sparc/current/images/ netboot/boot.img #Graphical Installer (GTK) testing-gtk amd64 http://ftp.debian.org/dists/testing/main/installer-amd64/current/images/ netboot/gtk/netboot.tar.gz testing-gtk i386 http://ftp.debian.org/dists/testing/main/installer-i386/current/images/ netboot/gtk/netboot.tar.gz #Daily netboot DI images. Read : # http://d-i.debian.org/daily-images/build-logs.html # http://wiki.debian.org/DebianInstaller/Today daily alpha http://d-i.debian.org/daily-images/alpha/daily/ netboot/boot.img daily amd64 http://d-i.debian.org/daily-images/amd64/daily/ netboot/netboot.tar.gz daily hppa http://d-i.debian.org/daily-images/hppa/daily/ netboot/2.6/boot.img daily i386 http://d-i.debian.org/daily-images/i386/daily/ netboot/netboot.tar.gz daily ia64 http://d-i.debian.org/daily-images/ia64/daily/ netboot/netboot.tar.gz daily sparc http://d-i.debian.org/daily-images/sparc/daily/ netboot/boot.img #Graphical Installer (GTK) daily-gtk amd64 http://d-i.debian.org/daily-images/amd64/daily/ netboot/gtk/netboot.tar.gz daily-gtk i386 http://d-i.debian.org/daily-images/i386/daily/ netboot/gtk/netboot.tar.gz # ########### Obsolete distribution (unsupported) ########### # # Old (discontinued) distribution may work with di-netboot-assistant, or not! #Debian/Lenny # http://www.debian.org/releases/lenny/ lenny alpha http://archive.debian.org/dists/lenny/main/installer-alpha/current/images/ netboot/boot.img lenny amd64 http://archive.debian.org/dists/lenny/main/installer-amd64/current/images/ netboot/netboot.tar.gz lenny hppa http://archive.debian.org/dists/lenny/main/installer-hppa/current/images/ netboot/2.6/boot.img lenny i386 http://archive.debian.org/dists/lenny/main/installer-i386/current/images/ netboot/netboot.tar.gz lenny ia64 http://archive.debian.org/dists/lenny/main/installer-ia64/current/images/ netboot/netboot.tar.gz lenny sparc http://archive.debian.org/dists/lenny/main/installer-sparc/current/images/ netboot/boot.img #Graphical Installer (GTK) lenny-gtk amd64 http://archive.debian.org/dists/lenny/main/installer-amd64/current/images/ netboot/gtk/netboot.tar.gz lenny-gtk i386 http://archive.debian.org/dists/lenny/main/installer-i386/current/images/ netboot/gtk/netboot.tar.gz # ############ Some Debian Derivatives ################ # ## Ubuntu LTS Releases # Hardy Heron 8.04 hardy i386 http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/ netboot/netboot.tar.gz hardy amd64 http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-amd64/current/images/ netboot/netboot.tar.gz # Lucid Lynx 10.04 lucid i386 http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/ netboot/netboot.tar.gz lucid amd64 http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/ netboot/netboot.tar.gz # Precise Pangolin 12.04 precise i386 http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/ netboot/netboot.tar.gz precise amd64 http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/ netboot/netboot.tar.gz ## Ubuntu Normal Releases # Saucy Salamander 13.10 saucy i386 http://archive.ubuntu.com/ubuntu/dists/saucy/main/installer-i386/current/images/ netboot/netboot.tar.gz saucy amd64 http://archive.ubuntu.com/ubuntu/dists/saucy/main/installer-amd64/current/images/ netboot/netboot.tar.gz # Raring Ringtail 13.04 raring i386 http://archive.ubuntu.com/ubuntu/dists/raring/main/installer-i386/current/images/ netboot/netboot.tar.gz raring amd64 http://archive.ubuntu.com/ubuntu/dists/raring/main/installer-amd64/current/images/ netboot/netboot.tar.gz # Quantal Quetzal 12.10 quantal i386 http://archive.ubuntu.com/ubuntu/dists/quantal/main/installer-i386/current/images/ netboot/netboot.tar.gz quantal amd64 http://archive.ubuntu.com/ubuntu/dists/quantal/main/installer-amd64/current/images/ netboot/netboot.tar.gz # Oneiric Ocelot 11.10 oneiric i386 http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-i386/current/images/ netboot/netboot.tar.gz oneiric amd64 http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-amd64/current/images/ netboot/netboot.tar.gz # vim: ft=disources di-netboot-assistant-0.38a/config/elilo.HEAD0000644000000000000000000000104111515466540015545 0ustar ## Run "di-netboot-assistant rebuild-menu" when you modify ## this file. ## chooser=textmenu default=install ##default=quick delay=999 prompt relocatable #A sample entry, with your prefered settings NOT TESTED !!! #image=debian-installer/lenny/ia64/vmlinuz # label=quick # description="Quick" # initrd=debian-installer/lenny/ia64/initrd.gz # append="ethdetect/use_firewire_ethernet=no locale=en_US console-keymaps-at/keymap=fr-latin1 vga=normal --" # read-only # # url=192.168.0.10 auto-install/enable=true ## vim: ft=conf