3

I need to make a emergency PXE bootloader for a LIVECD (not the ubuntu netboot small cd, but rather a desktop livecd to boot from the command line). Will this work:

# 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

What am i doing wrong?

Bran
  • 785
  • 3
  • 10
  • 19

1 Answers1

2

That configuration loads the whole image through a slow protocol like TFTP.

  • Try other option using NFS protocol.

    apt-get install nfs-kernel-server
    
    mkdir /mnt/ubuntu
    mount -o loop ubuntu-13.10-desktop-amd64.iso /mnt/ubuntu-desktop-cd
    
  • Share it through NFS

    sudo nano /etc/exports
    

    Add this line

    /mnt/ubuntu-desktop-cd 192.168.0.0/24(ro,insecure,no_root_squash,async,no_subtree_check)
    
  • Start NFS service

    service nfs-kernel-server restart
    
  • In APPEND line, replace root, rootfstype and rootfstype with:

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

Note: I used these IP's just as an example.

192.168.0.10 is IP of the NFS server

192.168.0.0/24 Is local network range.

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

user.dz
  • 48,105
  • I've tried this to boot the avlinux livecd over PXE. The initial boot works, but then it dies with an kernel exception. I suspect the livecd must have some explicit support for this, or it would not work. – markus_b May 13 '14 at 11:13
  • @markus_b, have you tried booting avlinux with a ubuntu kernel? – user.dz Sep 26 '14 at 06:02