pxe booting with dodhcp

Questions related to network booting via PXE
r8rae
Posts: 3
Joined: 14 Nov 2011, 11:30

pxe booting with dodhcp

Postby r8rae » 14 Nov 2011, 11:34

Hi all,

How difficult is it for me to set a longer UDHCPC timeout? is it a case of making a custom disk image and extracting the files again? or is there an extra comand i can enter in the pxelinux file ? (i couldnt find any documentation that states what you can and cant use!)

i tried this at home but I think i messed the process up & didn't get enough files outputted to be able to use it for PXE booting anymore.

our company DHCP is physically miles away, so takes a second or two before it receives a reply - so it just times out.

our test DHCPd server works fine, but we cannot use this on the company wide subnet.

Thanks

r8rae
Posts: 3
Joined: 14 Nov 2011, 11:30

Re: pxe booting with dodhcp

Postby r8rae » 14 Nov 2011, 11:47

if only i'd seen this yesterday, of course the udhcpc bit is inside the kernel: http://www.sysresccd.org/Sysresccd-manu ... own_kernel

r8rae
Posts: 3
Joined: 14 Nov 2011, 11:30

Re: pxe booting with dodhcp

Postby r8rae » 14 Nov 2011, 14:19

think i've figured it out. . . notes for future ref:

Extracting the current initramfs
Here is how we extract the contents of the old initramfs using cpio. If you are booting from the network, you may need to download initram.igz by hand.
mkdir /usr/src/initramfs
cd /usr/src/initramfs
cat /livemnt/boot/isolinux/initram.igz | xz -d | cpio -id

EDIT THE INIT FILE FOR DHCP TIMEOUT ETC

vi /usr/src/initramfs/init
line 490, char 41 - removed the -n option (=quits instantly if it doesn't get a reply, should wait default of 3 secs now)
as per http://busybox.net/downloads/BusyBox.html

i replaced '-n' with '-T 15'


Recreating the initramfs
Here is how we can recreate the new initramfs:
rm -f /usr/src/initram.igz
cd /usr/src/initramfs
find . | cpio -H newc -o | xz --check=crc32 --x86 --lzma2 > /usr/src/initram.igz

copy the new initram.igz to server

scp /usr/src/initram.igz [email protected]:/initram.igz

then use the new initram.igz to PXE boot instead of the original.


Return to “Network Boot via PXE”

Who is online

Users browsing this forum: No registered users and 3 guests