See also PreSeed for more information about the Debian Installer preseeds booted by the PXE menus.

Attention, il y a un gros ménage en cours ici, voir 9491. -- TheAnarcat 2015-06-08 15:46:46

Gérer les installs debian

How to add an image to the netboot menu

The netboot menu is configured at /srv/tftp/pxelinux.cfg/default The sections of this file correspond to the different menus in the ncurses netboot interface for PXE.

Each option in the menu has a configuration block, for example:

LABEL stretch-amd64-ttyS0

So adding an image to the menu only requires adding a new configuration block like this.

After the changes to the file are saved, run this command to update the menu: root@netboot0:/srv/tftp/pxelinux.cfg# di-netboot-assistant --verbose rebuild-menu

New release configuration

When there is a new Debian release, the configuration needs to be updated. You need to add a new line as above for the PXE, and port the Preseed configuration, see PreSeed for more information.

Si on veut juste l'installeur, on doit s'assurer que la nouvelle distro est disponible dans le fichier puppet/modules/netboot/files/di-sources.list comme on a le serveur dans puppet. Sinon, dans /etc/di-netboot-assistant/di-sources.list

Si la distro, n'est pas là, mettre le fichier à jour avec la version de sid https://packages.debian.org/sid/di-netboot-assistant

Ensuite, lancer la commande

# di-netboot-assistant install stretch --arch=amd64

Mettre à jour une release

On peut installer un package qui contient l'installeur et qui sera mis à jour pour nous. Par exemple pour l'installeur stretch netboot:

apt install debian-installer-9-netboot-amd64

Une fois que c'est installé, on n'aura normalement plus besoin de mettre à jour manuellement.

Quelques fois, on veut mettre à jour l'iso d'une release pour avoir la dernière "point release". Ça peut être utile pour se tenir à jour. Mais aussi il peut y avoir des drôles de bugs quand les choses sont pas à jour. Par exemple ext4 pourrait ne pas être visible dans les options de partitionnement et quand ça se produit, il y a des erreurs de symboles dans le driver ext[234] sur la console.

Pour mettre à jour une distro, dans cet exemple wheezy:

di-netboot-assistant --verbose install wheezy

Ajouter les firmwares non-free à l'image

  1. Configurer le source dans /etc/di-netboot-assistant/di-netboot-assistant.conf, eg.

    NONFREE_FW="https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/"
  2. Mettre à jour un ou plusieurs releases:

    di-netboot-assistant fw-toggle buster

Stressant

Stressant est un outil pour booter en Debian "live" et faire des tests lorsqu'on a une nouvelle machine (mais peut aussi être utile pour dépanner les anciennes).

Manque de documentation ici, voir 17592

Git and git-annex

On netboot servers, the /srv/tftp repository is managed through git and git-annex For security reasons (to avoid escalation between servers), the repositories are not directly connected to each other, so you need to use your workstation to exchange changes between servers:

desktop0$ git clone netboot0.koumbit.net:/srv/tftp
desktop0$ cd tftp
desktop0$ git rename origin netboot0
desktop0$ git remote add netboot1 netboot1.office.koumbit.net:/srv/tftp
desktop0$ git remote update

The above will setup the two repositories on your local workstation. The following would then push the changes to netboot0, as the netboot1 branch.

desktop0$ git push netboot0 netboot1/master:netboot1

Then, on netboot0, you would merge that branch in:

netboot0$ git merge netboot1

The idea behind this hack is to avoid the "push on a non-bare repository" problem, well described in this stackoverflow discussion.

Note that this doesn't synchronise the special git-annex branch between the repositories. For this, you need to use git-annex. So again, on your workstation:

desktop0$ git annex sync netboot1

... will sync with netboot1. To sync with all remotes, use:

desktop0$ git annex sync

Note that this only synchronises metadata (file locations, checksums, etc), to synchronise actual files, use:

desktop0$ git annex get --not --in netboot1 stressant/
desktop0$ git annex move --to netboot1 stressant/

Testing and debugging

Testing with Qemu

After configuring the DHCP Service, i did some testing with qemu.

We need to generate a test.img with:

qemu-img create test.img 350M

VNC allows outside connexions with:

vncviewer puppet.koumbit.net:1

Testing PXE boot

I installed qemu on shell and followed those instructions to enable the PXE boot, namely downloading a ISO image.

Unfortunatly, that doesn't work well with qemu as it sets up a virtual interface and answers with its own DHCP server. So we need to run qemu straight on puppet, with this:

qemu -vnc :1 -cdrom gpxe-0.9.3-ns8390.iso -boot d -tftp /tftpboot -bootp pxelinux.0  -net nic -net user test.img

The tftp server within qemu doesn't seem to work properly. But we tested the PXE onsite and it works.

Testing ISO boot

Since PXE boot doesn't work with qemu, we're going to test the preseed with the netinst ISO:

qemu -cdrom debian-40r4a-etchnhalf-i386-netinst.iso -net user -net nic test.img -hda test.img -hdb test2.img

Note how we added -hda and -hdb to test RAID...

More information on how to use qemu is available in the Qemu page.

Testing preseeds

See PreSeed.

Big disks

This text was used to make a preseed that harmonize GPT + mdadm + lvm + ext4: http://cptyesterday.wordpress.com/2012/07/20/get-expert_recipe-mdraid-lvm-gpt-and-grub2-playing-together-on-ubuntu-lucid-and-debian-squeeze/

Our preseeds do not currently support that, see the README.gpt file for more information.

debug a netinstall

~ # mkdir /target
~ # mount /dev/root/slash /target
~ # mount --bind /dev /target/dev
~ # mount -t proc /proc /target/proc
~ # mount -t sysfs /sys /target/sys
~ # chroot /target

~ # umount /target/dev
~ # umount /target/sys
~ # umount /target/proc
~ # umount /target

A voir le config de une option netboot

Par exemple, dans le bureau Koumbit:

http://netboot/d-i/wheezy/server-dom0.cfg


CategoryMaintenance

PxeMaintenance (last edited 2022-09-28 09:30:50 by KoumbitAdmin)