rss logo

Comment installer Lubuntu depuis un boot PXE

Configuration

Intro

Je voulais installer Lubuntu sur un vieil ordinateur qui avait un lecteur CD-ROM cassé et dont le démarrage USB n'était pas possible. J'ai donc décidé de l'installer via PXE.

Schéma

Nous avons besoin ici d'un serveur PXE (J'ai simplement démarré un poste sur un Live CD Lubuntu Live CD) et un accès Internet (pour l'installation via l'alternate ISO).

Serveur PXE

Installation

Nous avons besoin d'installer les trois services suivants.

  • nfs : partage de fichier
  • dhcp : configuration ip automatique
  • tftp : protocole de transfert de fichier
root@host:~# apt-get install isc-dhcp-server tftpd-hpa pxelinux nfs-kernel-server

dhcp

  • Éditer le fichier /etc/dhcp/dhcpd.conf :
ddns-update-style none; option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600; max-lease-time 7200; log-facility local7; subnet 192.168.10.0 netmask 255.255.255.0 { range 192.168.10.100 192.168.10.200; option routers 192.168.10.254; option domain-name-servers 192.168.10.254; filename "pxelinux.0"; }

tftp

  • Éditer le fichier /etc/default/tftpd-hpa :
TFTP_USERNAME="tftp" TFTP_DIRECTORY="/var/lib/tftpboot" #TFTP_ADDRESS="[::]:69" TFTP_ADDRESS="192.168.10.40:69" TFTP_OPTIONS="--secure"

nfs

  • Éditer le fichier /etc/exports :
/var/lib/tftpboot/16.10 *(async,no_root_squash,no_subtree_check,ro)

ISO

Télécharger le fichier iso.

  • Une fois téléchargé, monter l'ISO :
root@host:~# mkdir /var/lib/tftpboot/16.10/; mount -t iso9660 lubuntu-16.10-desktop-i386.iso /var/lib/tftpboot/16.10/

Menu de démarrage

  • Éditer le fichier /var/lib/tftpboot/pxelinux.cfg/default :
DEFAULT menu.c32 ENU MARGIN 0 ENU ROWS -9 ENU TABMSG ENU TABMSGROW -3 ENU CMDLINEROW -3 ENU HELPMSGROW -4 ENU HELPMSGENDROW -1 ENU COLOR SCREEN 30;47 ENU COLOR BORDER 30;47 ENU COLOR TITLE 30;47 ENU COLOR SCROLLBAR 30;47 ENU COLOR SEL 37;40 ENU COLOR UNSEL 30;47 ENU COLOR CMDMARK 30;47 ENU COLOR CMDLINE 30;47 ENU COLOR TABMSG 37;40 ENU COLOR DISABLED 37;40 ENU COLOR HELP 37;40 ENU TITLE Ubuntu Live LABEL 1 Ubuntu Live KERNEL 16.10/casper/vmlinuz APPEND boot=casper rootfstype=nfs netboot=nfs nfsroot=192.168.10.40:/var/lib/tftpboot/16.10 debian-installer/language=fr console-setup/layoutcode=fr console-setup/variantcode=oss quiet splash initrd=16.10/casper/initrd.lz --
  • Copie des fichiers :
root@host:~# cp /var/lib/tftpboot/16.10/isolinux/ldlinux.c32 /var/lib/tftpboot/ root@host:~# cp /var/lib/tftpboot/16.10/isolinux/libutil.c32 /var/lib/tftpboot/ root@host:~# cp /usr/lib/syslinux/modules/bios/menu.c32 /var/lib/tftpboot/ root@host:~# cp /usr/lib/PXELINUX/pxelinux.0 /var/lib/tftpboot/
  • Redémarrer les Services :
root@host:~# service isc-dhcp-server restart; service nfs-kernel-server restart; service tftpd-hpa restart

Si le poste de destination à moins de 700M RAM

Si comme moi, vous avez moins de 700M RAM, l'ordinateur freezera pendant l'installation, nous aurons donc besoin de l'ISO alternate.

  • Télécharger et monter l'ISO Alternate :

Télécharger le fichier ISO.

Note : il semble que l'iso Alternate iso n'est plus maintenue. root@host:~# mkdir /var/lib/tftpboot/16.10/; mount -t iso9660 lubuntu-16.10-alternate-i386.iso /var/lib/tftpboot/16.10/
  • Copier les fichiers :
root@host:~# cat /var/lib/tftpboot/16.10/install/netboot/ubuntu-installer/i386/pxelinux.cfg/default > /var/lib/tftpboot/pxelinux.cfg/default root@host:~# cp -a /var/lib/tftpboot/16.10/install/netboot/ubuntu-installer /var/lib/tftpboot/ root@host:~# cp /var/lib/tftpboot/16.10/install/netboot/ubuntu-installer/i386/boot-screens/ldlinux.c32 /var/lib/tftpboot/ root@host:~# cp /var/lib/tftpboot/16.10/install/netboot/ubuntu-installer/i386/pxelinux.0 /var/lib/tftpboot/

Sources :

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address