Dell Poweredge

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, July 31, 2012

PXE Boot a Dban image from an Ubuntu Server

Posted on 9:21 AM by Unknown



 Dhcp Offers from Ubuntu Server to Compute Nodes
****Note**** exercise extreme care with these notes I have made as you can boot and wipe any computer capable of net booting without any keyboard input on the private network if the machine in question is set to net-boot. 
I ACCEPT NO RESPONSIBILITY FOR ANY ERRORS OR OMISSIONS , YOU HAVE BEEN WARNED!


The object of this blog entry was to remind me how to securely erase a cluster of headless compute nodes connected to a head node using a Dban image pxe booted from the head node.

I installed Ubuntu 12.04 Server on the head node. The Head Node's eth0 was connected via Ethernet switches to the compute nodes on a private network in the range 192.168.1.0 and eth1 was connected to the public network and it was set to receive an IP address via dhcp.

Installation Requirements for the Head Node:-
Install an internet super server, tftp server, dhcp server and syslinux a boot loader.
 The command to do this is :-
sudo apt-get -y install inetutils-inetd tftpd-hpa dhcp3-server syslinux

 You have to extract some files from a Darik's Boot 'n' Nuke image:-
sudo mkdir /media/iso
sudo mount -o loop /the/path/to/dBanfile.iso /media/iso

In the directory /var/lib/tftpboot place the following files dban.bzi from the /media/iso directory and the file pxelinux.0 from the /usr/lib/syslinux/ directory. Also place the remaining files from the iso image in /var/lib/tftpboot/pxelinux.cfg

 Set the entries in the file named default in the directory /var/lib/tftpboot/pxelinux.cfg

PROMPT 0
DEFAULT quick

With prompt set to 0 there is no pause and the default setting is quick it can be autonuke dban dod dod3pass dodshort gutman ops2 paranoid prng or zero.
This means when it is run it goes straight to quick wipe so exercise extreme care when doing this as you can boot and wipe anything on the private network if the machine in question is set to netboot. I set it to 0 as all the compute nodes were headless and keyboardless so I could not have a pause for keyboard input.

The settings in the file /etc/dhcp/dhcpd.conf  I required for the dhcp server are as follows :-
ddns-update-style none;
option domain-name "home.local";
option domain-name-servers 192.168.1.1;
default-lease-time 86400;
max-lease-time 604880;
option time-offset -18000;
authoritative;
log-facility local7;
allow booting;
allow bootp;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
filename "pxelinux.0";
option root-path "/var/lib/tftpboot";
next-server 192.168.1.1;
}



In the tftp config file /etc/default/tftpd-hpa I required the following :-


RUN_DAEMON="yes"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS=""


The other dhcp config file /etc/default/isc-dhcp-server
should contain :-
INTERFACES="eth0"

 The ethernet settings file /etc/network/interfaces
should contain :-
 auto lo
iface lo inet loopback

# This is the private network
# Its static ip address
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
auto eth0
# The public network interface

# It uses dhcp
auto eth1
iface eth1 inet dhcp


Note you will have to ensure that the compute nodes' bios is set to pxe boot on eth0 if that is the interface you are using. Once the Ubuntu Head Node is booted use tail -f /var/log/syslog to track the progress of the compute nodes dhcp ip addresses being served as they are booted.

This really saved me time when I had to securely erase a large number of machines before they were decommissioned and sent for recycling :).

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Ubuntu Enterprise Cloud
    Hadoop Cluster I had problems with ssh passwordless logins taking ages on the hadoop Ubuntu cluster I was working on. This was fixed by addi...
  • Programming ATTiny45 using an Arduino Uno
    Wiring of the Programmer The Arduino is programmed using the Arduino IDE and USB with the ArduinoISP sketch from the File Menu located in ex...
  • Raspberry PI Enterprise Wifi
    The dongle I used was the Farnell WiPi this was identified by the PI using the command lsusb as a Bus 001 Device 005: ID 148f:5370 Ralink T...
  • Raspberry PI Kiosk
    Do the usual things after installing an image on the SD card and booting the Pi for the first time run sudo raspi-config then set boot deskt...
  • PXE Boot a Dban image from an Ubuntu Server
     Dhcp Offers from Ubuntu Server to Compute Nodes ****Note**** exercise extreme care with these notes I have made as you can boot and wipe an...
  • Remove CentOS Xen
    Install Standard Kernel yum install kernel Remove Xen Kernel yum remove xen kernel-xen Edit Grub to Select Correct Kernel /boot/grub/grub.co...
  • IPTables Lost After Reboot of Head Node
    IPTables Lost After Reboot of Head Node The iptables were lost every time the machine was rebooted so I found I needed to save the iptabels ...
  • SSH Connection Problems
    Ssh-agent Problem When I attempted to use the command 'ssh-agent' then the command 'ssh-add' to enter my rsa passphrase ...
  • VirtualBox
    Create a VM VBoxManage –help VBoxManage createvm --name "MyvmServer" --register VBoxManage modifyvm "MyvmServer" --memor...
  • Create a Video Using DeVeDe
    DeVeDe is a CD/DVD creator package for Linux. In Ubuntu sudo apt-get install devede , this will install the package. Run the program in Gno...

Categories

  • Cluster Login Problem
  • Hadoop Cluster Passwordless SSH login
  • Open-SSH Installation
  • Software Update Command Line

Blog Archive

  • ►  2013 (6)
    • ►  September (3)
    • ►  April (2)
    • ►  March (1)
  • ▼  2012 (16)
    • ►  November (1)
    • ►  October (1)
    • ▼  July (2)
      • PXE Boot a Dban image from an Ubuntu Server
      • Repair a Faulty D-Link DGS-1024D Gigabit Switch
    • ►  June (3)
    • ►  May (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (17)
    • ►  December (1)
    • ►  November (3)
    • ►  August (4)
    • ►  July (1)
    • ►  June (2)
    • ►  May (2)
    • ►  March (2)
    • ►  February (1)
    • ►  January (1)
  • ►  2010 (18)
    • ►  December (2)
    • ►  September (2)
    • ►  August (2)
    • ►  July (4)
    • ►  June (7)
    • ►  May (1)
Powered by Blogger.

About Me

Unknown
View my complete profile