web-dev-qa-db-fra.com

Comment convertir un LiveCD en vmlinuz et initialiser au démarrage PXE

Je dois créer un chargeur de démarrage PXE d’urgence pour un LIVECD (pas le petit cd ubuntu netboot, mais plutôt un livecd de bureau pour démarrer à partir de la ligne de commande). Est-ce que ça va marcher:

# Create a cpio archive of just the ISO and append it to the initrd image. 
( echo "ubuntu-13.10-desktop-AMD64.iso" | cpio -H newc --quiet -o ) |  gzip -9 |   cat ubuntu-13.10-desktop-AMD64.iso_EXTRACTED/casper/initrd0.img - > tftpboot/initrd0.img

# Kernel image.
cp ubuntu-13.10-desktop-AMD64.iso_EXTRACTED/isolinux/vmlinuz0 tftpboot/vmlinuz0

# pxelinux bootloader part:
LABEL pxeboot
    KERNEL vmlinuz0
    APPEND initrd=initrd0.img root=/ubuntu-13.10-desktop-AMD64.iso             rootfstype=iso9660 rootflags=loop
ONERROR LOCALBOOT 0

Qu'est-ce que je fais mal?

2
Bran

Cette configuration charge l’ensemble de l’image via un protocole lent, tel que TFTP.

  • Essayez une autre option en utilisant le protocole NFS.

    apt-get install nfs-kernel-server
    
    mkdir /mnt/ubuntu
    mount -o loop ubuntu-13.10-desktop-AMD64.iso /mnt/ubuntu-desktop-cd
    
  • Partagez-le via NFS

    Sudo nano /etc/exports
    

    Ajouter cette ligne

    /mnt/ubuntu-desktop-cd 192.168.0.0/24(ro,insecure,no_root_squash,async,no_subtree_check)
    
  • Démarrer le service NFS

    service nfs-kernel-server restart
    
  • Dans la ligne APPEND, remplacez root, rootfstype et rootfstype par:

    netboot=nfs nfsroot=192.168.0.10:/mnt/ubuntu-desktop-cd
    

Remarque : J'ai utilisé ces adresses IP à titre d'exemple.

192.168.0.10 est l'IP du serveur NFS

192.168.0.0/24 Est la plage du réseau local.

Voir https://help.ubuntu.com/community/Installation/LocalNet#A_variation:_Booting_the_.22Live_CD.22_image

1
user.dz