1

I'm setting up a PXE server to automate deployment of KVM guests.

KVM hypervisor host: Fedora 29

KVM guests: Centos 7

During the installation I face a problem /sbin/dmsquash-live-root: write error: No space left on device and after this some "timeout scripts" are started with the following fail of the installation.

Quick overview of the environment:

  1. DHCP server is alright

dhcpd.conf

subnet 172.31.0.0 netmask 255.255.255.0 {
 range 172.31.0.51 172.31.0.120;
 default-lease-time 1800;
 max-lease-time 3600;
 next-server 172.31.0.32;
 filename "pxelinux/pxelinux.0"; 
 option routers 172.31.0.1;
 option subnet-mask 255.255.255.0;
 option broadcast-address 172.31.0.255;
 option domain-name-servers 172.31.0.2;
 option domain-name "corp.example.com";
}

VM actually gets IP address and TFTP server IP address

  1. TFTP server is also alright
[root@kickstart ~]# ll /var/lib/tftpboot/pxelinux/
total 57872
-rw-r--r--. 1 root root 52584760 Apr 29 17:07 initrd.img
-rw-r--r--. 1 root root    26759 Apr 29 17:02 pxelinux.0
drwxr-xr-x. 2 root root       21 May  1 13:48 pxelinux.cfg
-rwxr-xr-x. 1 root root  6639904 Apr 29 17:07 vmlinuz

Kickstart file

[root@kickstart ~]# cat /var/lib/tftpboot/pxelinux/pxelinux.cfg/default
default Linux
prompt 1
timeout 10
display boot.msg
label Linux
        menu label ^Install Centos MA MAN
        menu default
        kernel vmlinuz
        append initrd=initrd.img ks=http://kickstart.corp.example.com/anaconda/anaconda-ks.cfg

VM actually gets vmlinuz and initrd.img

  1. anaconda-ks.cfg is pretty standard I believe
ignoredisk --only-use=sda
keyboard 'us'
rootpw --iscrypted $1$tg.NYz9t$GnRVNLuQdB6mperFmUdwL.
lang en_US
halt
timezone America/New_York
text
network  --bootproto=dhcp --device=eth0
network  --hostname=test1.corp.example.com
url --url="http://kickstart.corp.example.com/install" # Apache server
auth  --useshadow  --passalgo=sha512
firewall --enabled --port=ssh
selinux --enforcing
skipx
bootloader --location=mbr --boot-drive=sda
autopart --type=lvm
clearpart --none --initlabel
  1. Installation source is an Apache server

It's available on the network.

<VirtualHost *:80>
DocumentRoot /www/docs/kickstart.corp.example.com
ServerName kickstart.corp.example.com
Options +Indexes
</VirtualHost>

point where installation freezes

I noticed "SATA link down" messages (see screenshot above) and problem with mounting /dev/loop0 but I don't know how to interpret it.

I don't know where to dig further.

2
  • What is the virtual machine configuration? May 2 '19 at 15:49
  • 1
    @MichaelHampton, it turned out I didn't allocate enough RAM... 1.5GB RAM is required. Now everything is alright, thank you.
    – ttl256
    May 2 '19 at 21:56
4

At this point, the guest has successfully booted the kernel and is running in initramfs environment. The installer initramfs is loading a squashfs file, which would be located at <CentOS DVD root>/LiveOS/squashfs.img. In this case, I believe it might be loading it from http://kickstart.corp.example.com/install/LiveOS/squashfs.img - or it might even be loading it over the internet from the CentOS package repository servers.

(If the latter is true, you can add a boot option inst.stage2=http://kickstart.corp.example.com/install to the append line in /var/lib/tftpboot/pxelinux/pxelinux.cfg/default to enforce loading it from a local source.)

Since the root filesystem is not yet mounted, it would be loading it into a RAM disk. At this point the installer UI is not started yet, and the local disks haven't been touched at all, although the kernel has detected that /dev/vda is present.

On an old CentOS 7 ISO image I have at hand, the squashfs.img file is 352 MiB in size. An up-to-date version is likely to be a bit larger than that; the output of curl (the tool that is actually doing the downloading) encapsulated in the messages logged by dracut-initqueue suggests that your squashfs.img is 432 MiB in size, and the download gets aborted at about the 75% point because there is not enough space (in the ramdisk, I assume).

Since the squashfs.img download was incomplete, mounting it will fail, and then the RAM disk will still be 100% full, causing the No space left on device error message.

How much RAM does your guest VM have assigned to it? If the VM is tiny, you might be running out of memory.

1
  • 1
    Adding RAM helped. It turned out that 1.5GB RAM is required for initial setup. And as @Gordster said I used "sda" instead of "vda" in anaconda-ks.cfg file. Thank you for you thorough answer. You helped a lot. Now with just "add RAM" but with explanation of what we see on the screen during the installation.
    – ttl256
    May 2 '19 at 21:40
0

I believe the error is due to the kickstart file pointing to a virtual drive labeled "sda" and the virtual drive is actually called "vda". You can see "vda" about half way down the output that you have posted and it is about 21GB in size.

ignoredisk --only-use=vda 

bootloader --location=mbr --boot-drive=vda 

clearpart --all --initlabel --drives=vda

Make these changes in your anaconda-ks.cfg file and you should be good to go. please note that my clear part command is --all and you have yours set to --none.

1
  • It turned out that I didn't allocate enough RAM... However the problem with "sda" "vda" appeared later, so thank you for noticing it. You are very observing)
    – ttl256
    May 2 '19 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.