DGND3700 V1 PXE Extended Network Boot Ubuntu

From richud.com
Jump to navigation Jump to search


Extending PXE Boot with USB

  • Create a folder 'pxe' in the root of your USB attached drive.
  • Turn on NFS from the network services menu. (Supports NFS 2/3/4) if you are intend to boot Linux distro's such as Ubuntu.
  • In this example I will assume the DGND3700 has IP 192.168.0.1 and the drive label is Seagate500 (and thus mounted as such) and you have a NFS share to it mounted on your machine under /net (Suggest AutoFS)

Get required files

Quick method

Copy contents of /usr/pxe from the router to pxe/ folder just created as a starting point (telnet/ssh in and copy to mounted USB drive or via Filezilla).

Latest from Syslinux

Get the latest git, build it, copy it

sudo apt-get install git nasm uuid-dev
cd ~
git clone git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git
cd syslinux
make bios

find ~/syslinux/bios/ -type f \( -name lib*.c32 -o -name ldlinux.c32 -o -name lpxelinux.0 -o -name vesamenu.c32 -o -name memdisk -o -name hdt.c32 \) -exec cp {} /net/192.168.0.1/media/Seagate500/pxe/ \;

Example

I will use the below as a visual example as it will probably make most sense.

I am doing this from my laptop with a NFS share to the router, rather than physically moving the drive over.

Download

Download whatever Ubuntu you want, in this example I will use

Ubuntu 12.04.4 (32bit)

Ubuntu 14.04 (64 bit)

Extract

Open each Ubuntu .iso in archive manager, create a target folder, extract some of the folders in the .iso to create this structure (The 'casper' folder is the only vital one if you want to save a few Mb); Just download chntpw straight into the folder you made for it.

Dir Structure

  • Note I also have Parted Magic 4.8 and chntpw here, I just haven't made them part of this example.
rich@rich:/net/192.168.0.1/media/Seagate500/pxe$ tree -L 2
.
├── 12.04.4
│   ├── .disk
│   ├── casper
│   ├── dists
│   ├── pool
│   ├── preseed
│   └── ubuntu -> .
├── 14.04
│   ├── .disk
│   ├── casper
│   ├── dists
│   ├── pool
│   ├── preseed
│   └── ubuntu -> .
├── background.jpg
├── chntpw
│   └── cd140201.iso
├── default
├── hdt.c32
├── ldlinux.c32
├── libcom32.c32
├── libgpl.c32
├── libmenu.c32
├── libutil.c32
├── lpxelinux.0
├── memdisk
├── memtest -> memtest86-4.3.7.bin
├── memtest86-4.3.7.bin
├── memtest86plus-5.01.bin
├── menu.c32
├── pci.ids
├── pmagic
│   ├── bzImage
│   └── initramfs
└── vesamenu.c32

Reset Permissions (if needed)

Depending on how/what you used to extract, permissions/ownership can get messy. To reset;

cd /net/192.168.0.1/media/Seagate500/
chown -R 1000:1000 pxe
find pxe -type f -exec chmod 644 {} \;
find pxe -type d -exec chmod 755 {} \;

Add to menu

Append pxe/default with this;

LABEL -
MENU LABEL Ubuntu Live OS
MENU DISABLE

LABEL -> Ubuntu 12.04.4 LTS (x32)
KERNEL 12.04.4/casper/vmlinuz
APPEND boot=casper netboot=nfs nfsroot=192.168.0.1:/media/Seagate500/pxe/12.04.4 initrd=12.04.4/casper/initrd.lz quiet splash -- locale=en_GB bootkbd=gb console-setup/layoutcode=gb 

LABEL -> Ubuntu 12.04.4 LTS (x32) (copy to RAM)
KERNEL 12.04.4/casper/vmlinuz
APPEND boot=casper netboot=nfs nfsroot=192.168.0.1:/media/Seagate500/pxe/12.04.4 initrd=12.04.4/casper/initrd.lz quiet splash toram -- locale=en_GB bootkbd=gb console-setup/layoutcode=gb

LABEL -> Ubuntu 14.04 LTS (x64)
KERNEL 14.04/casper/vmlinuz.efi
APPEND boot=casper netboot=nfs nfsroot=192.168.0.1:/media/Seagate500/pxe/14.04 initrd=14.04/casper/initrd.lz quiet splash -- locale=en_GB bootkbd=gb console-setup/layoutcode=gb 

LABEL -> Ubuntu 14.04 LTS (x64) (copy to RAM)
KERNEL 14.04/casper/vmlinuz.efi
APPEND boot=casper netboot=nfs nfsroot=192.168.0.1:/media/Seagate500/pxe/14.04 initrd=14.04/casper/initrd.lz quiet splash toram -- locale=en_GB bootkbd=gb console-setup/layoutcode=gb

MENU SEPARATOR

LABEL -> Parted Magic 4.8
KERNEL pmagic/bzImage
INITRD pmagic/initramfs

MENU SEPARATOR

LABEL -> Chntpw (Windows password changer)
KERNEL memdisk iso raw
INITRD chntpw/cd140201.iso


Simple as that, plug something in to a wired LAN port and you should be able to boot straight into Ubuntu!

Comments

blog comments powered by Disqus