Install Ubuntu on X2100 over the network using PXE

Pick a server that will host the netboot image, run dhcp and tftp server. Lets call it sys-ubuntu.

- login to sys-ubuntu

- install dhcp server
sudo apt-get install dhcp3-server

- edit the /etc/dhcp3/dhcpd.conf like this

sudo vi /etc/dhcp3/dhcpd.conf
ddns-update-style none;
option domain-name “example.net”; # pick the right domain
option domain-name-servers 192.168.2.65, 192.168.3.65; # pick the correct dns resolvers. you may try opendns IPs
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 { # pick your network
option domain-name-servers 192.168.2.65, 192.168.3.65;
option routers 192.168.0.1; # pick the correct gateway
range 192.168.0.80 192.168.0.90; # pick a range of IP that are not in use and on same network as sys-ubuntu
next-server 192.168.0.81; # this is the IP of sys-ubuntu. YMMV
filename “/var/lib/tftpboot/pxelinux.0″; # for some reason tftp was complaining if absolute pathname is given
}

- start the dhcp server
sudo /etc/init.d/dhcp3-server start

- install tftpd server
sudo apt-get install tftpd-hpa

- update the tftpd-hpa default tftp directory

sudo vi /etc/default/tftpd-hpa
TFTP_DIRECTORY="/var/lib/tftpboot"

- restart tftpd-hpa

stop tftpd-hpa
start tftpd-hpa

- now the last part. get the latest 64bit netboot image and dump it into the tftp’s root dir

  sudo cd /var/lib/tftpboot
  wget http://archive.ubuntu.com/ubuntu/dists/maverick/main/installer-amd64/
         current/images/netboot/netboot.tar.gz (one line)
  sudo tar -xzvf netboot.tar.gz

- now edit a file to enable the serial console to work
sudo vi ubuntu-installer/amd64/boot-screens/text.cfg
add "console=ttyS0,9600n8" to the end of the append lines like these

default install
label install
menu label ^Install
menu default
kernel ubuntu-installer/amd64/linux
append vga=normal initrd=ubuntu-installer/amd64/initrd.gz — quiet console=ttyS0,9600n8
label cli
menu label ^Command-line install
kernel ubuntu-installer/amd64/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu-installer/amd64/initrd.gz — quiet console=ttyS0,9600n8

- now disable UFW for few mins for the PXE talk
(better would be adding some fw rules)
ufw disable

- look at this X2100.png for key maps

- connect your laptop to your X2100′s serial (rs232) interface, start minicom (or hyperterminal) and power it on

- direct it to boot thru PXE using ESC+8

- if the client screen is blank at any point, just hit enter.

- once installation completes enable the fw and disable the dhcp and tftpd server

ufw enable
sudo /etc/init.d/dhcp3-server stop
stop tftpd-hpa

Advertisement

About asif

Solaris sysadmin
This entry was posted in ubuntu. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s