Results 1 to 9 of 9

Thread: HOWTO: PXE Netboot

  1. #1
    Just burned his ISO
    Join Date
    Jan 2007
    Posts
    2

    Default HOWTO: PXE Netboot

    I have a tiny old little laptop with no cdrom, no floppy and no USB boot options. (PIII 800 era)

    My only quick option for installing an OS is the built in PXE on the onboard network card. I really wanted to get BT on this thing so here is how I netbooted then installed to the hard drive. If you ever done dhcp/tftp before, it's very easy.

    Overall Process:

    All I did was copy the contents of the CD to a USB key, plug it into the old laptop and pxeboot the vmlinuz and initrd on the CD. The kernel/initrd is setup to mount everything it can find and search for the .mo files.

    Detailed instructions:

    What you need:

    - Laptop with PXE boot capabilities and a USB port (1.1 is fine)
    - 512 or 1GB USB memory key, or a flash memory (SD, CF, etc) and a USB reader
    - Another computer (preferably something unixy) that can run DHCPD and TFTPD.

    1. Download the Backtrack iso.
    2. While it's downloading install and configure the dhcp server.

    On Ubuntu, you can simply do:

    Code:
    sudo apt-get install dhcp
    Once it is installed, you should be able to replace /etc/dhcpd.conf with the following. Make sure you put in the MAC address of the machine you want BT on.

    Code:
    default-lease-time 600;
    max-lease-time 3600;
    subnet 192.168.1.0 netmask 255.255.255.0 {
      range 192.168.1.40 192.168.1.45;
      option subnet-mask 255.255.255.0;
      option broadcast-address 192.168.1.255;
      option routers 192.168.1.1;
      option domain-name-servers 192.168.1.1;
    }
    
    host old_laptop {
      #  OLD_LAPTOP MAC ADDRESS GOES BELOW THIS LINE
      hardware ethernet     00:00:00:00:00:00;  
      fixed-address         192.168.1.10;
      option host-name "old_laptop";
      filename "pxelinux.0";
    }


    3. Install a tftp server.

    Once again, on Ubuntu:

    Code:
    sudo apt-get install atftpd
    Edit /etc/default/atftpd.conf changing:

    Code:
    /tftpboot
    to
    Code:
    /tftpboot/backtrack
    Now that you have the ISO we need to copy the contents to the /tftpboot/backtrack directory and to the USB flash memory.

    Code:
    sudo mkdir /mnt/bt
    sudo mount -o loop /path/to/backtrackiso.iso /mnt/bt
    sudo cp -pR /mnt/bt/* /tftpboot/backtrack
    sudo cp -pR /mnt/bt/* /path/to/usb/mountpoint
    sudo umount  /mnt/bt
    4. Download syslinux (contains pxelinux)

    Code:
    cd /tftpboot/backtrack
    sudo wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.31.tar.bz2
    sudo tar jxvf syslinux-3.31.tar.bz2
    sudo cp syslinux-3.31/pxelinux.0 .
    sudo mkdir pxelinux.cfg
    sudo cp isolinux.cfg pxelinux.cfg/default
    5. Plug the USB memory into your laptop and boot it selecting PXE or network boot.

    6. Once you've successfully booted the OS, you can install as documented in the wiki.

    I did this mostly from memory, so please correct any typo's I might have.

  2. #2
    Just burned his ISO
    Join Date
    Nov 2006
    Posts
    5

    Default

    wow amazing stuff, u made this nice and easy. I'm going to give this a try now. Thanks a lot! I always wonder how to setup pxe server.


    hmm i have tried installing it however I'm unable to get dhcpd to start up. Getting the following error:

    root@lh6-laptop:/etc# dhcpd3
    Internet Systems Consortium DHCP Server V3.0.4
    Copyright 2004-2006 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/
    /etc/dhcp3/dhcpd.conf line 9: semicolon expected.
    }
    ^
    /etc/dhcp3/dhcpd.conf line 17: unexpected end of file

    ^
    Configuration file errors encountered -- exiting






    I'm using the dhcpd.conf stated here. Line 17 ends with }

  3. #3
    Senior Member imported_spankdidly's Avatar
    Join Date
    Feb 2006
    Posts
    1,031

    Default

    I followed it to a T and it didn't work. Can't get dhcpd to get going, got the same error but found where the semicolon went and got that fixed. Then I ran into the isolinux.cfg error because it was nowhere to be found. Finally found that. In the end, it didn't work. Using Ubuntu 6.10. I have a little fujitsu, no cdrom, no bootable usb, no floppy. Just a HDD and network. Damn, I was hoping this would work SO BAD!!!

  4. #4
    Just burned his ISO
    Join Date
    Nov 2006
    Posts
    5

    Default

    I've got it to work.

    You need to add a ; at the end of option domain-name-servers 192.168.1.1


    so it would be:

    default-lease-time 600;
    max-lease-time 3600;
    subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.40 192.168.1.45;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.1;
    option domain-name-servers 192.168.1.1;
    }


    I'm using ubuntu too, my pxe boot is fine. But what I want to do is be able to boot off the pxe network completely and not use the usb stick on the laptop.

    I have realised that

    sudo cp -pR /mnt/bt /tftpboot/backtrack
    sudo cp -pR /mnt/bt /path/to/usb/mountpoint

    will create a new folder called /bt. So basically I removed that folder and move the files into the correct directory.

  5. #5
    Senior Member imported_spankdidly's Avatar
    Join Date
    Feb 2006
    Posts
    1,031

    Default

    I will try this again tonight. I tried doing all of this in VMware, which probably wouldn't work after all the weird IP adressing. I installed Ubuntu on a dedicated machine last night and will try to get it working tonight. I need BT on my fujitsu! Perfect wardrivin machine!!

  6. #6
    Just burned his ISO
    Join Date
    Nov 2006
    Posts
    5

    Default

    hmm don't know if it works in vmware. I haven't tried it. But I can guarantee you that this PXE boot definitly works.

    I installed ubuntu on my spare laptop since its too big to take it around.

  7. #7
    Senior Member imported_spankdidly's Avatar
    Join Date
    Feb 2006
    Posts
    1,031

    Default

    I must be retarded, I can't get it to work still. My laptop connects to the dhcp server from ubuntu box, and it just says tftp open timeout. That's it, doesn't do anything else.

  8. #8
    Senior Member imported_spankdidly's Avatar
    Join Date
    Feb 2006
    Posts
    1,031

    Default

    haha, nevermind. I just found that I have like the ONE chipset that has problems with Tftp. Damn Fujitsu!

  9. #9
    Just burned his ISO
    Join Date
    Jan 2007
    Posts
    2

    Default

    Sorry guys, I went in a fixed the typos that were causing problems. (the missing semi colon and the botched cp command)

    spankdidly, I did this install on a Fujitsu B2610, so it does work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •