THIS IS A WORK IN PROGRESS
I wanted to be able to pxe boot gparted or clonezilla whenever I needed them. I do not want to burn disks or use flash drives for booting. Here is the result of my trials. I hope this helps out anyone trying to do the same with their pogoplug. As always test it out and provide feedback!
THIS TUTORIAL ASSUMES
- POGO-E02 with Arch Linux ARM installed and configured.
- USB powered USB drive.
- systemd on Arch Linux ARM.
- Transmission on Arch Linux ARM to download LXLE to the Pogoplug.
- Download location for install media. Mine is /media/usb/share/software.
- A client PC capable of PXE booting.
DOWNLOAD AND PREP INSTALL MEDIA
- Download LXLE official install media from http://www.lxle.net/download. As of this writing the only way to download the media is from torrent. I have transmission installed on my pogoplug for these purposes. This is how I downloaded LXLE.
# location of the my completed download
/media/usb/share/software/lxle-12044-32.iso
- Download clonezilla live official install media.
cd /media/usb/share/software/
wget 'http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/2.2.4-12/clonezilla-live-2.2.4-12-i486.iso/download'
# resulting file was named 'download', so rename it
mv download clonezilla-live-2.2.4-12-i486.iso
- Download gparted live official install media.
wget 'http://downloads.sourceforge.net/gparted/gparted-live-0.19.1-4-i486.iso'
- Create the tftpboot folder structure needed. This is where the needed files for pxe booting will reside. It is also where we will create our menus and mount our cd/dvdrom images.
mkdir -p /tftpboot/{syslinux,pxelinux.cfg,menus,images/32bit/{lxle/12.0.4.4,gparted/0.19.1-4,clonezilla/2.2.4-12}}
- Mount the install media
mount -o loop,ro /media/usb/share/software/lxle-12044-32.iso /tftpboot/images/32bit/lxle/12.0.4.4
mount -o loop,ro /media/usb/share/software/clonezilla-live-2.2.4-12-i486.iso /tftpboot/images/32bit/clonezilla/2.2.4-12
mount -o loop,ro /media/usb/share/software/gparted-live-0.19.1-4-i486.iso /tftpboot/images/32bit/gparted/0.19.1-4
- To have the isos mount on boot insert the following entries in /etc/fstab. I do not do this.
nano /etc/fstab
/media/usb/share/software/lxle-12044-32.iso /tftpboot/images/32bit/lxle/12.0.4.4 iso9660 loop 0 0
/media/usb/share/software/clonezilla-live-2.2.4-12-i486.iso /tftpboot/images/32bit/clonezilla/2.2.4-12 iso9660 loop 0 0
/media/usb/share/software/gparted-live-0.19.1-4-i486.iso /tftpboot/images/32bit/gparted/0.19.1-4 iso9660 loop 0 0
DNSMASQ AND PXELINUX INSTALLATION
- Install the necessary software on the Pogoplug E02. dnsmasq will act as a tftp server as well as a proxy dhcp to my router. udisks2 is needed to avoid an error noted in the TEST RESULTS section.
pacman -S dnsmasq udisks2
- Download the syslinux bootloader package. It contains the pxe binaries we will use to setup the system.
wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz
- Extract the package.
tar -xJf syslinux-6.03.tar.xz
- Copy the needed files and dependencies from syslinux.
cd syslinux-6.03
cp bios/core/pxelinux.0 /tftpboot
cp bios/com32/elflink/ldlinux/ldlinux.c32 /tftpboot/syslinux
cp bios/com32/menu/vesamenu.c32 /tftpboot/syslinux
cp bios/com32/libutil/libutil.c32 /tftpboot/syslinux
cp bios/com32/lib/libcom32.c32 /tftpboot/syslinux
cp bios/com32/chain/chain.c32 /tftpboot/syslinux
DNSMASQ AND PXELINUX CONFIGURATION
- Configure dnsmasq. I have a router that acts as a dhcp server. Therefore I will be using dnsmasq only as a proxy dhcp and tftp server.
mkdir /etc/dnsmasq.d
nano /etc/dnsmasq.d/pxe.conf
# function as a tftp server
enable-tftp
# root directory for files available via ftp.
tftp-root=/tftpboot
# the boot filename
dhcp-boot=/tftpboot/pxelinux.0
# kill multicast
dhcp-option=vendor:PXEClient,6,2b
# disable reuse of the dhcp servername and filename fields as extra.
# option space. to avoid confusing some old or broken dhcp clients.
dhcp-no-override
# PXE menu
pxe-prompt="Press F8 for boot menu", 20
# The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
# Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
pxe-service=X86PC, "Boot from network", pxelinux
# A boot service type of 0 is special, and will abort the
# net boot procedure and continue booting from local media.
pxe-service=X86PC, "Boot from local hard disk", 0
# This range(s) is for the public interface, where dnsmasq functions
# as a proxy DHCP server providing boot information but no IP leases.
# Any ip in the subnet will do, so you may just put your server NIC ip here.
# I used my router ip address
dhcp-range=192.168.1.2,proxy,255.255.255.0
# router/gateway ip address
dhcp-option=3,192.168.1.2
# dns server ip address
dhcp-option=6,192.168.1.2
# enable logging
log-dhcp
log-queries
- Make sure dnsmasq pulls in pxe.conf from the above step.
nano /etc/dnsmasq.conf
# locate and uncomment the below line
conf-dir=/etc/dnsmasq.d
- Set up the main PXE menu.
nano /tftpboot/pxelinux.cfg/pxe.conf
MENU TITLE PXE Server
NOESCAPE 1
ALLOWOPTIONS 1
PROMPT 0
menu width 80
menu rows 14
MENU TABMSGROW 24
MENU MARGIN 10
menu color border 30;44 #ffffffff #00000000 std
- Create the default PXE configuration file.
nano /tftpboot/pxelinux.cfg/default
DEFAULT syslinux/vesamenu.c32
TIMEOUT 600
ONTIMEOUT BootLocal
PROMPT 0
MENU INCLUDE pxelinux.cfg/pxe.conf
NOESCAPE 1
LABEL BootLocal
COM32 syslinux/chain.c32
APPEND hd0
TEXT HELP
Boot to local hard disk
ENDTEXT
MENU BEGIN Linux
MENU TITLE Linux
LABEL Previous
MENU LABEL Previous Menu
TEXT HELP
Return to previous menu
ENDTEXT
MENU EXIT
MENU SEPARATOR
MENU INCLUDE menus/linux.menu
MENU END
MENU BEGIN Tools and Utilities
MENU TITLE Tools and Utilities
LABEL Previous
MENU LABEL Previous Menu
TEXT HELP
Return to previous menu
ENDTEXT
MENU EXIT
MENU SEPARATOR
MENU INCLUDE menus/utilities.menu
MENU END
- Create the secondary linux menu.
nano /tftpboot/menus/linux.menu
LABEL 1
MENU LABEL LXLE 32Bit 12.0.4.4 LIVE
LINUX images/32bit/lxle/12.0.4.4/casper/vmlinuz
INITRD images/32bit/lxle/12.0.4.4/casper/initrd.gz
APPEND file=images/32bit/lxle/12.0.4.4/preseed/custom.seed boot=casper acpi=off fetch=tftp://192.168.1.111/images/32bit/lxle/12.0.4.4/casper/filesystem.squashfs quiet splash --
TEXT HELP
Boot into LXLE 32-bit 12.0.4.4 LIVE
ENDTEXT
LABEL 2
MENU LABEL LXLE 32Bit 12.0.4.4 Install
LINUX images/32bit/lxle/12.0.4.4/casper/vmlinuz
INITRD images/32bit/lxle/12.0.4.4/casper/initrd.gz
APPEND file=images/32bit/lxle/12.0.4.4/preseed/custom.seed boot=casper acpi=off automatic-ubiquity fetch=tftp://192.168.1.111/images/32bit/lxle/12.0.4.4/casper/filesystem.squashfs quiet splash --
TEXT HELP
Installation for LXLE 32bit 12.0.4.4
ENDTEXT
- Create the secondary utilities menu.
nano /tftpboot/menus/utilities.menu
LABEL 1
MENU LABEL Clonezilla Live
KERNEL images/32bit/clonezilla/2.2.4-12/live/vmlinuz
APPEND initrd=images/32bit/clonezilla/2.2.4-12/live/initrd.img boot=live username=user config quiet noswap edd=on nomodeset locales= keyboard-layouts= fetch=tftp://192.168.1.111/images/32bit/clonezilla/2.2.4-12/live/filesystem.squashfs ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=785 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
TEXT HELP
Boot into Clonezilla
ENDTEXT
LABEL 2
MENU LABEL Gparted
KERNEL images/32bit/gparted/0.19.1-4/live/vmlinuz
APPEND initrd=images/32bit/gparted/0.19.1-4/live/initrd.img boot=live username=user config quiet noswap noeject vga=791 nosplash fetch=tftp://192.168.1.111/images/32bit/gparted/0.19.1-4/live/filesystem.squashfs
TEXT HELP
Boot into Gparted
ENDTEXT
TESTING
- Start dnsmasq.
systemctl start dnsmasq.service
- On the client pc, boot via lan/pxe and make your choices.
TROUBLESHOOTING
- Remove the 'quiet' or 'quiet splash' options from the APPEND line
TEST RESULTS
SELECTION: Boot Local
PROBLEM: immediately errors
ERROR: pxe mof exiting pxe rom
RESOLUTION: use workaround boot to local with chain.c32
SELECTION: LXLE Install
PROBLEM: starts to load lxle and then errors to busybox.
ERROR 1: unable to find a live file system on the network.
ERROR 2: unable to find a medium containing a live file system.
RESOLUTION: add fetch=tftp://192.168.1.111/images/32bit/lxle/12.0.4.4/casper/filesystem.squashfs to the APPEND line.
SELECTION: LXLE Live
PROBLEM: starts to load lxle then errors
ERROR: module swap not found in modules.dep
RESOLUTION: add noswap option to APPEND line.
SELECTION: Gparted or Clonezilla
PROBLEM: starts to load then errors
ERROR: rootserver: 192.168.1.2 creating /etc/resolv.conf mount call failed server replied permission denied
RESOLUTION: dnsmasq needs to be dns server so don't use port=0 option in config.
SELECTION: Gparted or Clonezilla
PROBLEM: starts to load then errors
ERROR: asking for cache data failed
RESOLUTION: install udisks2 in Arch Linux ARM.
REFERENCES
http://docs.oracle.com/cd/E50245_01/E50247/html/vmiug-install-pxe.html
http://fabrizioballiano.net/2007/10/15/only-ubiquity-boot-option-for-ubuntu-live-cd/
http://ubuntuforums.org/showthread.php?t=1606910
http://serverfault.com/questions/277470/clonezilla-pxe-boot-without-nfs
http://www.syslinux.org/wiki/index.php/Hardware_Compatibility#LOCALBOOT
http://www.syslinux.org/wiki/index.php/Library_modules
https://www.debian.org/distrib/
Thank you for this helpfull HowTo! I searched in vain for a 'syslinux' package in Arch Linux ARM. Your hint to download 'Syslinux' directly from kernel.org was a real time saver.
ReplyDeleteRegards from Germany
Ingo
You're very welcome. I'm glad it was helpful for you!
Delete