Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I configured isc-dhcp, ipxe and tftpboot so I can boot over network via PXE. It works the ubuntu netinstall image is booting nice with pxelinux.0.

I created a custom live cd with this tutorial https://help.ubuntu.com/community/LiveCDCustomizationFromScratch. It boots nicely in an VM.

Now I wan't to connect this image to my pxe environment. The best would be to boot and append the disk via http. There are plenty of tutorials. But I can't get the squashfs mounted. What is the best way to do this. Do I need pxelinux, do I need NFS? I'm confused about all the different bootloaders.

Help is highly appreciated. Thank you.

part of dhcpd.conf

next-server 10.1.1.1;
if exists user-class and option user-class = "iPXE" {
   filename "menu.ipxe";
} else {
   filename "undionly.kpxe";
}

and menu.ipxe

#!ipxe

set smartos-build 20121004T212912Z

######## MAIN MENU ###################
:start
menu Welcome
item
item --gap -- ------------------------- Operating systems ------------------------------
item cellos-storage     Boot CellOS
item smartos    Boot SmartOS (${smartos-build})
item ubuntu     Boot Ubuntu Precise 12.04 netinstall
item --gap -- ------------------------------ Utilities ---------------------------------
item shell      Enter iPXE shell
item reboot     Reboot
item
item exit       Exit (boot local disk)
choose --default cellos-storage --timeout 5000 target && goto ${target}




########## UTILITY ITEMS ####################
:shell
echo Type exit to get the back to the menu
shell
set menu-timeout 0
goto start

:reboot
reboot

:exit
exit

########## MENU ITEMS #######################


:cellos-storage
kernel /cellos/storage/cellos-latest/casper/vmlinuz
initrd /cellos/storage/cellos-latest/casper/initrd.lz
#chain http://10.1.1.1/boot/cellos/storage/cellos-latest.iso
boot

# SmartOS Root shadow is "root"
:smartos
kernel /smartos/${smartos-build}/platform/i86pc/kernel/amd64/unix -B root_shadow='$5$2HOHRnK3$NvLlm.1KQBbB0WjoP7xcIwGnllhzp2HnT.mDO7DpxYA'
initrd /smartos/${smartos-build}/platform/i86pc/amd64/boot_archive
boot
:ubuntu
kernel /ubuntu/precise/netinstall/ubuntu-installer/amd64/linux
initrd /ubuntu/precise/netinstall/ubuntu-installer/amd64/initrd.gz
boot
goto start
share|improve this question

1 Answer 1

Did this with Linux Mint 13, but should be the same with Ubuntu 12.04. I used mintconstructor to customize my live-dvd but should work LiveCDCustomizationFromScratch.

I was able to configure net booting from a live-dvd using only iPXE (no pxelinux).

To do so, I configured a http server (with apache) to publish content in /var/www. It's necessary because the initrd and vmlinuz need to be accessible through http.

I took the initrd.lz and vmlinuz from the live-dvd and put it into /var/www

Took all the files in /casper (from live-dvd) and put it in /var/www/casper.

On your web server, publish also an NFS share of /var/www so the files are also accessible through NFS. That is necessary for accessing the squashfs (casper folder) through the network (doesn't seem to work through http).

Here's my /etc/exports (NFS)

/var/www *(ro,async)

Your iPXE script should look like this (replace the IP accordingly) :

#!ipxe
initrd http://10.54.9.43/initrd.lz
chain http://10.54.9.43/vmlinuz boot=casper netboot=nfs nfsroot=10.54.9.43:/var/www/ initrd=initrd.lz

That will load the kernel and initrd through http, and the squashfs through NFS...

About the DHCP part, I'm using a Windows Server DHCP ... so I could not help you. Follow the documentation of iPXE. For others, here's what I did : I configured a TFTP server on the same server (linux). I configured option 66 to the IP of that server (on the DHCP server). I put undionly.kpxe (iPXE) in the TFTP folder of my server to chainload iPXE (check iPXE doc). I configured option 67 as specified in the iPXE doc to prevent an infinite loop (because of the chainload).

All this was a bit diffult for me to find out because there's not much documentation about this on the web.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.