[SOLVED] Unable to install OS from PXEBoot server - TFTP aborted
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Note that the new server to be installed has a configuration to boot from the network. PXE Boot server and new server to be commisioned are in Bridged Adapter network configuration.
The server I am commissioning also fails with the below error:
Warning: Can't mount the root filesystem.
Warning: /dev/root does not exist
/lib/dracut-lib.sh line 1049: echo : write error : No space left on device.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
So, you're saying, you can successfully boot a machine using PXE? While you're trying to install Centos via a PXE boot, you get the error that tftp aborted on the PXE server? Or what? On the server you're installing to, you get 'no root file system' type errors?
And the second post is from the PXE server? Are these VMs?
So, you're saying, you can successfully boot a machine using PXE?
>> Yes
While you're trying to install Centos via a PXE boot, you get the error that tftp aborted on the PXE server?
>> Yes
On the server you're installing to, you get 'no root file system' type errors?
>> No, I get a message like
Warning: Can't mount the root filesystem.
Warning: /dev/root does not exist
/lib/dracut-lib.sh line 1049: echo : write error : No space left on device.
And the second post is from the PXE server?
>>Yes, correct.
Are these VMs?
>> Yes PXE Boot Server is VM and so is the new server which I am trying to commission a VM.
I shall look at it tonight. The steps I performed are below:
Code:
1. Install with Mimnum Install and choose Compatibility Libraries
2. Assign Static IP
3. Disable SELinux and Firewall
4. vim /etc/selinux/config
SELINUX=disabled
5. systemctl disable firewalld
systemctl stop firewalld
6. Install the following packages
yum install -y dhcp tftp-server syslinux wget vsftpd xinetd
7. # Configure dhcp
vim /etc/dhcp/dhcpd.conf
[root@PXEBOOT1 ~]# cat /etc/dhcp/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
ddns-update-style interim;
ignore client-updates
authoritative;
allow booting
allow bootp
allow-unknown-clients
#internal subnets
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.201 192.168.1.250;
option domain-name-servers 192.168.1.101
option domain-name "Bhagyasthaan";
option routers 192.168.1.101;
default-lease-time 600;
max-lease-time 7200;
#PXE Server IP
next-server 192.168.1.101;
filename "pxelinux.0";
}
8. # Setup TFTP Server Configuration
[root@PXEBOOT1 ~]# cat /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot # changed thsi from default to /tftpboot and we shall make a directory called as tftpboot
disable = no # changed this from yes to no
per_source = 11
cps = 100 2
flags = IPv4
}
[root@PXEBOOT1 ~]#
9. Now copy syslinux files to tftpboot
[root@PXEBOOT1 ~]# cp -pavf /usr/share/syslinux/pxelinux.0 /tftpboot/
‘/usr/share/syslinux/pxelinux.0’ -> ‘/tftpboot/pxelinux.0’
[root@PXEBOOT1 ~]# cp -pavf /usr/share/syslinux/menu.c32 /tftpboot/
‘/usr/share/syslinux/menu.c32’ -> ‘/tftpboot/menu.c32’
[root@PXEBOOT1 ~]# cp -pavf /usr/share/syslinux/memdisk /tftpboot/
‘/usr/share/syslinux/memdisk’ -> ‘/tftpboot/memdisk’
[root@PXEBOOT1 ~]# cp -pavf /usr/share/syslinux/mboot.c32 /tftpboot/
‘/usr/share/syslinux/mboot.c32’ -> ‘/tftpboot/mboot.c32’
[root@PXEBOOT1 ~]# cp -pavf /usr/share/syslinux/chain.c32 /tftpboot/
‘/usr/share/syslinux/chain.c32’ -> ‘/tftpboot/chain.c32’
[root@PXEBOOT1 ~]#
10. Create a directory under /tftpboot
11. [root@PXEBOOT1 ~]# mkdir /tftpboot/pxelinux.cfg
12. Create a netboot folder and this needs to live under /tftpboot folder
mkdir /tftpboot/netboot
13. Now you need to do wget to download CentOS 7 image. You can ftp as well if you already have image.
wget http://centos.mirror.serversaustralia.com.au/7/isos/x86_64/CentOS-7-x86_64-DVD-1804.iso
14. Mount CentOS image to /mnt
mount -o loop CentOS-7-x86_64-DVD-1804.iso /mnt
15. Copy Extracted files from CentOS 7 to /var/ftp/pub/
cp -r /mnt/* /var/ftp/pub/
16. Copy some files to /tftpboot/netboot location
[root@PXEBOOT1 ~]# cp -apvf /mnt/images/pxeboot/vmlinuz /tftpboot/netboot/
‘/mnt/images/pxeboot/vmlinuz’ -> ‘/tftpboot/netboot/vmlinuz’
[root@PXEBOOT1 ~]# cp -apvf /mnt/images/pxeboot/initrd.img /tftpboot/netboot/
‘/mnt/images/pxeboot/initrd.img’ -> ‘/tftpboot/netboot/initrd.img’
[root@PXEBOOT1 ~]
17. Now create the root password for the automated install
[root@PXEBOOT1 ~]# openssl passwd -1 jim
$1$hBplWl9M$drAkUSbJrtvrHCpAANflb1
18. Create your kickstart file.
[root@PXEBOOT1 ~]# cat /var/ftp/pub/ks.cfg
# Installation logging level
logging --level=debug
install
lang en_US.UTF-8
keyboard us
timezone Australia/Melbourne
auth --useshadow --enablemd5
selinux --permissive
firewall --enabled
services --enabled=NetworkManager, sshd
eula --agreed
#Use FTP Location
url --url="ftp://192.168.1.101/pub/"
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
clearpart --all --initlabel
part swap --asprimary --fstype="swap" --size=1024
part /boot --fstype xfs --size=50
part pv.01 --size=1 --grow
volgroup rootvg01 pv.01
logvol / --fstype xfs --name=lv01 --vgname=rootvg01 --size=1 --grow
rootpw --iscrypted $1$hBplWl9M$drAkUSbJrtvrHCpAANflb1
%packages
@base
@gnome-desktop
vim
vim-X11
wget
nmap
%end
reboot
[root@PXEBOOT1 ~]#
19. Validate your kickstart file
[root@PXEBOOT1 ~]# ksvalidator /var/ftp/pub/ks.cfg
[root@PXEBOOT1 ~]# ksvalidator /var/ftp/pub/ks.cfg
yum install pykickstart
20.
Menu file!
[root@PXEBOOT1 ~]# cat /tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
timeout 300
MENU TITLE Ameya Agashe PXE Menu
LABEL CentOS7_X64
MENU LABEL CentOS 7 X64
KERNEL netboot/vmlinuz
APPEND initrd=netboot/initrd.img inst.repo=ftp://192.168.1.101/pub ks=ftp://192.168.1.101/pub/ks.cfg
Likewise you can create many labels for many other operating systems
21. Now enable and start essential services
systemctl enable dhcpd
systemctl enable xinetd
systemctl enable vsftpd
systemctl start dhcpd
systemctl start xinetd
systemctl start vsftpd
22. Commission server, two important conditions
1. It should boot off network.
2. Should be in same network like Bridged Adapter
Still not working, here is the attached screenshot[PXE-Boot-Error.jpg]. Need to understand why it always says no space left on device. df -Ph does not give me out so that is not helping.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.