Disk Ubuntu
The configuration of PXE linux server is all the same, only the creation of boot file system is different.
The Ubuntu version is Ubuntu 12.04 LTS 32
1. Install the required packages
sudo apt-get install dhcp3-server tftpd-hpa syslinux nfs-kernel-server initramfs-tools nfs-common
2. Copy current kernel version to home directory
sudocp /boot/vmlinuz-3.11.0-18-generic ~
3. Create an initrd.img file
(1)change the BOOT flag to nfs in /etc/initramfs-tools/initramfs.conf
#
# BOOT: [ local | nfs ]
#
# local - Boot off of local media (harddrive, USB stick).
#
# nfs - Boot using an NFS drive as the root of the drive.
#
BOOT=nfs
(2)Change the MODULES flag to netboot in /etc/initramfs-tools/initramfs.conf
#
# MODULES: [ most | netboot | dep | list ]
#
# most - Add all framebuffer, acpi, filesystem, and harddrive drivers.
#
# dep - Try and guess which modules to load.
#
# netboot - Add the base modules, network modules, but skip block devices.
#
# list - Only include modules from the 'additional modules' list
#
MODULES=netboot
4. Run mkinitramfs
mkinitramfs -o ~/initrd.img-3.11.0-18-generic
5. Copy OS files to the server
mount -t nfs -onolock 10.10.10.11:/nfsroot /mnt
cp -ax /. /mnt/.
cp -ax /dev/. /mnt/dev/.
6. Copy kernel and initrd to tftp root
sudo cp ~/ vmlinuz-3.11.0-18-generic /tftpboot/
sudo cp ~/initrd.img-3.11.0-18-generic /tftpboot/
7. Configure fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/nfs / nfs defaults 1 1
none /tmp tmpfs defaults 0 0
none /var/run tmpfs defaults 0 0
none /var/lock tmpfs defaults 0 0
none /var/tmp tmpfs defaults 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0