Installazione di Clonezilla Live su Debian: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 135: Line 135:
*[http://clonezilla.org/clonezilla-live/livepxe.php Clonezilla Live on PXE server]
*[http://clonezilla.org/clonezilla-live/livepxe.php Clonezilla Live on PXE server]
*[http://www.debian-administration.org/articles/478 Setting up a server for PXE network booting]
*[http://www.debian-administration.org/articles/478 Setting up a server for PXE network booting]
*[http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=404760 #404760 - inetutils-inetd: [in.tftpd-hpda] received address was not AF_INET - Debian Bug report logs]

Revision as of 12:01, 13 January 2010

Utilizzare CLonezilla Live consente di avere un ambiente Clonezilla SENZA modifiche automatiche ai servizi del server ospitante, ed una configurazione univoca del Boot PXE.

Impostazioni variabili per script

export TFTPSERVER=192.168.0.9

Installazione server TFTP

sudo apt-get install tftpd-hpa

Partenza con inetd

  │ Should the server be started by inetd?                                  │   
  │                                                                         │   
  │                    <Yes>                                                │
  • Impostare la directory di boot in
sudoedit /etc/inetd.conf
tftp           dgram   udp     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /files/tftpboot


  • Per Lenny, se installa inetutils-inetd invece di openbsd-inetd,c orreggere udp in udp4:
sudoedit /etc/inetd.conf
tftp           dgram   udp4     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /files/tftpboot

Altrimenti si ottiene nel syslog:

Jan 13 12:51:10 fireman in.tftpd[5137]: received address was not AF_INET, please check your inetd config
Jan 13 12:51:10 fireman inetd[3884]: /usr/sbin/in.tftpd: exit status 0x4c00


  • Riavviare inetd

Per Etch:

sudo invoke-rc.d openbsd-inetd restart

Per Lenny:

sudo invoke-rc.d inetutils-inetd restart

Partenza come demone standalone

  │ Should the server be started by inetd?                                  │   
  │                                                                         │   
  │                                             <No>                        │

Impostare la directory dei files di boot

sudoedit /etc/default/tftpd-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /files/tftpboot"

Avviarlo

sudo invoke-rc.d tftpd-hpa restart

Configurazione del server DHCP

Aggiungere le seguenti opzioni

sudoedit /etc/dhcp3/dhcpd.conf
filename "pxelinux.0";
next-server $TFTPSERVER;

Dove 192.168.0.9 corrisponde all'indirizzo IP del server TFTP

Testare la configurazione

sudo dhcpd3 -t

Riavviare il server DHCP

sudo invoke-rc.d dhcp3-server restart

Creazione dell'ambiente di boot PXE

  • Creare la gerarchia di directory dove ospitare i files di boot:
sudo mkdir -p /files/tftpboot/pxelinux.cfg/
  • Creare il file con la voce di Boot:
cat | sudo tee /files/tftpboot/pxelinux.cfg/default <<EOFile
DISPLAY boot.txt

DEFAULT Clonezilla_Live

label Clonezilla_Live
        kernel vmlinuz
        append initrd=initrd.img boot=live union=aufs noswap noprompt vga=788 ip=frommedia fetch=tftp://$TFTPSERVER/filesystem.squashfs ocs_live_keymap="/usr/share/keymaps/i386/qwerty/it.kmap.gz" ocs_lang="en_US.UTF-8"

PROMPT 1
TIMEOUT 5
EOFile

Creare il file di testo che verrà mostrato al boot PXE:

cat | sudo tee /files/tftpboot/pxelinux.cfg/boot.txt <<EOFile
                            - TFTP Boot Server -
================================================================================

This TFTP Server will boot the default image Clonezilla_Live within 5 seconds.
Press ENTER to go on without waiting

================================================================================
EOFile

Scaricare il file di boot PXE:

sudo wget http://ftp.uk.debian.org/debian/dists/etch/main/installer-i386/current/images/netboot/debian-installer/i386/pxelinux.0 -O /files/tftpboot/pxelinux.0
cd /tmp
wget http://switch.dl.sourceforge.net/sourceforge/clonezilla/clonezilla-live-1.2.3-24.zip


  • Scompattare i files necessari nella directory di boot:
sudo unzip -j clonezilla-live-*.zip \
           live/vmlinuz \
           live/initrd.img \
           live/filesystem.squashfs \
           -d /files/tftpboot/

Ora è possibile fare il BOOT via PXE e scegliere Clonezilla. Da qui in poi si può scegliere dove scrivere/leggere le immagini via nfs/smb/ etc ...

Riferimenti