News | About | Get Frugalware | Packages | Documentation | Discussion Forums | Bug Tracker | Wiki | Community | Development

Network Install

From FrugalWiki

Jump to: navigation, search

As of 0.6, Frugalware supports installation from a network. This means that you can have, for example, client machines that have automated installation of Frugalware from a server. The features of this system are:

  • The installer can be booted via PXE with TFTP.
  • [Not done] The installer can get packages from a NFS server
  • [Not done] The installer can be automated with a script to provide unattended installs

Contents

Prerequisites

For this tutorial you will need the following:

  • A server running Frugalware
  • One or more machines to act as clients. These need either a network interface with a PXE boot ROM or a network interface that is supported by GRUB or Etherboot
  • A cup of coffee/tea/coke/whatever beverage

Getting it to run - DHCP

Additional prerequisities for this method:

  • A DHCP server installed on your server machine. Either dhcp or dnsmasq are suitable. There must not be another DHCP server on your network.

Install the necessary software

Install your DHCP server of choice. For dnsmasq:

pacman-g2 -S dnsmasq

For ISC's dhcpd:

pacman-g2 -S dhcp

Install other required software:

pacman-g2 -S grub tftp-hpa inetd

If using ISC's dhcpd, this configuration file may work (or may not), but hasn't been tested since dhcpd will not work in my network. This should be put to /etc/dhcpd.conf:

option domain-name "mydomainname";
default-lease-time 600;
max-lease-time 7200;
ddns-update-style ad-hoc;

subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.1 192.168.1.30;
}
option option-150 "/menu.lst"; 
filename "/pxegrub";

Tweak this to your liking. Of course, if you already have dhcp set up, you can simply add the option-150 and filename lines to your existing configuration.

If you are using dnsmasq, this configuration will work:

domain-needed
bogus-priv
local=/mydomainname/
domain=mydomainname
dhcp-range=192.168.1.10,192.168.1.100,255.255.255.0,6h
dhcp-boot=/pxegrub,myserverhostname,192.168.0.1
dhcp-option=150,/grub.lst

You *MUST* replace myserverhostname with the hostname of your server and 192.168.0.1 with the IP address of your server. If you have already configured dnsmasq, just add the dhcp-boot and dhcp-option lines.

Now, open /etc/inetd.conf, and add this line at the bottom:

tftp  dgram   udp     wait    root    /usr/sbin/tcpd /usr/sbin/in.tftpd -s /tftpboot -r blksize

Create /tftpboot:

mkdir /tftpboot

And restart inetd:

/etc/rc.d/rc.inetd restart

Configure tftp

Let's start by getting a Frugalware netinstall - we need the kernel and initrd from it. In this example, I'll use 0.6pre1's netinstall. You'll have to modify the kernel copying line, I'm not sure of the exact filename of it. You *MUST* include -i686 on the end of the kernel filename in /tftpboot.

wget http://ftp.frugalware.org/pub/frugalware/frugalware-testing-iso/frugalware-0.6pre1-i686-net.iso
mount -o loop frugalware-0.6pre1-i686-net.iso /mnt
cp /mnt/boot/initrd-i686.img.gz /tftpboot/
cp /mnt/boot/vmlinuz-2.6.19-fw2 /tftpboot/vmlinuz-2.6.19-fw2-i686
umount /mnt

Now download the mktftpgrublst.sh script:

wget http://ftp.frugalware.org/pub/frugalware/frugalware-current/tools/mktftpgrublst.sh
wget http://ftp.frugalware.org/pub/frugalware/frugalware-current/docs/xml/volumes.xml

Now run:

sh mktftpgrublst.sh --dhcp

If you want to password protect the network boot, you should run this instead, replacing <password> with a password of your choice:

sh mktftpgrublst.sh --dhcp --password "<password>"

This will create a file called menu.lst. Move it to /tftpboot

mv menu.lst /tftpboot/

Now copy pxegrub to /tftpboot:

cp /usr/lib/grub/i386-pc/pxegrub /tftpboot/

Now you should be set up to boot from the network. Get a machine that can boot via PXE and attempt to boot with PXE. If all goes well, you should get a GRUB prompt. Select the Frugalware entry and enter your password if you chose to use one.

Personal tools
Namespaces
Variants
Actions